├── .env ├── .eslintrc.js ├── .gitignore ├── .prettierrc ├── README.md ├── docker-compose.yml ├── e2e ├── Conduit.postman_collection.json ├── README.md ├── run-api-tests.sh └── swagger.json ├── nest-cli.json ├── package.json ├── src ├── app.controller.ts ├── app.module.ts ├── app.service.ts ├── article │ ├── article.controller.ts │ ├── article.module.ts │ ├── article.service.ts │ └── comments.service.ts ├── auth │ ├── auth.controller.ts │ ├── auth.module.ts │ ├── auth.service.ts │ ├── jwt.strategy.ts │ ├── optional-auth.gaurd.ts │ └── user.decorator.ts ├── database-connection.service.ts ├── entities │ ├── abstract-entity.ts │ ├── article.entity.ts │ ├── comment.entity.ts │ ├── tag.entity.ts │ └── user.entity.ts ├── main.ts ├── models │ ├── article.models.ts │ ├── comment.models.ts │ ├── response.model.ts │ └── user.model.ts └── user │ ├── profile.controller.ts │ ├── user.controller.ts │ ├── user.module.ts │ └── user.service.ts ├── tsconfig.build.json ├── tsconfig.json └── yarn.lock /.env: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kelvin-mai/nestjs-blog/HEAD/.env -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kelvin-mai/nestjs-blog/HEAD/.eslintrc.js -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kelvin-mai/nestjs-blog/HEAD/.gitignore -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kelvin-mai/nestjs-blog/HEAD/.prettierrc -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kelvin-mai/nestjs-blog/HEAD/README.md -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kelvin-mai/nestjs-blog/HEAD/docker-compose.yml -------------------------------------------------------------------------------- /e2e/Conduit.postman_collection.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kelvin-mai/nestjs-blog/HEAD/e2e/Conduit.postman_collection.json -------------------------------------------------------------------------------- /e2e/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kelvin-mai/nestjs-blog/HEAD/e2e/README.md -------------------------------------------------------------------------------- /e2e/run-api-tests.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kelvin-mai/nestjs-blog/HEAD/e2e/run-api-tests.sh -------------------------------------------------------------------------------- /e2e/swagger.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kelvin-mai/nestjs-blog/HEAD/e2e/swagger.json -------------------------------------------------------------------------------- /nest-cli.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kelvin-mai/nestjs-blog/HEAD/nest-cli.json -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kelvin-mai/nestjs-blog/HEAD/package.json -------------------------------------------------------------------------------- /src/app.controller.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kelvin-mai/nestjs-blog/HEAD/src/app.controller.ts -------------------------------------------------------------------------------- /src/app.module.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kelvin-mai/nestjs-blog/HEAD/src/app.module.ts -------------------------------------------------------------------------------- /src/app.service.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kelvin-mai/nestjs-blog/HEAD/src/app.service.ts -------------------------------------------------------------------------------- /src/article/article.controller.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kelvin-mai/nestjs-blog/HEAD/src/article/article.controller.ts -------------------------------------------------------------------------------- /src/article/article.module.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kelvin-mai/nestjs-blog/HEAD/src/article/article.module.ts -------------------------------------------------------------------------------- /src/article/article.service.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kelvin-mai/nestjs-blog/HEAD/src/article/article.service.ts -------------------------------------------------------------------------------- /src/article/comments.service.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kelvin-mai/nestjs-blog/HEAD/src/article/comments.service.ts -------------------------------------------------------------------------------- /src/auth/auth.controller.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kelvin-mai/nestjs-blog/HEAD/src/auth/auth.controller.ts -------------------------------------------------------------------------------- /src/auth/auth.module.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kelvin-mai/nestjs-blog/HEAD/src/auth/auth.module.ts -------------------------------------------------------------------------------- /src/auth/auth.service.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kelvin-mai/nestjs-blog/HEAD/src/auth/auth.service.ts -------------------------------------------------------------------------------- /src/auth/jwt.strategy.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kelvin-mai/nestjs-blog/HEAD/src/auth/jwt.strategy.ts -------------------------------------------------------------------------------- /src/auth/optional-auth.gaurd.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kelvin-mai/nestjs-blog/HEAD/src/auth/optional-auth.gaurd.ts -------------------------------------------------------------------------------- /src/auth/user.decorator.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kelvin-mai/nestjs-blog/HEAD/src/auth/user.decorator.ts -------------------------------------------------------------------------------- /src/database-connection.service.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kelvin-mai/nestjs-blog/HEAD/src/database-connection.service.ts -------------------------------------------------------------------------------- /src/entities/abstract-entity.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kelvin-mai/nestjs-blog/HEAD/src/entities/abstract-entity.ts -------------------------------------------------------------------------------- /src/entities/article.entity.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kelvin-mai/nestjs-blog/HEAD/src/entities/article.entity.ts -------------------------------------------------------------------------------- /src/entities/comment.entity.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kelvin-mai/nestjs-blog/HEAD/src/entities/comment.entity.ts -------------------------------------------------------------------------------- /src/entities/tag.entity.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kelvin-mai/nestjs-blog/HEAD/src/entities/tag.entity.ts -------------------------------------------------------------------------------- /src/entities/user.entity.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kelvin-mai/nestjs-blog/HEAD/src/entities/user.entity.ts -------------------------------------------------------------------------------- /src/main.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kelvin-mai/nestjs-blog/HEAD/src/main.ts -------------------------------------------------------------------------------- /src/models/article.models.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kelvin-mai/nestjs-blog/HEAD/src/models/article.models.ts -------------------------------------------------------------------------------- /src/models/comment.models.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kelvin-mai/nestjs-blog/HEAD/src/models/comment.models.ts -------------------------------------------------------------------------------- /src/models/response.model.ts: -------------------------------------------------------------------------------- 1 | export type ResponseObject = { 2 | [P in K]: T; 3 | }; 4 | -------------------------------------------------------------------------------- /src/models/user.model.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kelvin-mai/nestjs-blog/HEAD/src/models/user.model.ts -------------------------------------------------------------------------------- /src/user/profile.controller.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kelvin-mai/nestjs-blog/HEAD/src/user/profile.controller.ts -------------------------------------------------------------------------------- /src/user/user.controller.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kelvin-mai/nestjs-blog/HEAD/src/user/user.controller.ts -------------------------------------------------------------------------------- /src/user/user.module.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kelvin-mai/nestjs-blog/HEAD/src/user/user.module.ts -------------------------------------------------------------------------------- /src/user/user.service.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kelvin-mai/nestjs-blog/HEAD/src/user/user.service.ts -------------------------------------------------------------------------------- /tsconfig.build.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kelvin-mai/nestjs-blog/HEAD/tsconfig.build.json -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kelvin-mai/nestjs-blog/HEAD/tsconfig.json -------------------------------------------------------------------------------- /yarn.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kelvin-mai/nestjs-blog/HEAD/yarn.lock --------------------------------------------------------------------------------