├── .editorconfig ├── .env.example ├── .eslintignore ├── .eslintrc.json ├── .gitignore ├── .huskyrc.json ├── .lintstagedrc.json ├── .vscode └── launch.json ├── Insomnia.json ├── LICENSE ├── README.md ├── babel.config.js ├── commitlint.config.js ├── jest.config.js ├── ormconfig.js ├── package.json ├── prettier.config.js ├── src ├── @types │ ├── env.d.ts │ └── express.d.ts ├── config │ ├── auth.ts │ ├── cache.ts │ ├── mail.ts │ └── upload.ts ├── modules │ ├── appointments │ │ ├── dtos │ │ │ ├── ICreateAppointmentDTO.ts │ │ │ ├── IFindAllInDayFromProviderDTO.ts │ │ │ ├── IFindAllInMonthFromProviderDTO.ts │ │ │ └── IFindByDateDTO.ts │ │ ├── infra │ │ │ ├── http │ │ │ │ ├── controllers │ │ │ │ │ ├── AppointmentsController.ts │ │ │ │ │ ├── ProviderAppointmentsController.ts │ │ │ │ │ ├── ProviderDayAvailabilityController.ts │ │ │ │ │ ├── ProviderMonthAvailabilityController.ts │ │ │ │ │ └── ProvidersController.ts │ │ │ │ └── routes │ │ │ │ │ ├── appointments.routes.ts │ │ │ │ │ └── providers.routes.ts │ │ │ └── typeorm │ │ │ │ ├── entities │ │ │ │ └── Appointment.ts │ │ │ │ └── repositories │ │ │ │ └── AppointmentsRepository.ts │ │ ├── repositories │ │ │ ├── IAppointmentsRepository.ts │ │ │ └── fakes │ │ │ │ └── FakeAppointmentsRepository.ts │ │ └── services │ │ │ ├── CreateAppointmentService.spec.ts │ │ │ ├── CreateAppointmentService.ts │ │ │ ├── ListProviderAppointmentsService.spec.ts │ │ │ ├── ListProviderAppointmentsService.ts │ │ │ ├── ListProviderDayAvailabilityService.spec.ts │ │ │ ├── ListProviderDayAvailabilityService.ts │ │ │ ├── ListProviderMonthAvailability.spec.ts │ │ │ ├── ListProviderMonthAvailabilityService.ts │ │ │ ├── ListProvidersService.spec.ts │ │ │ └── ListProvidersService.ts │ ├── notifications │ │ ├── dtos │ │ │ └── ICreateNotificationDTO.ts │ │ ├── infra │ │ │ └── typeorm │ │ │ │ ├── repositories │ │ │ │ └── NotificationsRepository.ts │ │ │ │ └── schemas │ │ │ │ └── Notification.ts │ │ └── repositories │ │ │ ├── INotificationsRepository.ts │ │ │ └── fakes │ │ │ └── FakeNotificationsRepository.ts │ └── users │ │ ├── dtos │ │ ├── ICreateUserDTO.ts │ │ └── IFindAllProvidersDTO.ts │ │ ├── infra │ │ ├── http │ │ │ ├── controllers │ │ │ │ ├── ForgotPasswordController.ts │ │ │ │ ├── ProfileController.ts │ │ │ │ ├── ResetPasswordController.ts │ │ │ │ ├── SessionsController.ts │ │ │ │ ├── UserAvatarController.ts │ │ │ │ └── UsersController.ts │ │ │ ├── middlewares │ │ │ │ └── ensureAuthenticated.ts │ │ │ └── routes │ │ │ │ ├── passwords.routes.ts │ │ │ │ ├── profiles.routes.ts │ │ │ │ ├── sessions.routes.ts │ │ │ │ └── users.routes.ts │ │ └── typeorm │ │ │ ├── entities │ │ │ ├── User.ts │ │ │ └── UserToken.ts │ │ │ └── repositories │ │ │ ├── UserTokensRepository.ts │ │ │ └── UsersRepository.ts │ │ ├── providers │ │ ├── HashProvider │ │ │ ├── fakes │ │ │ │ └── FakeHashProvider.ts │ │ │ ├── implementations │ │ │ │ └── BCryptHashProvider.ts │ │ │ └── models │ │ │ │ └── IHashProvider.ts │ │ └── index.ts │ │ ├── repositories │ │ ├── IUserTokensRepository.ts │ │ ├── IUsersRepository.ts │ │ └── fakes │ │ │ ├── FakeUserTokensRepository.ts │ │ │ └── FakeUsersRepository.ts │ │ ├── services │ │ ├── AuthenticateUserService.spec.ts │ │ ├── AuthenticateUserService.ts │ │ ├── CreateUserService.spec.ts │ │ ├── CreateUserService.ts │ │ ├── ResetPasswordService.spec.ts │ │ ├── ResetPasswordService.ts │ │ ├── SendForgotPasswordEmailService.spec.ts │ │ ├── SendForgotPasswordEmailService.ts │ │ ├── ShowProfileService.spec.ts │ │ ├── ShowProfileService.ts │ │ ├── UpdateProfileService.spec.ts │ │ ├── UpdateProfileService.ts │ │ ├── UpdateUserAvatarService.spec.ts │ │ └── UpdateUserAvatarService.ts │ │ └── views │ │ └── forgot_password.hbs └── shared │ ├── container │ ├── index.ts │ └── providers │ │ ├── CacheProvider │ │ ├── fakes │ │ │ └── FakeCacheProvider.ts │ │ ├── implementations │ │ │ └── RedisCacheProvider.ts │ │ ├── index.ts │ │ └── models │ │ │ └── ICacheProvider.ts │ │ ├── MailProvider │ │ ├── dtos │ │ │ └── ISendMailDTO.ts │ │ ├── fakes │ │ │ └── FakeMailProvider.ts │ │ ├── implementations │ │ │ ├── EtherealMailProvider.ts │ │ │ └── SESMailProvider.ts │ │ ├── index.ts │ │ └── models │ │ │ └── IMailProvider.ts │ │ ├── MailTemplateProvider │ │ ├── dtos │ │ │ └── IParseMailTemplateDTO.ts │ │ ├── fakes │ │ │ └── FakeMailTemplateProvider.ts │ │ ├── implementations │ │ │ └── HandlebarsMailTemplateProvider.ts │ │ ├── index.ts │ │ └── models │ │ │ └── IMailTemplateProvider.ts │ │ ├── StorageProvider │ │ ├── fakes │ │ │ └── FakeStorageProvider.ts │ │ ├── implementations │ │ │ ├── DiskStorageProvider.ts │ │ │ └── S3StorageProvider.ts │ │ ├── index.ts │ │ └── models │ │ │ └── IStorageProviders.ts │ │ └── index.ts │ ├── errors │ └── AppError.ts │ └── infra │ ├── http │ ├── middlewares │ │ └── RateLimiter.ts │ ├── routes │ │ └── index.ts │ └── server.ts │ └── typeorm │ ├── index.ts │ └── migrations │ ├── 1586803516725-CreateUsers.ts │ ├── 1586807241835-CreateAppointments.ts │ ├── 1586818064869-AddAvatarFieldToUsers.ts │ ├── 1588884027480-CreateUserTokens.ts │ └── 1588957767413-AddUserIdToAppointments.ts ├── tmp └── uploads │ └── .gitkeep ├── todo.md ├── tsconfig.json └── yarn.lock /.editorconfig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/.editorconfig -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/.env.example -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | /*.js 2 | /**/*.d.ts 3 | node_modules 4 | dist 5 | -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/.eslintrc.json -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/.gitignore -------------------------------------------------------------------------------- /.huskyrc.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/.huskyrc.json -------------------------------------------------------------------------------- /.lintstagedrc.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/.lintstagedrc.json -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/.vscode/launch.json -------------------------------------------------------------------------------- /Insomnia.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/Insomnia.json -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/README.md -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/babel.config.js -------------------------------------------------------------------------------- /commitlint.config.js: -------------------------------------------------------------------------------- 1 | module.exports = {extends: ['@commitlint/config-conventional']} 2 | -------------------------------------------------------------------------------- /jest.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/jest.config.js -------------------------------------------------------------------------------- /ormconfig.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/ormconfig.js -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/package.json -------------------------------------------------------------------------------- /prettier.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/prettier.config.js -------------------------------------------------------------------------------- /src/@types/env.d.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/@types/env.d.ts -------------------------------------------------------------------------------- /src/@types/express.d.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/@types/express.d.ts -------------------------------------------------------------------------------- /src/config/auth.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/config/auth.ts -------------------------------------------------------------------------------- /src/config/cache.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/config/cache.ts -------------------------------------------------------------------------------- /src/config/mail.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/config/mail.ts -------------------------------------------------------------------------------- /src/config/upload.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/config/upload.ts -------------------------------------------------------------------------------- /src/modules/appointments/dtos/ICreateAppointmentDTO.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/modules/appointments/dtos/ICreateAppointmentDTO.ts -------------------------------------------------------------------------------- /src/modules/appointments/dtos/IFindAllInDayFromProviderDTO.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/modules/appointments/dtos/IFindAllInDayFromProviderDTO.ts -------------------------------------------------------------------------------- /src/modules/appointments/dtos/IFindAllInMonthFromProviderDTO.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/modules/appointments/dtos/IFindAllInMonthFromProviderDTO.ts -------------------------------------------------------------------------------- /src/modules/appointments/dtos/IFindByDateDTO.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/modules/appointments/dtos/IFindByDateDTO.ts -------------------------------------------------------------------------------- /src/modules/appointments/infra/http/controllers/AppointmentsController.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/modules/appointments/infra/http/controllers/AppointmentsController.ts -------------------------------------------------------------------------------- /src/modules/appointments/infra/http/controllers/ProviderAppointmentsController.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/modules/appointments/infra/http/controllers/ProviderAppointmentsController.ts -------------------------------------------------------------------------------- /src/modules/appointments/infra/http/controllers/ProviderDayAvailabilityController.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/modules/appointments/infra/http/controllers/ProviderDayAvailabilityController.ts -------------------------------------------------------------------------------- /src/modules/appointments/infra/http/controllers/ProviderMonthAvailabilityController.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/modules/appointments/infra/http/controllers/ProviderMonthAvailabilityController.ts -------------------------------------------------------------------------------- /src/modules/appointments/infra/http/controllers/ProvidersController.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/modules/appointments/infra/http/controllers/ProvidersController.ts -------------------------------------------------------------------------------- /src/modules/appointments/infra/http/routes/appointments.routes.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/modules/appointments/infra/http/routes/appointments.routes.ts -------------------------------------------------------------------------------- /src/modules/appointments/infra/http/routes/providers.routes.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/modules/appointments/infra/http/routes/providers.routes.ts -------------------------------------------------------------------------------- /src/modules/appointments/infra/typeorm/entities/Appointment.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/modules/appointments/infra/typeorm/entities/Appointment.ts -------------------------------------------------------------------------------- /src/modules/appointments/infra/typeorm/repositories/AppointmentsRepository.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/modules/appointments/infra/typeorm/repositories/AppointmentsRepository.ts -------------------------------------------------------------------------------- /src/modules/appointments/repositories/IAppointmentsRepository.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/modules/appointments/repositories/IAppointmentsRepository.ts -------------------------------------------------------------------------------- /src/modules/appointments/repositories/fakes/FakeAppointmentsRepository.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/modules/appointments/repositories/fakes/FakeAppointmentsRepository.ts -------------------------------------------------------------------------------- /src/modules/appointments/services/CreateAppointmentService.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/modules/appointments/services/CreateAppointmentService.spec.ts -------------------------------------------------------------------------------- /src/modules/appointments/services/CreateAppointmentService.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/modules/appointments/services/CreateAppointmentService.ts -------------------------------------------------------------------------------- /src/modules/appointments/services/ListProviderAppointmentsService.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/modules/appointments/services/ListProviderAppointmentsService.spec.ts -------------------------------------------------------------------------------- /src/modules/appointments/services/ListProviderAppointmentsService.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/modules/appointments/services/ListProviderAppointmentsService.ts -------------------------------------------------------------------------------- /src/modules/appointments/services/ListProviderDayAvailabilityService.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/modules/appointments/services/ListProviderDayAvailabilityService.spec.ts -------------------------------------------------------------------------------- /src/modules/appointments/services/ListProviderDayAvailabilityService.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/modules/appointments/services/ListProviderDayAvailabilityService.ts -------------------------------------------------------------------------------- /src/modules/appointments/services/ListProviderMonthAvailability.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/modules/appointments/services/ListProviderMonthAvailability.spec.ts -------------------------------------------------------------------------------- /src/modules/appointments/services/ListProviderMonthAvailabilityService.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/modules/appointments/services/ListProviderMonthAvailabilityService.ts -------------------------------------------------------------------------------- /src/modules/appointments/services/ListProvidersService.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/modules/appointments/services/ListProvidersService.spec.ts -------------------------------------------------------------------------------- /src/modules/appointments/services/ListProvidersService.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/modules/appointments/services/ListProvidersService.ts -------------------------------------------------------------------------------- /src/modules/notifications/dtos/ICreateNotificationDTO.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/modules/notifications/dtos/ICreateNotificationDTO.ts -------------------------------------------------------------------------------- /src/modules/notifications/infra/typeorm/repositories/NotificationsRepository.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/modules/notifications/infra/typeorm/repositories/NotificationsRepository.ts -------------------------------------------------------------------------------- /src/modules/notifications/infra/typeorm/schemas/Notification.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/modules/notifications/infra/typeorm/schemas/Notification.ts -------------------------------------------------------------------------------- /src/modules/notifications/repositories/INotificationsRepository.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/modules/notifications/repositories/INotificationsRepository.ts -------------------------------------------------------------------------------- /src/modules/notifications/repositories/fakes/FakeNotificationsRepository.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/modules/notifications/repositories/fakes/FakeNotificationsRepository.ts -------------------------------------------------------------------------------- /src/modules/users/dtos/ICreateUserDTO.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/modules/users/dtos/ICreateUserDTO.ts -------------------------------------------------------------------------------- /src/modules/users/dtos/IFindAllProvidersDTO.ts: -------------------------------------------------------------------------------- 1 | export default interface IFindAllProvidersDTO { 2 | execept_user_id?: string; 3 | } 4 | -------------------------------------------------------------------------------- /src/modules/users/infra/http/controllers/ForgotPasswordController.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/modules/users/infra/http/controllers/ForgotPasswordController.ts -------------------------------------------------------------------------------- /src/modules/users/infra/http/controllers/ProfileController.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/modules/users/infra/http/controllers/ProfileController.ts -------------------------------------------------------------------------------- /src/modules/users/infra/http/controllers/ResetPasswordController.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/modules/users/infra/http/controllers/ResetPasswordController.ts -------------------------------------------------------------------------------- /src/modules/users/infra/http/controllers/SessionsController.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/modules/users/infra/http/controllers/SessionsController.ts -------------------------------------------------------------------------------- /src/modules/users/infra/http/controllers/UserAvatarController.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/modules/users/infra/http/controllers/UserAvatarController.ts -------------------------------------------------------------------------------- /src/modules/users/infra/http/controllers/UsersController.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/modules/users/infra/http/controllers/UsersController.ts -------------------------------------------------------------------------------- /src/modules/users/infra/http/middlewares/ensureAuthenticated.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/modules/users/infra/http/middlewares/ensureAuthenticated.ts -------------------------------------------------------------------------------- /src/modules/users/infra/http/routes/passwords.routes.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/modules/users/infra/http/routes/passwords.routes.ts -------------------------------------------------------------------------------- /src/modules/users/infra/http/routes/profiles.routes.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/modules/users/infra/http/routes/profiles.routes.ts -------------------------------------------------------------------------------- /src/modules/users/infra/http/routes/sessions.routes.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/modules/users/infra/http/routes/sessions.routes.ts -------------------------------------------------------------------------------- /src/modules/users/infra/http/routes/users.routes.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/modules/users/infra/http/routes/users.routes.ts -------------------------------------------------------------------------------- /src/modules/users/infra/typeorm/entities/User.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/modules/users/infra/typeorm/entities/User.ts -------------------------------------------------------------------------------- /src/modules/users/infra/typeorm/entities/UserToken.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/modules/users/infra/typeorm/entities/UserToken.ts -------------------------------------------------------------------------------- /src/modules/users/infra/typeorm/repositories/UserTokensRepository.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/modules/users/infra/typeorm/repositories/UserTokensRepository.ts -------------------------------------------------------------------------------- /src/modules/users/infra/typeorm/repositories/UsersRepository.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/modules/users/infra/typeorm/repositories/UsersRepository.ts -------------------------------------------------------------------------------- /src/modules/users/providers/HashProvider/fakes/FakeHashProvider.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/modules/users/providers/HashProvider/fakes/FakeHashProvider.ts -------------------------------------------------------------------------------- /src/modules/users/providers/HashProvider/implementations/BCryptHashProvider.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/modules/users/providers/HashProvider/implementations/BCryptHashProvider.ts -------------------------------------------------------------------------------- /src/modules/users/providers/HashProvider/models/IHashProvider.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/modules/users/providers/HashProvider/models/IHashProvider.ts -------------------------------------------------------------------------------- /src/modules/users/providers/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/modules/users/providers/index.ts -------------------------------------------------------------------------------- /src/modules/users/repositories/IUserTokensRepository.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/modules/users/repositories/IUserTokensRepository.ts -------------------------------------------------------------------------------- /src/modules/users/repositories/IUsersRepository.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/modules/users/repositories/IUsersRepository.ts -------------------------------------------------------------------------------- /src/modules/users/repositories/fakes/FakeUserTokensRepository.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/modules/users/repositories/fakes/FakeUserTokensRepository.ts -------------------------------------------------------------------------------- /src/modules/users/repositories/fakes/FakeUsersRepository.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/modules/users/repositories/fakes/FakeUsersRepository.ts -------------------------------------------------------------------------------- /src/modules/users/services/AuthenticateUserService.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/modules/users/services/AuthenticateUserService.spec.ts -------------------------------------------------------------------------------- /src/modules/users/services/AuthenticateUserService.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/modules/users/services/AuthenticateUserService.ts -------------------------------------------------------------------------------- /src/modules/users/services/CreateUserService.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/modules/users/services/CreateUserService.spec.ts -------------------------------------------------------------------------------- /src/modules/users/services/CreateUserService.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/modules/users/services/CreateUserService.ts -------------------------------------------------------------------------------- /src/modules/users/services/ResetPasswordService.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/modules/users/services/ResetPasswordService.spec.ts -------------------------------------------------------------------------------- /src/modules/users/services/ResetPasswordService.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/modules/users/services/ResetPasswordService.ts -------------------------------------------------------------------------------- /src/modules/users/services/SendForgotPasswordEmailService.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/modules/users/services/SendForgotPasswordEmailService.spec.ts -------------------------------------------------------------------------------- /src/modules/users/services/SendForgotPasswordEmailService.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/modules/users/services/SendForgotPasswordEmailService.ts -------------------------------------------------------------------------------- /src/modules/users/services/ShowProfileService.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/modules/users/services/ShowProfileService.spec.ts -------------------------------------------------------------------------------- /src/modules/users/services/ShowProfileService.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/modules/users/services/ShowProfileService.ts -------------------------------------------------------------------------------- /src/modules/users/services/UpdateProfileService.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/modules/users/services/UpdateProfileService.spec.ts -------------------------------------------------------------------------------- /src/modules/users/services/UpdateProfileService.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/modules/users/services/UpdateProfileService.ts -------------------------------------------------------------------------------- /src/modules/users/services/UpdateUserAvatarService.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/modules/users/services/UpdateUserAvatarService.spec.ts -------------------------------------------------------------------------------- /src/modules/users/services/UpdateUserAvatarService.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/modules/users/services/UpdateUserAvatarService.ts -------------------------------------------------------------------------------- /src/modules/users/views/forgot_password.hbs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/modules/users/views/forgot_password.hbs -------------------------------------------------------------------------------- /src/shared/container/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/shared/container/index.ts -------------------------------------------------------------------------------- /src/shared/container/providers/CacheProvider/fakes/FakeCacheProvider.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/shared/container/providers/CacheProvider/fakes/FakeCacheProvider.ts -------------------------------------------------------------------------------- /src/shared/container/providers/CacheProvider/implementations/RedisCacheProvider.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/shared/container/providers/CacheProvider/implementations/RedisCacheProvider.ts -------------------------------------------------------------------------------- /src/shared/container/providers/CacheProvider/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/shared/container/providers/CacheProvider/index.ts -------------------------------------------------------------------------------- /src/shared/container/providers/CacheProvider/models/ICacheProvider.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/shared/container/providers/CacheProvider/models/ICacheProvider.ts -------------------------------------------------------------------------------- /src/shared/container/providers/MailProvider/dtos/ISendMailDTO.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/shared/container/providers/MailProvider/dtos/ISendMailDTO.ts -------------------------------------------------------------------------------- /src/shared/container/providers/MailProvider/fakes/FakeMailProvider.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/shared/container/providers/MailProvider/fakes/FakeMailProvider.ts -------------------------------------------------------------------------------- /src/shared/container/providers/MailProvider/implementations/EtherealMailProvider.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/shared/container/providers/MailProvider/implementations/EtherealMailProvider.ts -------------------------------------------------------------------------------- /src/shared/container/providers/MailProvider/implementations/SESMailProvider.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/shared/container/providers/MailProvider/implementations/SESMailProvider.ts -------------------------------------------------------------------------------- /src/shared/container/providers/MailProvider/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/shared/container/providers/MailProvider/index.ts -------------------------------------------------------------------------------- /src/shared/container/providers/MailProvider/models/IMailProvider.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/shared/container/providers/MailProvider/models/IMailProvider.ts -------------------------------------------------------------------------------- /src/shared/container/providers/MailTemplateProvider/dtos/IParseMailTemplateDTO.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/shared/container/providers/MailTemplateProvider/dtos/IParseMailTemplateDTO.ts -------------------------------------------------------------------------------- /src/shared/container/providers/MailTemplateProvider/fakes/FakeMailTemplateProvider.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/shared/container/providers/MailTemplateProvider/fakes/FakeMailTemplateProvider.ts -------------------------------------------------------------------------------- /src/shared/container/providers/MailTemplateProvider/implementations/HandlebarsMailTemplateProvider.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/shared/container/providers/MailTemplateProvider/implementations/HandlebarsMailTemplateProvider.ts -------------------------------------------------------------------------------- /src/shared/container/providers/MailTemplateProvider/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/shared/container/providers/MailTemplateProvider/index.ts -------------------------------------------------------------------------------- /src/shared/container/providers/MailTemplateProvider/models/IMailTemplateProvider.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/shared/container/providers/MailTemplateProvider/models/IMailTemplateProvider.ts -------------------------------------------------------------------------------- /src/shared/container/providers/StorageProvider/fakes/FakeStorageProvider.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/shared/container/providers/StorageProvider/fakes/FakeStorageProvider.ts -------------------------------------------------------------------------------- /src/shared/container/providers/StorageProvider/implementations/DiskStorageProvider.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/shared/container/providers/StorageProvider/implementations/DiskStorageProvider.ts -------------------------------------------------------------------------------- /src/shared/container/providers/StorageProvider/implementations/S3StorageProvider.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/shared/container/providers/StorageProvider/implementations/S3StorageProvider.ts -------------------------------------------------------------------------------- /src/shared/container/providers/StorageProvider/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/shared/container/providers/StorageProvider/index.ts -------------------------------------------------------------------------------- /src/shared/container/providers/StorageProvider/models/IStorageProviders.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/shared/container/providers/StorageProvider/models/IStorageProviders.ts -------------------------------------------------------------------------------- /src/shared/container/providers/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/shared/container/providers/index.ts -------------------------------------------------------------------------------- /src/shared/errors/AppError.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/shared/errors/AppError.ts -------------------------------------------------------------------------------- /src/shared/infra/http/middlewares/RateLimiter.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/shared/infra/http/middlewares/RateLimiter.ts -------------------------------------------------------------------------------- /src/shared/infra/http/routes/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/shared/infra/http/routes/index.ts -------------------------------------------------------------------------------- /src/shared/infra/http/server.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/shared/infra/http/server.ts -------------------------------------------------------------------------------- /src/shared/infra/typeorm/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/shared/infra/typeorm/index.ts -------------------------------------------------------------------------------- /src/shared/infra/typeorm/migrations/1586803516725-CreateUsers.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/shared/infra/typeorm/migrations/1586803516725-CreateUsers.ts -------------------------------------------------------------------------------- /src/shared/infra/typeorm/migrations/1586807241835-CreateAppointments.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/shared/infra/typeorm/migrations/1586807241835-CreateAppointments.ts -------------------------------------------------------------------------------- /src/shared/infra/typeorm/migrations/1586818064869-AddAvatarFieldToUsers.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/shared/infra/typeorm/migrations/1586818064869-AddAvatarFieldToUsers.ts -------------------------------------------------------------------------------- /src/shared/infra/typeorm/migrations/1588884027480-CreateUserTokens.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/shared/infra/typeorm/migrations/1588884027480-CreateUserTokens.ts -------------------------------------------------------------------------------- /src/shared/infra/typeorm/migrations/1588957767413-AddUserIdToAppointments.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/src/shared/infra/typeorm/migrations/1588957767413-AddUserIdToAppointments.ts -------------------------------------------------------------------------------- /tmp/uploads/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /todo.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/todo.md -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/tsconfig.json -------------------------------------------------------------------------------- /yarn.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EliasGcf/gobarber-api/HEAD/yarn.lock --------------------------------------------------------------------------------