├── .dockerignore ├── .env.example ├── .github └── workflows │ ├── auto-merge-dependabot.yml │ └── continuous-integration-workflow.yml ├── .gitignore ├── .prettierrc ├── Dockerfile ├── LICENSE ├── __tests__ └── Unit │ └── CommonTest.ts ├── docker-compose.yml ├── fix-module-alias.js ├── jest.config.js ├── nodemon.json ├── package.json ├── readme.md ├── src ├── api │ ├── commands │ │ └── Common │ │ │ └── VersionCommand.ts │ ├── controllers │ │ ├── Auth │ │ │ ├── LoginController.ts │ │ │ └── RegisterController.ts │ │ ├── Chat │ │ │ └── ChatSocketController.ts │ │ └── Users │ │ │ └── UserController.ts │ ├── cron-jobs │ │ └── Common │ │ │ └── ExampleCronJob.ts │ ├── events │ │ └── Users │ │ │ └── UserEvent.ts │ ├── exceptions │ │ ├── Application │ │ │ └── ForbiddenException.ts │ │ ├── Auth │ │ │ └── InvalidCredentials.ts │ │ └── Users │ │ │ └── UserNotFoundException.ts │ ├── interfaces │ │ └── users │ │ │ └── LoggedUserInterface.ts │ ├── models │ │ └── Users │ │ │ ├── Role.ts │ │ │ └── User.ts │ ├── queue-jobs │ │ └── Users │ │ │ └── SendWelcomeMail.ts │ ├── repositories │ │ └── Users │ │ │ ├── RoleRepository.ts │ │ │ └── UserRepository.ts │ ├── requests │ │ ├── Auth │ │ │ ├── LoginRequest.ts │ │ │ └── RegisterRequest.ts │ │ └── Users │ │ │ ├── UserCreateRequest.ts │ │ │ └── UserUpdateRequest.ts │ ├── resolvers │ │ └── Users │ │ │ └── UserResolver.ts │ ├── services │ │ ├── Auth │ │ │ ├── LoginService.ts │ │ │ └── RegisterService.ts │ │ └── Users │ │ │ └── UserService.ts │ └── types │ │ └── Users │ │ └── Users.ts ├── config │ ├── app.ts │ ├── auth.ts │ ├── db.ts │ ├── filesystems.ts │ ├── hashing.ts │ └── mail.ts ├── database │ ├── factories │ │ └── UserFactory.ts │ ├── migrations │ │ ├── 1618771206804-CreateRolesTable.ts │ │ └── 1618771301779-CreateUsersTable.ts │ └── seeds │ │ ├── CreateRoles.ts │ │ └── CreateUsers.ts ├── decorators │ ├── EventDispatcher.ts │ ├── LoggedUser.ts │ └── SocketIoClient.ts ├── infrastructure │ ├── abstracts │ │ ├── ControllerBase.ts │ │ ├── EntityBase.ts │ │ ├── MailTemplateBase.ts │ │ ├── QueueJobBase.ts │ │ └── RepositoryBase.ts │ ├── middlewares │ │ ├── Application │ │ │ └── CustomErrorHandler.ts │ │ └── Auth │ │ │ ├── AuthCheck.ts │ │ │ └── HasRole.ts │ └── services │ │ ├── auth │ │ ├── AuthService.ts │ │ └── Providers │ │ │ └── JWTProvider.ts │ │ ├── hash │ │ ├── HashService.ts │ │ └── Providers │ │ │ └── BcryptProvider.ts │ │ ├── mail │ │ ├── Interfaces │ │ │ └── MailInterface.ts │ │ ├── MailGenerator.ts │ │ ├── MailService.ts │ │ ├── Providers │ │ │ └── SmtpProvider.ts │ │ └── Templates │ │ │ └── ForgotPasswordTemplate.ts │ │ └── storage │ │ ├── Providers │ │ └── LocalDisk.ts │ │ └── StorageService.ts ├── main.ts ├── public │ ├── assets │ │ └── .gitignore │ └── uploads │ │ └── .gitignore ├── utils │ ├── cli.ts │ ├── env.ts │ ├── fix-module-alias.ts │ ├── load-event-dispatcher.ts │ ├── load-helmet.ts │ └── to-bool.ts └── views │ └── chat │ └── index.html └── tsconfig.json /.dockerignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kutia-software-company/express-typescript-starter/HEAD/.dockerignore -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kutia-software-company/express-typescript-starter/HEAD/.env.example -------------------------------------------------------------------------------- /.github/workflows/auto-merge-dependabot.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kutia-software-company/express-typescript-starter/HEAD/.github/workflows/auto-merge-dependabot.yml -------------------------------------------------------------------------------- /.github/workflows/continuous-integration-workflow.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kutia-software-company/express-typescript-starter/HEAD/.github/workflows/continuous-integration-workflow.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | .env 4 | temp 5 | src/schema.gql 6 | .vscode 7 | .idea -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kutia-software-company/express-typescript-starter/HEAD/.prettierrc -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kutia-software-company/express-typescript-starter/HEAD/Dockerfile -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kutia-software-company/express-typescript-starter/HEAD/LICENSE -------------------------------------------------------------------------------- /__tests__/Unit/CommonTest.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kutia-software-company/express-typescript-starter/HEAD/__tests__/Unit/CommonTest.ts -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kutia-software-company/express-typescript-starter/HEAD/docker-compose.yml -------------------------------------------------------------------------------- /fix-module-alias.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kutia-software-company/express-typescript-starter/HEAD/fix-module-alias.js -------------------------------------------------------------------------------- /jest.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kutia-software-company/express-typescript-starter/HEAD/jest.config.js -------------------------------------------------------------------------------- /nodemon.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kutia-software-company/express-typescript-starter/HEAD/nodemon.json -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kutia-software-company/express-typescript-starter/HEAD/package.json -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kutia-software-company/express-typescript-starter/HEAD/readme.md -------------------------------------------------------------------------------- /src/api/commands/Common/VersionCommand.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kutia-software-company/express-typescript-starter/HEAD/src/api/commands/Common/VersionCommand.ts -------------------------------------------------------------------------------- /src/api/controllers/Auth/LoginController.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kutia-software-company/express-typescript-starter/HEAD/src/api/controllers/Auth/LoginController.ts -------------------------------------------------------------------------------- /src/api/controllers/Auth/RegisterController.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kutia-software-company/express-typescript-starter/HEAD/src/api/controllers/Auth/RegisterController.ts -------------------------------------------------------------------------------- /src/api/controllers/Chat/ChatSocketController.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kutia-software-company/express-typescript-starter/HEAD/src/api/controllers/Chat/ChatSocketController.ts -------------------------------------------------------------------------------- /src/api/controllers/Users/UserController.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kutia-software-company/express-typescript-starter/HEAD/src/api/controllers/Users/UserController.ts -------------------------------------------------------------------------------- /src/api/cron-jobs/Common/ExampleCronJob.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kutia-software-company/express-typescript-starter/HEAD/src/api/cron-jobs/Common/ExampleCronJob.ts -------------------------------------------------------------------------------- /src/api/events/Users/UserEvent.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kutia-software-company/express-typescript-starter/HEAD/src/api/events/Users/UserEvent.ts -------------------------------------------------------------------------------- /src/api/exceptions/Application/ForbiddenException.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kutia-software-company/express-typescript-starter/HEAD/src/api/exceptions/Application/ForbiddenException.ts -------------------------------------------------------------------------------- /src/api/exceptions/Auth/InvalidCredentials.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kutia-software-company/express-typescript-starter/HEAD/src/api/exceptions/Auth/InvalidCredentials.ts -------------------------------------------------------------------------------- /src/api/exceptions/Users/UserNotFoundException.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kutia-software-company/express-typescript-starter/HEAD/src/api/exceptions/Users/UserNotFoundException.ts -------------------------------------------------------------------------------- /src/api/interfaces/users/LoggedUserInterface.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kutia-software-company/express-typescript-starter/HEAD/src/api/interfaces/users/LoggedUserInterface.ts -------------------------------------------------------------------------------- /src/api/models/Users/Role.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kutia-software-company/express-typescript-starter/HEAD/src/api/models/Users/Role.ts -------------------------------------------------------------------------------- /src/api/models/Users/User.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kutia-software-company/express-typescript-starter/HEAD/src/api/models/Users/User.ts -------------------------------------------------------------------------------- /src/api/queue-jobs/Users/SendWelcomeMail.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kutia-software-company/express-typescript-starter/HEAD/src/api/queue-jobs/Users/SendWelcomeMail.ts -------------------------------------------------------------------------------- /src/api/repositories/Users/RoleRepository.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kutia-software-company/express-typescript-starter/HEAD/src/api/repositories/Users/RoleRepository.ts -------------------------------------------------------------------------------- /src/api/repositories/Users/UserRepository.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kutia-software-company/express-typescript-starter/HEAD/src/api/repositories/Users/UserRepository.ts -------------------------------------------------------------------------------- /src/api/requests/Auth/LoginRequest.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kutia-software-company/express-typescript-starter/HEAD/src/api/requests/Auth/LoginRequest.ts -------------------------------------------------------------------------------- /src/api/requests/Auth/RegisterRequest.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kutia-software-company/express-typescript-starter/HEAD/src/api/requests/Auth/RegisterRequest.ts -------------------------------------------------------------------------------- /src/api/requests/Users/UserCreateRequest.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kutia-software-company/express-typescript-starter/HEAD/src/api/requests/Users/UserCreateRequest.ts -------------------------------------------------------------------------------- /src/api/requests/Users/UserUpdateRequest.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kutia-software-company/express-typescript-starter/HEAD/src/api/requests/Users/UserUpdateRequest.ts -------------------------------------------------------------------------------- /src/api/resolvers/Users/UserResolver.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kutia-software-company/express-typescript-starter/HEAD/src/api/resolvers/Users/UserResolver.ts -------------------------------------------------------------------------------- /src/api/services/Auth/LoginService.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kutia-software-company/express-typescript-starter/HEAD/src/api/services/Auth/LoginService.ts -------------------------------------------------------------------------------- /src/api/services/Auth/RegisterService.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kutia-software-company/express-typescript-starter/HEAD/src/api/services/Auth/RegisterService.ts -------------------------------------------------------------------------------- /src/api/services/Users/UserService.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kutia-software-company/express-typescript-starter/HEAD/src/api/services/Users/UserService.ts -------------------------------------------------------------------------------- /src/api/types/Users/Users.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kutia-software-company/express-typescript-starter/HEAD/src/api/types/Users/Users.ts -------------------------------------------------------------------------------- /src/config/app.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kutia-software-company/express-typescript-starter/HEAD/src/config/app.ts -------------------------------------------------------------------------------- /src/config/auth.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kutia-software-company/express-typescript-starter/HEAD/src/config/auth.ts -------------------------------------------------------------------------------- /src/config/db.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kutia-software-company/express-typescript-starter/HEAD/src/config/db.ts -------------------------------------------------------------------------------- /src/config/filesystems.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kutia-software-company/express-typescript-starter/HEAD/src/config/filesystems.ts -------------------------------------------------------------------------------- /src/config/hashing.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kutia-software-company/express-typescript-starter/HEAD/src/config/hashing.ts -------------------------------------------------------------------------------- /src/config/mail.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kutia-software-company/express-typescript-starter/HEAD/src/config/mail.ts -------------------------------------------------------------------------------- /src/database/factories/UserFactory.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kutia-software-company/express-typescript-starter/HEAD/src/database/factories/UserFactory.ts -------------------------------------------------------------------------------- /src/database/migrations/1618771206804-CreateRolesTable.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kutia-software-company/express-typescript-starter/HEAD/src/database/migrations/1618771206804-CreateRolesTable.ts -------------------------------------------------------------------------------- /src/database/migrations/1618771301779-CreateUsersTable.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kutia-software-company/express-typescript-starter/HEAD/src/database/migrations/1618771301779-CreateUsersTable.ts -------------------------------------------------------------------------------- /src/database/seeds/CreateRoles.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kutia-software-company/express-typescript-starter/HEAD/src/database/seeds/CreateRoles.ts -------------------------------------------------------------------------------- /src/database/seeds/CreateUsers.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kutia-software-company/express-typescript-starter/HEAD/src/database/seeds/CreateUsers.ts -------------------------------------------------------------------------------- /src/decorators/EventDispatcher.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kutia-software-company/express-typescript-starter/HEAD/src/decorators/EventDispatcher.ts -------------------------------------------------------------------------------- /src/decorators/LoggedUser.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kutia-software-company/express-typescript-starter/HEAD/src/decorators/LoggedUser.ts -------------------------------------------------------------------------------- /src/decorators/SocketIoClient.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kutia-software-company/express-typescript-starter/HEAD/src/decorators/SocketIoClient.ts -------------------------------------------------------------------------------- /src/infrastructure/abstracts/ControllerBase.ts: -------------------------------------------------------------------------------- 1 | export abstract class ControllerBase { 2 | // 3 | } 4 | -------------------------------------------------------------------------------- /src/infrastructure/abstracts/EntityBase.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kutia-software-company/express-typescript-starter/HEAD/src/infrastructure/abstracts/EntityBase.ts -------------------------------------------------------------------------------- /src/infrastructure/abstracts/MailTemplateBase.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kutia-software-company/express-typescript-starter/HEAD/src/infrastructure/abstracts/MailTemplateBase.ts -------------------------------------------------------------------------------- /src/infrastructure/abstracts/QueueJobBase.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kutia-software-company/express-typescript-starter/HEAD/src/infrastructure/abstracts/QueueJobBase.ts -------------------------------------------------------------------------------- /src/infrastructure/abstracts/RepositoryBase.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kutia-software-company/express-typescript-starter/HEAD/src/infrastructure/abstracts/RepositoryBase.ts -------------------------------------------------------------------------------- /src/infrastructure/middlewares/Application/CustomErrorHandler.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kutia-software-company/express-typescript-starter/HEAD/src/infrastructure/middlewares/Application/CustomErrorHandler.ts -------------------------------------------------------------------------------- /src/infrastructure/middlewares/Auth/AuthCheck.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kutia-software-company/express-typescript-starter/HEAD/src/infrastructure/middlewares/Auth/AuthCheck.ts -------------------------------------------------------------------------------- /src/infrastructure/middlewares/Auth/HasRole.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kutia-software-company/express-typescript-starter/HEAD/src/infrastructure/middlewares/Auth/HasRole.ts -------------------------------------------------------------------------------- /src/infrastructure/services/auth/AuthService.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kutia-software-company/express-typescript-starter/HEAD/src/infrastructure/services/auth/AuthService.ts -------------------------------------------------------------------------------- /src/infrastructure/services/auth/Providers/JWTProvider.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kutia-software-company/express-typescript-starter/HEAD/src/infrastructure/services/auth/Providers/JWTProvider.ts -------------------------------------------------------------------------------- /src/infrastructure/services/hash/HashService.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kutia-software-company/express-typescript-starter/HEAD/src/infrastructure/services/hash/HashService.ts -------------------------------------------------------------------------------- /src/infrastructure/services/hash/Providers/BcryptProvider.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kutia-software-company/express-typescript-starter/HEAD/src/infrastructure/services/hash/Providers/BcryptProvider.ts -------------------------------------------------------------------------------- /src/infrastructure/services/mail/Interfaces/MailInterface.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kutia-software-company/express-typescript-starter/HEAD/src/infrastructure/services/mail/Interfaces/MailInterface.ts -------------------------------------------------------------------------------- /src/infrastructure/services/mail/MailGenerator.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kutia-software-company/express-typescript-starter/HEAD/src/infrastructure/services/mail/MailGenerator.ts -------------------------------------------------------------------------------- /src/infrastructure/services/mail/MailService.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kutia-software-company/express-typescript-starter/HEAD/src/infrastructure/services/mail/MailService.ts -------------------------------------------------------------------------------- /src/infrastructure/services/mail/Providers/SmtpProvider.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kutia-software-company/express-typescript-starter/HEAD/src/infrastructure/services/mail/Providers/SmtpProvider.ts -------------------------------------------------------------------------------- /src/infrastructure/services/mail/Templates/ForgotPasswordTemplate.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kutia-software-company/express-typescript-starter/HEAD/src/infrastructure/services/mail/Templates/ForgotPasswordTemplate.ts -------------------------------------------------------------------------------- /src/infrastructure/services/storage/Providers/LocalDisk.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kutia-software-company/express-typescript-starter/HEAD/src/infrastructure/services/storage/Providers/LocalDisk.ts -------------------------------------------------------------------------------- /src/infrastructure/services/storage/StorageService.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kutia-software-company/express-typescript-starter/HEAD/src/infrastructure/services/storage/StorageService.ts -------------------------------------------------------------------------------- /src/main.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kutia-software-company/express-typescript-starter/HEAD/src/main.ts -------------------------------------------------------------------------------- /src/public/assets/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore -------------------------------------------------------------------------------- /src/public/uploads/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore -------------------------------------------------------------------------------- /src/utils/cli.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kutia-software-company/express-typescript-starter/HEAD/src/utils/cli.ts -------------------------------------------------------------------------------- /src/utils/env.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kutia-software-company/express-typescript-starter/HEAD/src/utils/env.ts -------------------------------------------------------------------------------- /src/utils/fix-module-alias.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kutia-software-company/express-typescript-starter/HEAD/src/utils/fix-module-alias.ts -------------------------------------------------------------------------------- /src/utils/load-event-dispatcher.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kutia-software-company/express-typescript-starter/HEAD/src/utils/load-event-dispatcher.ts -------------------------------------------------------------------------------- /src/utils/load-helmet.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kutia-software-company/express-typescript-starter/HEAD/src/utils/load-helmet.ts -------------------------------------------------------------------------------- /src/utils/to-bool.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kutia-software-company/express-typescript-starter/HEAD/src/utils/to-bool.ts -------------------------------------------------------------------------------- /src/views/chat/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kutia-software-company/express-typescript-starter/HEAD/src/views/chat/index.html -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kutia-software-company/express-typescript-starter/HEAD/tsconfig.json --------------------------------------------------------------------------------