├── .eslintrc.json ├── .github └── workflows │ └── ci.yml ├── .gitignore ├── .husky ├── .gitignore └── pre-commit ├── LICENSE ├── README.md ├── docker-compose.yml ├── docs ├── bundle.css ├── bundle.css.map ├── bundle.js ├── bundle.js.map ├── favicon.ico ├── index.html ├── insomnia.json └── logo.png ├── jest-mongodb-config.js ├── jest.config.ts ├── package.json ├── src ├── application │ ├── config │ │ └── pagination.ts │ ├── errors │ │ ├── CommentNotFoundError.ts │ │ ├── EmailInUseError.ts │ │ ├── ForbiddenError.ts │ │ ├── PostNotFoundError.ts │ │ └── UnauthorizedError.ts │ ├── interfaces │ │ ├── cryptography │ │ │ ├── HashComparer.ts │ │ │ ├── HashGenerator.ts │ │ │ ├── JWTGenerator.ts │ │ │ └── JWTVerifier.ts │ │ ├── repositories │ │ │ ├── authentication │ │ │ │ ├── CreateUserRepository.ts │ │ │ │ └── LoadUserByEmailRepository.ts │ │ │ ├── comments │ │ │ │ ├── CreateCommentRepository.ts │ │ │ │ ├── DeleteCommentRepository.ts │ │ │ │ ├── DeleteCommentsByPostIdRepository.ts │ │ │ │ ├── GetCommentByIdRepository.ts │ │ │ │ ├── GetLatestCommentsByPostIdRepository.ts │ │ │ │ ├── GetTotalCommentsByPostIdRepository.ts │ │ │ │ └── UpdateCommentRepository.ts │ │ │ └── posts │ │ │ │ ├── CreatePostRepository.ts │ │ │ │ ├── DeletePostRepository.ts │ │ │ │ ├── GetLatestPostsRepository.ts │ │ │ │ ├── GetPostByIdRepository.ts │ │ │ │ ├── UpdatePostRepository.ts │ │ │ │ └── UpdatePostTotalCommentsRepository.ts │ │ └── use-cases │ │ │ ├── UseCase.ts │ │ │ ├── authentication │ │ │ ├── AuthenticateInterface.ts │ │ │ ├── SignInInterface.ts │ │ │ └── SignUpInterface.ts │ │ │ ├── comments │ │ │ ├── CreateCommentInterface.ts │ │ │ ├── DeleteCommentInterface.ts │ │ │ ├── DeleteCommentsByPostIdInterface.ts │ │ │ ├── GetCommentByIdInterface.ts │ │ │ ├── GetLatestCommentsByPostIdInterface.ts │ │ │ └── UpdateCommentInterface.ts │ │ │ └── posts │ │ │ ├── CreatePostInterface.ts │ │ │ ├── DeletePostInterface.ts │ │ │ ├── GetLatestPostsInterface.ts │ │ │ ├── GetPostByIdInterface.ts │ │ │ ├── UpdatePostInterface.ts │ │ │ └── UpdatePostTotalCommentsInterface.ts │ └── use-cases │ │ ├── authentication │ │ ├── Authenticate.ts │ │ ├── SignIn.ts │ │ └── SignUp.ts │ │ ├── comments │ │ ├── CreateComment.ts │ │ ├── DeleteComment.ts │ │ ├── DeleteCommentsByPostId.ts │ │ ├── GetCommentById.ts │ │ ├── GetLatestCommentsByPostId.ts │ │ └── UpdateComment.ts │ │ └── posts │ │ ├── CreatePost.ts │ │ ├── DeletePost.ts │ │ ├── GetLatestPosts.ts │ │ ├── GetPostById.ts │ │ ├── UpdatePost.ts │ │ └── UpdatePostTotalComments.ts ├── domain │ └── entities │ │ ├── Comment.ts │ │ ├── Post.ts │ │ └── User.ts ├── infra │ ├── cryptography │ │ ├── BcryptAdapter.ts │ │ └── JWTAdapter.ts │ ├── db │ │ └── mongodb │ │ │ ├── helpers │ │ │ ├── db-connection.ts │ │ │ └── mapper.ts │ │ │ └── repositories │ │ │ ├── CommentRepository.ts │ │ │ ├── PostRepository.ts │ │ │ └── UserRepository.ts │ └── http │ │ ├── controllers │ │ ├── BaseController.ts │ │ ├── authentication │ │ │ ├── SignInController.ts │ │ │ └── SignUpController.ts │ │ ├── comments │ │ │ ├── CreateCommentController.ts │ │ │ ├── DeleteCommentController.ts │ │ │ ├── GetLatestCommentsByPostIdController.ts │ │ │ └── UpdateCommentController.ts │ │ └── posts │ │ │ ├── CreatePostController.ts │ │ │ ├── DeletePostController.ts │ │ │ ├── GetLatestPostsController.ts │ │ │ ├── GetPostByIdController.ts │ │ │ └── UpdatePostController.ts │ │ ├── errors │ │ ├── AuthTokenNotProvidedError.ts │ │ ├── InvalidAuthTokenError.ts │ │ ├── InvalidParamError.ts │ │ ├── MissingParamError.ts │ │ ├── PermissionError.ts │ │ └── ServerError.ts │ │ ├── helpers │ │ └── http.ts │ │ ├── interfaces │ │ ├── HttpRequest.ts │ │ ├── HttpResponse.ts │ │ └── Validation.ts │ │ ├── middlewares │ │ ├── BaseMiddleware.ts │ │ └── authentication │ │ │ └── AuthMiddleware.ts │ │ ├── validations │ │ ├── EmailValidation.ts │ │ ├── RequiredFieldValidation.ts │ │ ├── ValidationComposite.ts │ │ └── interfaces │ │ │ └── EmailValidator.ts │ │ └── validators │ │ └── EmailValidatorAdapter.ts └── main │ ├── adapters │ ├── express-middleware-adapter.ts │ └── express-route-adapter.ts │ ├── config │ ├── app.ts │ ├── custom-modules.d.ts │ ├── env.ts │ ├── middlewares.ts │ └── routes.ts │ ├── factories │ ├── controllers │ │ ├── authentication │ │ │ ├── sign-in │ │ │ │ ├── controller-factory.ts │ │ │ │ └── validation-factory.ts │ │ │ └── sign-up │ │ │ │ ├── controller-factory.ts │ │ │ │ └── validation-factory.ts │ │ ├── comments │ │ │ ├── create-comment │ │ │ │ ├── controller-factory.ts │ │ │ │ └── validation-factory.ts │ │ │ ├── delete-comment │ │ │ │ └── controller-factory.ts │ │ │ ├── get-latest-comments-by-post-id │ │ │ │ └── controller-factory.ts │ │ │ └── update-comment │ │ │ │ ├── controller-factory.ts │ │ │ │ └── validation-factory.ts │ │ └── posts │ │ │ ├── create-post │ │ │ ├── controller-factory.ts │ │ │ └── validation-factory.ts │ │ │ ├── delete-post │ │ │ └── controller-factory.ts │ │ │ ├── get-latest-posts │ │ │ └── controller-factory.ts │ │ │ ├── get-post-by-id │ │ │ └── controller-factory.ts │ │ │ └── update-post │ │ │ ├── controller-factory.ts │ │ │ └── validation-factory.ts │ ├── middlewares │ │ └── auth-middleware-factory.ts │ └── use-cases │ │ ├── authentication │ │ ├── authenticate-factory.ts │ │ ├── sign-in-factory.ts │ │ └── sign-up-factory.ts │ │ ├── comments │ │ ├── create-comment-factory.ts │ │ ├── delete-comment-factory.ts │ │ ├── delete-comments-by-post-id-factory.ts │ │ ├── get-comment-by-id-factory.ts │ │ ├── get-latest-comments-by-post-id-factory.ts │ │ └── update-comment-factory.ts │ │ └── posts │ │ ├── create-post-factory.ts │ │ ├── delete-post-factory.ts │ │ ├── get-latest-posts-factory.ts │ │ ├── get-post-by-id-factory.ts │ │ ├── update-post-factory.ts │ │ └── update-post-total-comments-factory.ts │ ├── middlewares │ ├── auth-middleware.ts │ ├── body-parser.ts │ ├── content-type.ts │ └── cors.ts │ ├── routes │ ├── authentication-routes.ts │ ├── comment-routes.ts │ └── post-routes.ts │ └── server.ts ├── tests ├── application │ ├── mocks │ │ ├── authentication │ │ │ └── use-cases.ts │ │ ├── comments │ │ │ └── use-cases.ts │ │ └── posts │ │ │ └── use-cases.ts │ └── use-cases │ │ └── posts │ │ ├── CreatePost.spec.ts │ │ ├── DeletePost.spec.ts │ │ ├── GetLatestPosts.spec.ts │ │ ├── GetPostById.spec.ts │ │ ├── UpdatePost.spec.ts │ │ └── UpdatePostTotalComments.spec.ts ├── domain │ └── mocks │ │ └── entities.ts ├── infra │ ├── db │ │ └── mongodb │ │ │ ├── helpers │ │ │ └── db-connection.spec.ts │ │ │ └── repositories │ │ │ └── PostRepository.spec.ts │ ├── http │ │ ├── controllers │ │ │ ├── BaseController.spec.ts │ │ │ └── posts │ │ │ │ ├── CreatePostController.spec.ts │ │ │ │ ├── DeletePostController.spec.ts │ │ │ │ ├── GetLatestPostsController.spec.ts │ │ │ │ ├── GetPostByIdController.spec.ts │ │ │ │ └── UpdatePostController.spec.ts │ │ ├── middlewares │ │ │ ├── BaseMiddleware.spec.ts │ │ │ └── authentication │ │ │ │ └── AuthMiddleware.spec.ts │ │ ├── validations │ │ │ ├── EmailValidation.spec.ts │ │ │ ├── RequiredFieldValidation.spec.ts │ │ │ └── ValidationComposite.spec.ts │ │ └── validators │ │ │ └── EmailValidatorAdapter.spec.ts │ └── mocks │ │ ├── comments │ │ └── repositories.ts │ │ ├── controllers.ts │ │ ├── middlewares.ts │ │ ├── posts │ │ └── repositories.ts │ │ └── validators.ts └── main │ └── routes │ └── authentication-routes.spec.ts ├── tsconfig-build.json └── tsconfig.json /.eslintrc.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/.eslintrc.json -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/.github/workflows/ci.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/.gitignore -------------------------------------------------------------------------------- /.husky/.gitignore: -------------------------------------------------------------------------------- 1 | _ 2 | -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | . "$(dirname "$0")/_/husky.sh" 3 | 4 | npx lint-staged 5 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/README.md -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/docker-compose.yml -------------------------------------------------------------------------------- /docs/bundle.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/docs/bundle.css -------------------------------------------------------------------------------- /docs/bundle.css.map: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/docs/bundle.css.map -------------------------------------------------------------------------------- /docs/bundle.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/docs/bundle.js -------------------------------------------------------------------------------- /docs/bundle.js.map: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/docs/bundle.js.map -------------------------------------------------------------------------------- /docs/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/docs/favicon.ico -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/docs/index.html -------------------------------------------------------------------------------- /docs/insomnia.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/docs/insomnia.json -------------------------------------------------------------------------------- /docs/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/docs/logo.png -------------------------------------------------------------------------------- /jest-mongodb-config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/jest-mongodb-config.js -------------------------------------------------------------------------------- /jest.config.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/jest.config.ts -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/package.json -------------------------------------------------------------------------------- /src/application/config/pagination.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/application/config/pagination.ts -------------------------------------------------------------------------------- /src/application/errors/CommentNotFoundError.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/application/errors/CommentNotFoundError.ts -------------------------------------------------------------------------------- /src/application/errors/EmailInUseError.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/application/errors/EmailInUseError.ts -------------------------------------------------------------------------------- /src/application/errors/ForbiddenError.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/application/errors/ForbiddenError.ts -------------------------------------------------------------------------------- /src/application/errors/PostNotFoundError.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/application/errors/PostNotFoundError.ts -------------------------------------------------------------------------------- /src/application/errors/UnauthorizedError.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/application/errors/UnauthorizedError.ts -------------------------------------------------------------------------------- /src/application/interfaces/cryptography/HashComparer.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/application/interfaces/cryptography/HashComparer.ts -------------------------------------------------------------------------------- /src/application/interfaces/cryptography/HashGenerator.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/application/interfaces/cryptography/HashGenerator.ts -------------------------------------------------------------------------------- /src/application/interfaces/cryptography/JWTGenerator.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/application/interfaces/cryptography/JWTGenerator.ts -------------------------------------------------------------------------------- /src/application/interfaces/cryptography/JWTVerifier.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/application/interfaces/cryptography/JWTVerifier.ts -------------------------------------------------------------------------------- /src/application/interfaces/repositories/authentication/CreateUserRepository.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/application/interfaces/repositories/authentication/CreateUserRepository.ts -------------------------------------------------------------------------------- /src/application/interfaces/repositories/authentication/LoadUserByEmailRepository.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/application/interfaces/repositories/authentication/LoadUserByEmailRepository.ts -------------------------------------------------------------------------------- /src/application/interfaces/repositories/comments/CreateCommentRepository.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/application/interfaces/repositories/comments/CreateCommentRepository.ts -------------------------------------------------------------------------------- /src/application/interfaces/repositories/comments/DeleteCommentRepository.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/application/interfaces/repositories/comments/DeleteCommentRepository.ts -------------------------------------------------------------------------------- /src/application/interfaces/repositories/comments/DeleteCommentsByPostIdRepository.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/application/interfaces/repositories/comments/DeleteCommentsByPostIdRepository.ts -------------------------------------------------------------------------------- /src/application/interfaces/repositories/comments/GetCommentByIdRepository.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/application/interfaces/repositories/comments/GetCommentByIdRepository.ts -------------------------------------------------------------------------------- /src/application/interfaces/repositories/comments/GetLatestCommentsByPostIdRepository.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/application/interfaces/repositories/comments/GetLatestCommentsByPostIdRepository.ts -------------------------------------------------------------------------------- /src/application/interfaces/repositories/comments/GetTotalCommentsByPostIdRepository.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/application/interfaces/repositories/comments/GetTotalCommentsByPostIdRepository.ts -------------------------------------------------------------------------------- /src/application/interfaces/repositories/comments/UpdateCommentRepository.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/application/interfaces/repositories/comments/UpdateCommentRepository.ts -------------------------------------------------------------------------------- /src/application/interfaces/repositories/posts/CreatePostRepository.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/application/interfaces/repositories/posts/CreatePostRepository.ts -------------------------------------------------------------------------------- /src/application/interfaces/repositories/posts/DeletePostRepository.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/application/interfaces/repositories/posts/DeletePostRepository.ts -------------------------------------------------------------------------------- /src/application/interfaces/repositories/posts/GetLatestPostsRepository.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/application/interfaces/repositories/posts/GetLatestPostsRepository.ts -------------------------------------------------------------------------------- /src/application/interfaces/repositories/posts/GetPostByIdRepository.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/application/interfaces/repositories/posts/GetPostByIdRepository.ts -------------------------------------------------------------------------------- /src/application/interfaces/repositories/posts/UpdatePostRepository.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/application/interfaces/repositories/posts/UpdatePostRepository.ts -------------------------------------------------------------------------------- /src/application/interfaces/repositories/posts/UpdatePostTotalCommentsRepository.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/application/interfaces/repositories/posts/UpdatePostTotalCommentsRepository.ts -------------------------------------------------------------------------------- /src/application/interfaces/use-cases/UseCase.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/application/interfaces/use-cases/UseCase.ts -------------------------------------------------------------------------------- /src/application/interfaces/use-cases/authentication/AuthenticateInterface.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/application/interfaces/use-cases/authentication/AuthenticateInterface.ts -------------------------------------------------------------------------------- /src/application/interfaces/use-cases/authentication/SignInInterface.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/application/interfaces/use-cases/authentication/SignInInterface.ts -------------------------------------------------------------------------------- /src/application/interfaces/use-cases/authentication/SignUpInterface.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/application/interfaces/use-cases/authentication/SignUpInterface.ts -------------------------------------------------------------------------------- /src/application/interfaces/use-cases/comments/CreateCommentInterface.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/application/interfaces/use-cases/comments/CreateCommentInterface.ts -------------------------------------------------------------------------------- /src/application/interfaces/use-cases/comments/DeleteCommentInterface.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/application/interfaces/use-cases/comments/DeleteCommentInterface.ts -------------------------------------------------------------------------------- /src/application/interfaces/use-cases/comments/DeleteCommentsByPostIdInterface.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/application/interfaces/use-cases/comments/DeleteCommentsByPostIdInterface.ts -------------------------------------------------------------------------------- /src/application/interfaces/use-cases/comments/GetCommentByIdInterface.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/application/interfaces/use-cases/comments/GetCommentByIdInterface.ts -------------------------------------------------------------------------------- /src/application/interfaces/use-cases/comments/GetLatestCommentsByPostIdInterface.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/application/interfaces/use-cases/comments/GetLatestCommentsByPostIdInterface.ts -------------------------------------------------------------------------------- /src/application/interfaces/use-cases/comments/UpdateCommentInterface.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/application/interfaces/use-cases/comments/UpdateCommentInterface.ts -------------------------------------------------------------------------------- /src/application/interfaces/use-cases/posts/CreatePostInterface.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/application/interfaces/use-cases/posts/CreatePostInterface.ts -------------------------------------------------------------------------------- /src/application/interfaces/use-cases/posts/DeletePostInterface.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/application/interfaces/use-cases/posts/DeletePostInterface.ts -------------------------------------------------------------------------------- /src/application/interfaces/use-cases/posts/GetLatestPostsInterface.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/application/interfaces/use-cases/posts/GetLatestPostsInterface.ts -------------------------------------------------------------------------------- /src/application/interfaces/use-cases/posts/GetPostByIdInterface.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/application/interfaces/use-cases/posts/GetPostByIdInterface.ts -------------------------------------------------------------------------------- /src/application/interfaces/use-cases/posts/UpdatePostInterface.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/application/interfaces/use-cases/posts/UpdatePostInterface.ts -------------------------------------------------------------------------------- /src/application/interfaces/use-cases/posts/UpdatePostTotalCommentsInterface.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/application/interfaces/use-cases/posts/UpdatePostTotalCommentsInterface.ts -------------------------------------------------------------------------------- /src/application/use-cases/authentication/Authenticate.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/application/use-cases/authentication/Authenticate.ts -------------------------------------------------------------------------------- /src/application/use-cases/authentication/SignIn.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/application/use-cases/authentication/SignIn.ts -------------------------------------------------------------------------------- /src/application/use-cases/authentication/SignUp.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/application/use-cases/authentication/SignUp.ts -------------------------------------------------------------------------------- /src/application/use-cases/comments/CreateComment.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/application/use-cases/comments/CreateComment.ts -------------------------------------------------------------------------------- /src/application/use-cases/comments/DeleteComment.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/application/use-cases/comments/DeleteComment.ts -------------------------------------------------------------------------------- /src/application/use-cases/comments/DeleteCommentsByPostId.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/application/use-cases/comments/DeleteCommentsByPostId.ts -------------------------------------------------------------------------------- /src/application/use-cases/comments/GetCommentById.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/application/use-cases/comments/GetCommentById.ts -------------------------------------------------------------------------------- /src/application/use-cases/comments/GetLatestCommentsByPostId.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/application/use-cases/comments/GetLatestCommentsByPostId.ts -------------------------------------------------------------------------------- /src/application/use-cases/comments/UpdateComment.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/application/use-cases/comments/UpdateComment.ts -------------------------------------------------------------------------------- /src/application/use-cases/posts/CreatePost.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/application/use-cases/posts/CreatePost.ts -------------------------------------------------------------------------------- /src/application/use-cases/posts/DeletePost.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/application/use-cases/posts/DeletePost.ts -------------------------------------------------------------------------------- /src/application/use-cases/posts/GetLatestPosts.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/application/use-cases/posts/GetLatestPosts.ts -------------------------------------------------------------------------------- /src/application/use-cases/posts/GetPostById.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/application/use-cases/posts/GetPostById.ts -------------------------------------------------------------------------------- /src/application/use-cases/posts/UpdatePost.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/application/use-cases/posts/UpdatePost.ts -------------------------------------------------------------------------------- /src/application/use-cases/posts/UpdatePostTotalComments.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/application/use-cases/posts/UpdatePostTotalComments.ts -------------------------------------------------------------------------------- /src/domain/entities/Comment.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/domain/entities/Comment.ts -------------------------------------------------------------------------------- /src/domain/entities/Post.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/domain/entities/Post.ts -------------------------------------------------------------------------------- /src/domain/entities/User.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/domain/entities/User.ts -------------------------------------------------------------------------------- /src/infra/cryptography/BcryptAdapter.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/infra/cryptography/BcryptAdapter.ts -------------------------------------------------------------------------------- /src/infra/cryptography/JWTAdapter.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/infra/cryptography/JWTAdapter.ts -------------------------------------------------------------------------------- /src/infra/db/mongodb/helpers/db-connection.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/infra/db/mongodb/helpers/db-connection.ts -------------------------------------------------------------------------------- /src/infra/db/mongodb/helpers/mapper.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/infra/db/mongodb/helpers/mapper.ts -------------------------------------------------------------------------------- /src/infra/db/mongodb/repositories/CommentRepository.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/infra/db/mongodb/repositories/CommentRepository.ts -------------------------------------------------------------------------------- /src/infra/db/mongodb/repositories/PostRepository.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/infra/db/mongodb/repositories/PostRepository.ts -------------------------------------------------------------------------------- /src/infra/db/mongodb/repositories/UserRepository.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/infra/db/mongodb/repositories/UserRepository.ts -------------------------------------------------------------------------------- /src/infra/http/controllers/BaseController.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/infra/http/controllers/BaseController.ts -------------------------------------------------------------------------------- /src/infra/http/controllers/authentication/SignInController.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/infra/http/controllers/authentication/SignInController.ts -------------------------------------------------------------------------------- /src/infra/http/controllers/authentication/SignUpController.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/infra/http/controllers/authentication/SignUpController.ts -------------------------------------------------------------------------------- /src/infra/http/controllers/comments/CreateCommentController.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/infra/http/controllers/comments/CreateCommentController.ts -------------------------------------------------------------------------------- /src/infra/http/controllers/comments/DeleteCommentController.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/infra/http/controllers/comments/DeleteCommentController.ts -------------------------------------------------------------------------------- /src/infra/http/controllers/comments/GetLatestCommentsByPostIdController.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/infra/http/controllers/comments/GetLatestCommentsByPostIdController.ts -------------------------------------------------------------------------------- /src/infra/http/controllers/comments/UpdateCommentController.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/infra/http/controllers/comments/UpdateCommentController.ts -------------------------------------------------------------------------------- /src/infra/http/controllers/posts/CreatePostController.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/infra/http/controllers/posts/CreatePostController.ts -------------------------------------------------------------------------------- /src/infra/http/controllers/posts/DeletePostController.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/infra/http/controllers/posts/DeletePostController.ts -------------------------------------------------------------------------------- /src/infra/http/controllers/posts/GetLatestPostsController.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/infra/http/controllers/posts/GetLatestPostsController.ts -------------------------------------------------------------------------------- /src/infra/http/controllers/posts/GetPostByIdController.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/infra/http/controllers/posts/GetPostByIdController.ts -------------------------------------------------------------------------------- /src/infra/http/controllers/posts/UpdatePostController.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/infra/http/controllers/posts/UpdatePostController.ts -------------------------------------------------------------------------------- /src/infra/http/errors/AuthTokenNotProvidedError.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/infra/http/errors/AuthTokenNotProvidedError.ts -------------------------------------------------------------------------------- /src/infra/http/errors/InvalidAuthTokenError.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/infra/http/errors/InvalidAuthTokenError.ts -------------------------------------------------------------------------------- /src/infra/http/errors/InvalidParamError.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/infra/http/errors/InvalidParamError.ts -------------------------------------------------------------------------------- /src/infra/http/errors/MissingParamError.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/infra/http/errors/MissingParamError.ts -------------------------------------------------------------------------------- /src/infra/http/errors/PermissionError.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/infra/http/errors/PermissionError.ts -------------------------------------------------------------------------------- /src/infra/http/errors/ServerError.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/infra/http/errors/ServerError.ts -------------------------------------------------------------------------------- /src/infra/http/helpers/http.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/infra/http/helpers/http.ts -------------------------------------------------------------------------------- /src/infra/http/interfaces/HttpRequest.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/infra/http/interfaces/HttpRequest.ts -------------------------------------------------------------------------------- /src/infra/http/interfaces/HttpResponse.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/infra/http/interfaces/HttpResponse.ts -------------------------------------------------------------------------------- /src/infra/http/interfaces/Validation.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/infra/http/interfaces/Validation.ts -------------------------------------------------------------------------------- /src/infra/http/middlewares/BaseMiddleware.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/infra/http/middlewares/BaseMiddleware.ts -------------------------------------------------------------------------------- /src/infra/http/middlewares/authentication/AuthMiddleware.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/infra/http/middlewares/authentication/AuthMiddleware.ts -------------------------------------------------------------------------------- /src/infra/http/validations/EmailValidation.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/infra/http/validations/EmailValidation.ts -------------------------------------------------------------------------------- /src/infra/http/validations/RequiredFieldValidation.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/infra/http/validations/RequiredFieldValidation.ts -------------------------------------------------------------------------------- /src/infra/http/validations/ValidationComposite.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/infra/http/validations/ValidationComposite.ts -------------------------------------------------------------------------------- /src/infra/http/validations/interfaces/EmailValidator.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/infra/http/validations/interfaces/EmailValidator.ts -------------------------------------------------------------------------------- /src/infra/http/validators/EmailValidatorAdapter.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/infra/http/validators/EmailValidatorAdapter.ts -------------------------------------------------------------------------------- /src/main/adapters/express-middleware-adapter.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/main/adapters/express-middleware-adapter.ts -------------------------------------------------------------------------------- /src/main/adapters/express-route-adapter.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/main/adapters/express-route-adapter.ts -------------------------------------------------------------------------------- /src/main/config/app.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/main/config/app.ts -------------------------------------------------------------------------------- /src/main/config/custom-modules.d.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/main/config/custom-modules.d.ts -------------------------------------------------------------------------------- /src/main/config/env.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/main/config/env.ts -------------------------------------------------------------------------------- /src/main/config/middlewares.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/main/config/middlewares.ts -------------------------------------------------------------------------------- /src/main/config/routes.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/main/config/routes.ts -------------------------------------------------------------------------------- /src/main/factories/controllers/authentication/sign-in/controller-factory.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/main/factories/controllers/authentication/sign-in/controller-factory.ts -------------------------------------------------------------------------------- /src/main/factories/controllers/authentication/sign-in/validation-factory.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/main/factories/controllers/authentication/sign-in/validation-factory.ts -------------------------------------------------------------------------------- /src/main/factories/controllers/authentication/sign-up/controller-factory.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/main/factories/controllers/authentication/sign-up/controller-factory.ts -------------------------------------------------------------------------------- /src/main/factories/controllers/authentication/sign-up/validation-factory.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/main/factories/controllers/authentication/sign-up/validation-factory.ts -------------------------------------------------------------------------------- /src/main/factories/controllers/comments/create-comment/controller-factory.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/main/factories/controllers/comments/create-comment/controller-factory.ts -------------------------------------------------------------------------------- /src/main/factories/controllers/comments/create-comment/validation-factory.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/main/factories/controllers/comments/create-comment/validation-factory.ts -------------------------------------------------------------------------------- /src/main/factories/controllers/comments/delete-comment/controller-factory.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/main/factories/controllers/comments/delete-comment/controller-factory.ts -------------------------------------------------------------------------------- /src/main/factories/controllers/comments/get-latest-comments-by-post-id/controller-factory.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/main/factories/controllers/comments/get-latest-comments-by-post-id/controller-factory.ts -------------------------------------------------------------------------------- /src/main/factories/controllers/comments/update-comment/controller-factory.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/main/factories/controllers/comments/update-comment/controller-factory.ts -------------------------------------------------------------------------------- /src/main/factories/controllers/comments/update-comment/validation-factory.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/main/factories/controllers/comments/update-comment/validation-factory.ts -------------------------------------------------------------------------------- /src/main/factories/controllers/posts/create-post/controller-factory.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/main/factories/controllers/posts/create-post/controller-factory.ts -------------------------------------------------------------------------------- /src/main/factories/controllers/posts/create-post/validation-factory.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/main/factories/controllers/posts/create-post/validation-factory.ts -------------------------------------------------------------------------------- /src/main/factories/controllers/posts/delete-post/controller-factory.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/main/factories/controllers/posts/delete-post/controller-factory.ts -------------------------------------------------------------------------------- /src/main/factories/controllers/posts/get-latest-posts/controller-factory.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/main/factories/controllers/posts/get-latest-posts/controller-factory.ts -------------------------------------------------------------------------------- /src/main/factories/controllers/posts/get-post-by-id/controller-factory.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/main/factories/controllers/posts/get-post-by-id/controller-factory.ts -------------------------------------------------------------------------------- /src/main/factories/controllers/posts/update-post/controller-factory.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/main/factories/controllers/posts/update-post/controller-factory.ts -------------------------------------------------------------------------------- /src/main/factories/controllers/posts/update-post/validation-factory.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/main/factories/controllers/posts/update-post/validation-factory.ts -------------------------------------------------------------------------------- /src/main/factories/middlewares/auth-middleware-factory.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/main/factories/middlewares/auth-middleware-factory.ts -------------------------------------------------------------------------------- /src/main/factories/use-cases/authentication/authenticate-factory.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/main/factories/use-cases/authentication/authenticate-factory.ts -------------------------------------------------------------------------------- /src/main/factories/use-cases/authentication/sign-in-factory.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/main/factories/use-cases/authentication/sign-in-factory.ts -------------------------------------------------------------------------------- /src/main/factories/use-cases/authentication/sign-up-factory.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/main/factories/use-cases/authentication/sign-up-factory.ts -------------------------------------------------------------------------------- /src/main/factories/use-cases/comments/create-comment-factory.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/main/factories/use-cases/comments/create-comment-factory.ts -------------------------------------------------------------------------------- /src/main/factories/use-cases/comments/delete-comment-factory.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/main/factories/use-cases/comments/delete-comment-factory.ts -------------------------------------------------------------------------------- /src/main/factories/use-cases/comments/delete-comments-by-post-id-factory.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/main/factories/use-cases/comments/delete-comments-by-post-id-factory.ts -------------------------------------------------------------------------------- /src/main/factories/use-cases/comments/get-comment-by-id-factory.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/main/factories/use-cases/comments/get-comment-by-id-factory.ts -------------------------------------------------------------------------------- /src/main/factories/use-cases/comments/get-latest-comments-by-post-id-factory.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/main/factories/use-cases/comments/get-latest-comments-by-post-id-factory.ts -------------------------------------------------------------------------------- /src/main/factories/use-cases/comments/update-comment-factory.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/main/factories/use-cases/comments/update-comment-factory.ts -------------------------------------------------------------------------------- /src/main/factories/use-cases/posts/create-post-factory.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/main/factories/use-cases/posts/create-post-factory.ts -------------------------------------------------------------------------------- /src/main/factories/use-cases/posts/delete-post-factory.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/main/factories/use-cases/posts/delete-post-factory.ts -------------------------------------------------------------------------------- /src/main/factories/use-cases/posts/get-latest-posts-factory.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/main/factories/use-cases/posts/get-latest-posts-factory.ts -------------------------------------------------------------------------------- /src/main/factories/use-cases/posts/get-post-by-id-factory.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/main/factories/use-cases/posts/get-post-by-id-factory.ts -------------------------------------------------------------------------------- /src/main/factories/use-cases/posts/update-post-factory.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/main/factories/use-cases/posts/update-post-factory.ts -------------------------------------------------------------------------------- /src/main/factories/use-cases/posts/update-post-total-comments-factory.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/main/factories/use-cases/posts/update-post-total-comments-factory.ts -------------------------------------------------------------------------------- /src/main/middlewares/auth-middleware.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/main/middlewares/auth-middleware.ts -------------------------------------------------------------------------------- /src/main/middlewares/body-parser.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/main/middlewares/body-parser.ts -------------------------------------------------------------------------------- /src/main/middlewares/content-type.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/main/middlewares/content-type.ts -------------------------------------------------------------------------------- /src/main/middlewares/cors.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/main/middlewares/cors.ts -------------------------------------------------------------------------------- /src/main/routes/authentication-routes.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/main/routes/authentication-routes.ts -------------------------------------------------------------------------------- /src/main/routes/comment-routes.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/main/routes/comment-routes.ts -------------------------------------------------------------------------------- /src/main/routes/post-routes.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/main/routes/post-routes.ts -------------------------------------------------------------------------------- /src/main/server.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/src/main/server.ts -------------------------------------------------------------------------------- /tests/application/mocks/authentication/use-cases.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/tests/application/mocks/authentication/use-cases.ts -------------------------------------------------------------------------------- /tests/application/mocks/comments/use-cases.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/tests/application/mocks/comments/use-cases.ts -------------------------------------------------------------------------------- /tests/application/mocks/posts/use-cases.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/tests/application/mocks/posts/use-cases.ts -------------------------------------------------------------------------------- /tests/application/use-cases/posts/CreatePost.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/tests/application/use-cases/posts/CreatePost.spec.ts -------------------------------------------------------------------------------- /tests/application/use-cases/posts/DeletePost.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/tests/application/use-cases/posts/DeletePost.spec.ts -------------------------------------------------------------------------------- /tests/application/use-cases/posts/GetLatestPosts.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/tests/application/use-cases/posts/GetLatestPosts.spec.ts -------------------------------------------------------------------------------- /tests/application/use-cases/posts/GetPostById.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/tests/application/use-cases/posts/GetPostById.spec.ts -------------------------------------------------------------------------------- /tests/application/use-cases/posts/UpdatePost.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/tests/application/use-cases/posts/UpdatePost.spec.ts -------------------------------------------------------------------------------- /tests/application/use-cases/posts/UpdatePostTotalComments.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/tests/application/use-cases/posts/UpdatePostTotalComments.spec.ts -------------------------------------------------------------------------------- /tests/domain/mocks/entities.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/tests/domain/mocks/entities.ts -------------------------------------------------------------------------------- /tests/infra/db/mongodb/helpers/db-connection.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/tests/infra/db/mongodb/helpers/db-connection.spec.ts -------------------------------------------------------------------------------- /tests/infra/db/mongodb/repositories/PostRepository.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/tests/infra/db/mongodb/repositories/PostRepository.spec.ts -------------------------------------------------------------------------------- /tests/infra/http/controllers/BaseController.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/tests/infra/http/controllers/BaseController.spec.ts -------------------------------------------------------------------------------- /tests/infra/http/controllers/posts/CreatePostController.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/tests/infra/http/controllers/posts/CreatePostController.spec.ts -------------------------------------------------------------------------------- /tests/infra/http/controllers/posts/DeletePostController.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/tests/infra/http/controllers/posts/DeletePostController.spec.ts -------------------------------------------------------------------------------- /tests/infra/http/controllers/posts/GetLatestPostsController.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/tests/infra/http/controllers/posts/GetLatestPostsController.spec.ts -------------------------------------------------------------------------------- /tests/infra/http/controllers/posts/GetPostByIdController.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/tests/infra/http/controllers/posts/GetPostByIdController.spec.ts -------------------------------------------------------------------------------- /tests/infra/http/controllers/posts/UpdatePostController.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/tests/infra/http/controllers/posts/UpdatePostController.spec.ts -------------------------------------------------------------------------------- /tests/infra/http/middlewares/BaseMiddleware.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/tests/infra/http/middlewares/BaseMiddleware.spec.ts -------------------------------------------------------------------------------- /tests/infra/http/middlewares/authentication/AuthMiddleware.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/tests/infra/http/middlewares/authentication/AuthMiddleware.spec.ts -------------------------------------------------------------------------------- /tests/infra/http/validations/EmailValidation.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/tests/infra/http/validations/EmailValidation.spec.ts -------------------------------------------------------------------------------- /tests/infra/http/validations/RequiredFieldValidation.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/tests/infra/http/validations/RequiredFieldValidation.spec.ts -------------------------------------------------------------------------------- /tests/infra/http/validations/ValidationComposite.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/tests/infra/http/validations/ValidationComposite.spec.ts -------------------------------------------------------------------------------- /tests/infra/http/validators/EmailValidatorAdapter.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/tests/infra/http/validators/EmailValidatorAdapter.spec.ts -------------------------------------------------------------------------------- /tests/infra/mocks/comments/repositories.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/tests/infra/mocks/comments/repositories.ts -------------------------------------------------------------------------------- /tests/infra/mocks/controllers.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/tests/infra/mocks/controllers.ts -------------------------------------------------------------------------------- /tests/infra/mocks/middlewares.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/tests/infra/mocks/middlewares.ts -------------------------------------------------------------------------------- /tests/infra/mocks/posts/repositories.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/tests/infra/mocks/posts/repositories.ts -------------------------------------------------------------------------------- /tests/infra/mocks/validators.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/tests/infra/mocks/validators.ts -------------------------------------------------------------------------------- /tests/main/routes/authentication-routes.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/tests/main/routes/authentication-routes.spec.ts -------------------------------------------------------------------------------- /tsconfig-build.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/tsconfig-build.json -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyarleniber/simple-blog-application-backend-challenge/HEAD/tsconfig.json --------------------------------------------------------------------------------