├── .dockerignore ├── .editorconfig ├── .env.example ├── .eslintrc.cjs ├── .gitattributes ├── .github ├── ISSUE_TEMPLATE.md ├── PULL_REQUEST_TEMPLATE.md └── workflows │ ├── build.yaml │ ├── semantic.yaml │ ├── style.yaml │ └── test.yaml ├── .gitignore ├── .npmrc ├── .prettierignore ├── .prettierrc.cjs ├── .vscode └── extensions.json ├── Makefile ├── README.md ├── api └── serverless.ts ├── dockerfile ├── jest.config.js ├── package.json ├── pnpm-lock.yaml ├── prisma ├── migrations │ ├── 20230610112026_user │ │ └── migration.sql │ ├── 20230610112037_user_session │ │ └── migration.sql │ ├── 20230916124005_user_session_longer_refresh_token │ │ └── migration.sql │ └── migration_lock.toml └── schema.prisma ├── src ├── __test__ │ ├── redis.test.ts │ └── server.test.ts ├── index.ts ├── modules │ ├── README.md │ ├── auth │ │ ├── __test__ │ │ │ ├── login.test.ts │ │ │ ├── logout.test.ts │ │ │ ├── refresh.test.ts │ │ │ ├── register.test.ts │ │ │ └── user.test.ts │ │ ├── auth.controller.ts │ │ ├── auth.route.ts │ │ ├── auth.schema.ts │ │ ├── auth.service.ts │ │ ├── index.ts │ │ └── user.service.ts │ └── index.ts ├── plugins │ ├── README.md │ ├── __mocks__ │ │ └── prisma.ts │ ├── config.ts │ ├── cookie.ts │ ├── cors.ts │ ├── index.ts │ ├── jwt.ts │ ├── prisma.ts │ ├── redis.ts │ ├── sensible.ts │ └── swagger.ts ├── server.ts ├── test │ └── setupTest.ts └── utils │ └── time.ts ├── tsconfig.build.json ├── tsconfig.json └── vercel.json /.dockerignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OurUncomplicatedTemplates/fastify-prisma-redis-swagger-jwt-template/HEAD/.dockerignore -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OurUncomplicatedTemplates/fastify-prisma-redis-swagger-jwt-template/HEAD/.editorconfig -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OurUncomplicatedTemplates/fastify-prisma-redis-swagger-jwt-template/HEAD/.env.example -------------------------------------------------------------------------------- /.eslintrc.cjs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OurUncomplicatedTemplates/fastify-prisma-redis-swagger-jwt-template/HEAD/.eslintrc.cjs -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OurUncomplicatedTemplates/fastify-prisma-redis-swagger-jwt-template/HEAD/.github/ISSUE_TEMPLATE.md -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OurUncomplicatedTemplates/fastify-prisma-redis-swagger-jwt-template/HEAD/.github/PULL_REQUEST_TEMPLATE.md -------------------------------------------------------------------------------- /.github/workflows/build.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OurUncomplicatedTemplates/fastify-prisma-redis-swagger-jwt-template/HEAD/.github/workflows/build.yaml -------------------------------------------------------------------------------- /.github/workflows/semantic.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OurUncomplicatedTemplates/fastify-prisma-redis-swagger-jwt-template/HEAD/.github/workflows/semantic.yaml -------------------------------------------------------------------------------- /.github/workflows/style.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OurUncomplicatedTemplates/fastify-prisma-redis-swagger-jwt-template/HEAD/.github/workflows/style.yaml -------------------------------------------------------------------------------- /.github/workflows/test.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OurUncomplicatedTemplates/fastify-prisma-redis-swagger-jwt-template/HEAD/.github/workflows/test.yaml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OurUncomplicatedTemplates/fastify-prisma-redis-swagger-jwt-template/HEAD/.gitignore -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | shamefully-hoist=true -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OurUncomplicatedTemplates/fastify-prisma-redis-swagger-jwt-template/HEAD/.prettierignore -------------------------------------------------------------------------------- /.prettierrc.cjs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OurUncomplicatedTemplates/fastify-prisma-redis-swagger-jwt-template/HEAD/.prettierrc.cjs -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OurUncomplicatedTemplates/fastify-prisma-redis-swagger-jwt-template/HEAD/.vscode/extensions.json -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OurUncomplicatedTemplates/fastify-prisma-redis-swagger-jwt-template/HEAD/Makefile -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OurUncomplicatedTemplates/fastify-prisma-redis-swagger-jwt-template/HEAD/README.md -------------------------------------------------------------------------------- /api/serverless.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OurUncomplicatedTemplates/fastify-prisma-redis-swagger-jwt-template/HEAD/api/serverless.ts -------------------------------------------------------------------------------- /dockerfile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OurUncomplicatedTemplates/fastify-prisma-redis-swagger-jwt-template/HEAD/dockerfile -------------------------------------------------------------------------------- /jest.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OurUncomplicatedTemplates/fastify-prisma-redis-swagger-jwt-template/HEAD/jest.config.js -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OurUncomplicatedTemplates/fastify-prisma-redis-swagger-jwt-template/HEAD/package.json -------------------------------------------------------------------------------- /pnpm-lock.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OurUncomplicatedTemplates/fastify-prisma-redis-swagger-jwt-template/HEAD/pnpm-lock.yaml -------------------------------------------------------------------------------- /prisma/migrations/20230610112026_user/migration.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OurUncomplicatedTemplates/fastify-prisma-redis-swagger-jwt-template/HEAD/prisma/migrations/20230610112026_user/migration.sql -------------------------------------------------------------------------------- /prisma/migrations/20230610112037_user_session/migration.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OurUncomplicatedTemplates/fastify-prisma-redis-swagger-jwt-template/HEAD/prisma/migrations/20230610112037_user_session/migration.sql -------------------------------------------------------------------------------- /prisma/migrations/20230916124005_user_session_longer_refresh_token/migration.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OurUncomplicatedTemplates/fastify-prisma-redis-swagger-jwt-template/HEAD/prisma/migrations/20230916124005_user_session_longer_refresh_token/migration.sql -------------------------------------------------------------------------------- /prisma/migrations/migration_lock.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OurUncomplicatedTemplates/fastify-prisma-redis-swagger-jwt-template/HEAD/prisma/migrations/migration_lock.toml -------------------------------------------------------------------------------- /prisma/schema.prisma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OurUncomplicatedTemplates/fastify-prisma-redis-swagger-jwt-template/HEAD/prisma/schema.prisma -------------------------------------------------------------------------------- /src/__test__/redis.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OurUncomplicatedTemplates/fastify-prisma-redis-swagger-jwt-template/HEAD/src/__test__/redis.test.ts -------------------------------------------------------------------------------- /src/__test__/server.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OurUncomplicatedTemplates/fastify-prisma-redis-swagger-jwt-template/HEAD/src/__test__/server.test.ts -------------------------------------------------------------------------------- /src/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OurUncomplicatedTemplates/fastify-prisma-redis-swagger-jwt-template/HEAD/src/index.ts -------------------------------------------------------------------------------- /src/modules/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OurUncomplicatedTemplates/fastify-prisma-redis-swagger-jwt-template/HEAD/src/modules/README.md -------------------------------------------------------------------------------- /src/modules/auth/__test__/login.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OurUncomplicatedTemplates/fastify-prisma-redis-swagger-jwt-template/HEAD/src/modules/auth/__test__/login.test.ts -------------------------------------------------------------------------------- /src/modules/auth/__test__/logout.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OurUncomplicatedTemplates/fastify-prisma-redis-swagger-jwt-template/HEAD/src/modules/auth/__test__/logout.test.ts -------------------------------------------------------------------------------- /src/modules/auth/__test__/refresh.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OurUncomplicatedTemplates/fastify-prisma-redis-swagger-jwt-template/HEAD/src/modules/auth/__test__/refresh.test.ts -------------------------------------------------------------------------------- /src/modules/auth/__test__/register.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OurUncomplicatedTemplates/fastify-prisma-redis-swagger-jwt-template/HEAD/src/modules/auth/__test__/register.test.ts -------------------------------------------------------------------------------- /src/modules/auth/__test__/user.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OurUncomplicatedTemplates/fastify-prisma-redis-swagger-jwt-template/HEAD/src/modules/auth/__test__/user.test.ts -------------------------------------------------------------------------------- /src/modules/auth/auth.controller.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OurUncomplicatedTemplates/fastify-prisma-redis-swagger-jwt-template/HEAD/src/modules/auth/auth.controller.ts -------------------------------------------------------------------------------- /src/modules/auth/auth.route.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OurUncomplicatedTemplates/fastify-prisma-redis-swagger-jwt-template/HEAD/src/modules/auth/auth.route.ts -------------------------------------------------------------------------------- /src/modules/auth/auth.schema.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OurUncomplicatedTemplates/fastify-prisma-redis-swagger-jwt-template/HEAD/src/modules/auth/auth.schema.ts -------------------------------------------------------------------------------- /src/modules/auth/auth.service.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OurUncomplicatedTemplates/fastify-prisma-redis-swagger-jwt-template/HEAD/src/modules/auth/auth.service.ts -------------------------------------------------------------------------------- /src/modules/auth/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OurUncomplicatedTemplates/fastify-prisma-redis-swagger-jwt-template/HEAD/src/modules/auth/index.ts -------------------------------------------------------------------------------- /src/modules/auth/user.service.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OurUncomplicatedTemplates/fastify-prisma-redis-swagger-jwt-template/HEAD/src/modules/auth/user.service.ts -------------------------------------------------------------------------------- /src/modules/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OurUncomplicatedTemplates/fastify-prisma-redis-swagger-jwt-template/HEAD/src/modules/index.ts -------------------------------------------------------------------------------- /src/plugins/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OurUncomplicatedTemplates/fastify-prisma-redis-swagger-jwt-template/HEAD/src/plugins/README.md -------------------------------------------------------------------------------- /src/plugins/__mocks__/prisma.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OurUncomplicatedTemplates/fastify-prisma-redis-swagger-jwt-template/HEAD/src/plugins/__mocks__/prisma.ts -------------------------------------------------------------------------------- /src/plugins/config.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OurUncomplicatedTemplates/fastify-prisma-redis-swagger-jwt-template/HEAD/src/plugins/config.ts -------------------------------------------------------------------------------- /src/plugins/cookie.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OurUncomplicatedTemplates/fastify-prisma-redis-swagger-jwt-template/HEAD/src/plugins/cookie.ts -------------------------------------------------------------------------------- /src/plugins/cors.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OurUncomplicatedTemplates/fastify-prisma-redis-swagger-jwt-template/HEAD/src/plugins/cors.ts -------------------------------------------------------------------------------- /src/plugins/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OurUncomplicatedTemplates/fastify-prisma-redis-swagger-jwt-template/HEAD/src/plugins/index.ts -------------------------------------------------------------------------------- /src/plugins/jwt.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OurUncomplicatedTemplates/fastify-prisma-redis-swagger-jwt-template/HEAD/src/plugins/jwt.ts -------------------------------------------------------------------------------- /src/plugins/prisma.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OurUncomplicatedTemplates/fastify-prisma-redis-swagger-jwt-template/HEAD/src/plugins/prisma.ts -------------------------------------------------------------------------------- /src/plugins/redis.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OurUncomplicatedTemplates/fastify-prisma-redis-swagger-jwt-template/HEAD/src/plugins/redis.ts -------------------------------------------------------------------------------- /src/plugins/sensible.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OurUncomplicatedTemplates/fastify-prisma-redis-swagger-jwt-template/HEAD/src/plugins/sensible.ts -------------------------------------------------------------------------------- /src/plugins/swagger.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OurUncomplicatedTemplates/fastify-prisma-redis-swagger-jwt-template/HEAD/src/plugins/swagger.ts -------------------------------------------------------------------------------- /src/server.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OurUncomplicatedTemplates/fastify-prisma-redis-swagger-jwt-template/HEAD/src/server.ts -------------------------------------------------------------------------------- /src/test/setupTest.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OurUncomplicatedTemplates/fastify-prisma-redis-swagger-jwt-template/HEAD/src/test/setupTest.ts -------------------------------------------------------------------------------- /src/utils/time.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OurUncomplicatedTemplates/fastify-prisma-redis-swagger-jwt-template/HEAD/src/utils/time.ts -------------------------------------------------------------------------------- /tsconfig.build.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OurUncomplicatedTemplates/fastify-prisma-redis-swagger-jwt-template/HEAD/tsconfig.build.json -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OurUncomplicatedTemplates/fastify-prisma-redis-swagger-jwt-template/HEAD/tsconfig.json -------------------------------------------------------------------------------- /vercel.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OurUncomplicatedTemplates/fastify-prisma-redis-swagger-jwt-template/HEAD/vercel.json --------------------------------------------------------------------------------