├── .env ├── .gitignore ├── Auth API.postman_collection.json ├── NOTES.md ├── README.md ├── config ├── custom-environment-variables.ts ├── default.ts └── production.ts ├── package.json ├── plopfile.mjs ├── src ├── app.ts ├── controller │ ├── auth.controller.ts │ └── user.controller.ts ├── middleware │ ├── deserializeUser.ts │ ├── requireUser.ts │ └── validateResource.ts ├── model │ ├── session.model.ts │ └── user.model.ts ├── routes │ ├── auth.routes.ts │ ├── index.ts │ └── user.routes.ts ├── schema │ ├── auth.schema.ts │ └── user.schema.ts ├── service │ ├── auth.service.ts │ └── user.service.ts └── utils │ ├── connectToDb.ts │ ├── jwt.ts │ ├── logger.ts │ └── mailer.ts ├── templates ├── controller.template.hbs ├── model.template.hbs └── service.template.hbs ├── tsconfig.json └── yarn.lock /.env: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TomDoesTech/auth-api-tutorial/HEAD/.env -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules -------------------------------------------------------------------------------- /Auth API.postman_collection.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TomDoesTech/auth-api-tutorial/HEAD/Auth API.postman_collection.json -------------------------------------------------------------------------------- /NOTES.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TomDoesTech/auth-api-tutorial/HEAD/NOTES.md -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TomDoesTech/auth-api-tutorial/HEAD/README.md -------------------------------------------------------------------------------- /config/custom-environment-variables.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TomDoesTech/auth-api-tutorial/HEAD/config/custom-environment-variables.ts -------------------------------------------------------------------------------- /config/default.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TomDoesTech/auth-api-tutorial/HEAD/config/default.ts -------------------------------------------------------------------------------- /config/production.ts: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TomDoesTech/auth-api-tutorial/HEAD/package.json -------------------------------------------------------------------------------- /plopfile.mjs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TomDoesTech/auth-api-tutorial/HEAD/plopfile.mjs -------------------------------------------------------------------------------- /src/app.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TomDoesTech/auth-api-tutorial/HEAD/src/app.ts -------------------------------------------------------------------------------- /src/controller/auth.controller.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TomDoesTech/auth-api-tutorial/HEAD/src/controller/auth.controller.ts -------------------------------------------------------------------------------- /src/controller/user.controller.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TomDoesTech/auth-api-tutorial/HEAD/src/controller/user.controller.ts -------------------------------------------------------------------------------- /src/middleware/deserializeUser.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TomDoesTech/auth-api-tutorial/HEAD/src/middleware/deserializeUser.ts -------------------------------------------------------------------------------- /src/middleware/requireUser.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TomDoesTech/auth-api-tutorial/HEAD/src/middleware/requireUser.ts -------------------------------------------------------------------------------- /src/middleware/validateResource.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TomDoesTech/auth-api-tutorial/HEAD/src/middleware/validateResource.ts -------------------------------------------------------------------------------- /src/model/session.model.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TomDoesTech/auth-api-tutorial/HEAD/src/model/session.model.ts -------------------------------------------------------------------------------- /src/model/user.model.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TomDoesTech/auth-api-tutorial/HEAD/src/model/user.model.ts -------------------------------------------------------------------------------- /src/routes/auth.routes.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TomDoesTech/auth-api-tutorial/HEAD/src/routes/auth.routes.ts -------------------------------------------------------------------------------- /src/routes/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TomDoesTech/auth-api-tutorial/HEAD/src/routes/index.ts -------------------------------------------------------------------------------- /src/routes/user.routes.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TomDoesTech/auth-api-tutorial/HEAD/src/routes/user.routes.ts -------------------------------------------------------------------------------- /src/schema/auth.schema.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TomDoesTech/auth-api-tutorial/HEAD/src/schema/auth.schema.ts -------------------------------------------------------------------------------- /src/schema/user.schema.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TomDoesTech/auth-api-tutorial/HEAD/src/schema/user.schema.ts -------------------------------------------------------------------------------- /src/service/auth.service.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TomDoesTech/auth-api-tutorial/HEAD/src/service/auth.service.ts -------------------------------------------------------------------------------- /src/service/user.service.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TomDoesTech/auth-api-tutorial/HEAD/src/service/user.service.ts -------------------------------------------------------------------------------- /src/utils/connectToDb.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TomDoesTech/auth-api-tutorial/HEAD/src/utils/connectToDb.ts -------------------------------------------------------------------------------- /src/utils/jwt.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TomDoesTech/auth-api-tutorial/HEAD/src/utils/jwt.ts -------------------------------------------------------------------------------- /src/utils/logger.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TomDoesTech/auth-api-tutorial/HEAD/src/utils/logger.ts -------------------------------------------------------------------------------- /src/utils/mailer.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TomDoesTech/auth-api-tutorial/HEAD/src/utils/mailer.ts -------------------------------------------------------------------------------- /templates/controller.template.hbs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TomDoesTech/auth-api-tutorial/HEAD/templates/controller.template.hbs -------------------------------------------------------------------------------- /templates/model.template.hbs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TomDoesTech/auth-api-tutorial/HEAD/templates/model.template.hbs -------------------------------------------------------------------------------- /templates/service.template.hbs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TomDoesTech/auth-api-tutorial/HEAD/templates/service.template.hbs -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TomDoesTech/auth-api-tutorial/HEAD/tsconfig.json -------------------------------------------------------------------------------- /yarn.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TomDoesTech/auth-api-tutorial/HEAD/yarn.lock --------------------------------------------------------------------------------