├── .eslintignore ├── .eslintrc.json ├── .gitignore ├── .husky ├── pre-commit └── pre-push ├── .lintstagedrc.json ├── jest-integration.config.js ├── jest-mongodb-config.js ├── jest-unit.config.js ├── jest.config.js ├── package.json ├── readme.md ├── reqs └── reqs.txt ├── src ├── doc │ └── finalize-doc.ts ├── entities │ ├── email-validator.ts │ ├── email.ts │ ├── errors │ │ ├── index.ts │ │ ├── invalid-email-error.ts │ │ ├── invalid-password-error.ts │ │ └── invalid-title-error.ts │ ├── index.ts │ ├── note.ts │ ├── password.ts │ ├── title.ts │ └── user.ts ├── external │ ├── encoder │ │ ├── bcrypt-encoder.ts │ │ └── index.ts │ ├── repositories │ │ └── mongodb │ │ │ ├── helpers │ │ │ ├── index.ts │ │ │ └── mongo-helper.ts │ │ │ ├── index.ts │ │ │ ├── mondodb-user-repository.ts │ │ │ └── mongodb-note-repository.ts │ └── token-manager │ │ ├── index.ts │ │ └── jwt-token-manager.ts ├── main │ ├── adapters │ │ ├── express-middleware-adapter.ts │ │ ├── express-route-adapter.ts │ │ └── index.ts │ ├── config │ │ ├── app.ts │ │ ├── setup-doc-generation.ts │ │ ├── setup-middleware.ts │ │ └── setup-routes.ts │ ├── factories │ │ ├── authentication-middleware.ts │ │ ├── create-note-controller.ts │ │ ├── encoder.ts │ │ ├── index.ts │ │ ├── load-notes-controller.ts │ │ ├── note-repository.ts │ │ ├── remove-note-controller.ts │ │ ├── sign-in-controller.ts │ │ ├── sign-up-controller.ts │ │ ├── token-manager.ts │ │ ├── update-note-controller.ts │ │ └── user-repository.ts │ ├── middleware │ │ ├── authentication.ts │ │ ├── body-parser.ts │ │ ├── content-type.ts │ │ ├── cors.ts │ │ └── index.ts │ └── server.ts ├── presentation │ ├── controllers │ │ ├── create-note.ts │ │ ├── errors │ │ │ ├── index.ts │ │ │ └── missing-param-error.ts │ │ ├── index.ts │ │ ├── load-notes.ts │ │ ├── ports │ │ │ ├── controller-operation.ts │ │ │ ├── http-request.ts │ │ │ ├── http-response.ts │ │ │ └── index.ts │ │ ├── remove-note.ts │ │ ├── sign-in.ts │ │ ├── sign-up.ts │ │ ├── update-note.ts │ │ ├── util │ │ │ ├── http-helper.ts │ │ │ └── index.ts │ │ └── web-controller.ts │ └── middleware │ │ ├── authentication.ts │ │ ├── index.ts │ │ └── ports │ │ ├── index.ts │ │ └── middleware.ts ├── shared │ ├── either.ts │ └── index.ts └── use-cases │ ├── authentication │ ├── custom-authentication.ts │ ├── errors │ │ ├── index.ts │ │ ├── user-not-found-error.ts │ │ └── wrong-password-error.ts │ ├── index.ts │ └── ports │ │ ├── authentication-service.ts │ │ ├── index.ts │ │ └── token-manager.ts │ ├── create-note │ ├── create-note.ts │ ├── errors │ │ ├── existing-title-error.ts │ │ ├── index.ts │ │ └── invalid-owner-error.ts │ └── index.ts │ ├── load-notes │ ├── index.ts │ └── load-notes.ts │ ├── ports │ ├── encoder.ts │ ├── index.ts │ ├── note-data.ts │ ├── note-repository.ts │ ├── use-case.ts │ ├── user-data.ts │ └── user-repository.ts │ ├── remove-note │ ├── errors │ │ ├── index.ts │ │ └── unexisting-note-error.ts │ ├── index.ts │ └── remove-note.ts │ ├── sign-in │ ├── index.ts │ └── sign-in.ts │ ├── sign-up │ ├── errors │ │ ├── existing-user-error.ts │ │ └── index.ts │ ├── index.ts │ └── sign-up.ts │ └── update-note │ ├── index.ts │ └── update-note.ts ├── test ├── builders │ ├── index.ts │ ├── note-builder.ts │ └── user-builder.ts ├── doubles │ ├── authentication │ │ ├── authentication-stub.ts │ │ ├── fake-token-manager.ts │ │ └── index.ts │ ├── encoder │ │ ├── fake-encoder.ts │ │ └── index.ts │ ├── repositories │ │ ├── in-memory-note-repository.ts │ │ ├── in-memory-user-repository.ts │ │ └── index.ts │ └── usecases │ │ ├── error-throwing-use-case-stub.ts │ │ └── index.ts ├── entities │ ├── email-validation.spec.ts │ ├── note.spec.ts │ └── user.spec.ts ├── external │ ├── encoder │ │ └── bcrypt-encoder.spec.ts │ ├── repositories │ │ └── mongodb │ │ │ ├── mongodb-note-repository.spec.ts │ │ │ └── mongodb-user-repository.spec.ts │ └── token-manager │ │ └── jwt-token-manager.spec.ts ├── main │ ├── middleware │ │ ├── body-parser.test.ts │ │ ├── content-type.test.ts │ │ └── cors.test.ts │ └── routes │ │ ├── create-note.test.ts │ │ ├── load-notes.test.ts │ │ ├── remove-note.test.ts │ │ ├── sign-in-route.test.ts │ │ ├── sign-up-route.test.ts │ │ └── update-note.test.ts ├── presentation │ ├── controllers │ │ ├── create-note.spec.ts │ │ ├── load-notes.spec.ts │ │ ├── remove-note.spec.ts │ │ ├── sign-in.spec.ts │ │ ├── sign-up.spec.ts │ │ └── update-note.spec.ts │ └── middleware │ │ └── authentication.spec.ts └── use-cases │ ├── authentication │ ├── custom-authentication.spec.ts │ └── index.ts │ ├── create-note │ └── create-note.spec.ts │ ├── load-notes │ └── load-notes.spec.ts │ ├── remove-note │ └── remove-note.spec.ts │ ├── sign-in │ └── sign-in.spec.ts │ ├── sign-up │ └── sign-up.spec.ts │ └── update-note │ └── update-note.spec.ts ├── tsconfig-build.json └── tsconfig.json /.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/.eslintrc.json -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/.gitignore -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/.husky/pre-commit -------------------------------------------------------------------------------- /.husky/pre-push: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/.husky/pre-push -------------------------------------------------------------------------------- /.lintstagedrc.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/.lintstagedrc.json -------------------------------------------------------------------------------- /jest-integration.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/jest-integration.config.js -------------------------------------------------------------------------------- /jest-mongodb-config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/jest-mongodb-config.js -------------------------------------------------------------------------------- /jest-unit.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/jest-unit.config.js -------------------------------------------------------------------------------- /jest.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/jest.config.js -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/package.json -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/readme.md -------------------------------------------------------------------------------- /reqs/reqs.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/reqs/reqs.txt -------------------------------------------------------------------------------- /src/doc/finalize-doc.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/doc/finalize-doc.ts -------------------------------------------------------------------------------- /src/entities/email-validator.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/entities/email-validator.ts -------------------------------------------------------------------------------- /src/entities/email.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/entities/email.ts -------------------------------------------------------------------------------- /src/entities/errors/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/entities/errors/index.ts -------------------------------------------------------------------------------- /src/entities/errors/invalid-email-error.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/entities/errors/invalid-email-error.ts -------------------------------------------------------------------------------- /src/entities/errors/invalid-password-error.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/entities/errors/invalid-password-error.ts -------------------------------------------------------------------------------- /src/entities/errors/invalid-title-error.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/entities/errors/invalid-title-error.ts -------------------------------------------------------------------------------- /src/entities/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/entities/index.ts -------------------------------------------------------------------------------- /src/entities/note.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/entities/note.ts -------------------------------------------------------------------------------- /src/entities/password.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/entities/password.ts -------------------------------------------------------------------------------- /src/entities/title.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/entities/title.ts -------------------------------------------------------------------------------- /src/entities/user.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/entities/user.ts -------------------------------------------------------------------------------- /src/external/encoder/bcrypt-encoder.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/external/encoder/bcrypt-encoder.ts -------------------------------------------------------------------------------- /src/external/encoder/index.ts: -------------------------------------------------------------------------------- 1 | export * from './bcrypt-encoder' 2 | -------------------------------------------------------------------------------- /src/external/repositories/mongodb/helpers/index.ts: -------------------------------------------------------------------------------- 1 | export * from './mongo-helper' 2 | -------------------------------------------------------------------------------- /src/external/repositories/mongodb/helpers/mongo-helper.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/external/repositories/mongodb/helpers/mongo-helper.ts -------------------------------------------------------------------------------- /src/external/repositories/mongodb/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/external/repositories/mongodb/index.ts -------------------------------------------------------------------------------- /src/external/repositories/mongodb/mondodb-user-repository.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/external/repositories/mongodb/mondodb-user-repository.ts -------------------------------------------------------------------------------- /src/external/repositories/mongodb/mongodb-note-repository.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/external/repositories/mongodb/mongodb-note-repository.ts -------------------------------------------------------------------------------- /src/external/token-manager/index.ts: -------------------------------------------------------------------------------- 1 | export * from './jwt-token-manager' 2 | -------------------------------------------------------------------------------- /src/external/token-manager/jwt-token-manager.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/external/token-manager/jwt-token-manager.ts -------------------------------------------------------------------------------- /src/main/adapters/express-middleware-adapter.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/main/adapters/express-middleware-adapter.ts -------------------------------------------------------------------------------- /src/main/adapters/express-route-adapter.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/main/adapters/express-route-adapter.ts -------------------------------------------------------------------------------- /src/main/adapters/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/main/adapters/index.ts -------------------------------------------------------------------------------- /src/main/config/app.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/main/config/app.ts -------------------------------------------------------------------------------- /src/main/config/setup-doc-generation.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/main/config/setup-doc-generation.ts -------------------------------------------------------------------------------- /src/main/config/setup-middleware.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/main/config/setup-middleware.ts -------------------------------------------------------------------------------- /src/main/config/setup-routes.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/main/config/setup-routes.ts -------------------------------------------------------------------------------- /src/main/factories/authentication-middleware.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/main/factories/authentication-middleware.ts -------------------------------------------------------------------------------- /src/main/factories/create-note-controller.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/main/factories/create-note-controller.ts -------------------------------------------------------------------------------- /src/main/factories/encoder.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/main/factories/encoder.ts -------------------------------------------------------------------------------- /src/main/factories/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/main/factories/index.ts -------------------------------------------------------------------------------- /src/main/factories/load-notes-controller.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/main/factories/load-notes-controller.ts -------------------------------------------------------------------------------- /src/main/factories/note-repository.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/main/factories/note-repository.ts -------------------------------------------------------------------------------- /src/main/factories/remove-note-controller.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/main/factories/remove-note-controller.ts -------------------------------------------------------------------------------- /src/main/factories/sign-in-controller.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/main/factories/sign-in-controller.ts -------------------------------------------------------------------------------- /src/main/factories/sign-up-controller.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/main/factories/sign-up-controller.ts -------------------------------------------------------------------------------- /src/main/factories/token-manager.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/main/factories/token-manager.ts -------------------------------------------------------------------------------- /src/main/factories/update-note-controller.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/main/factories/update-note-controller.ts -------------------------------------------------------------------------------- /src/main/factories/user-repository.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/main/factories/user-repository.ts -------------------------------------------------------------------------------- /src/main/middleware/authentication.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/main/middleware/authentication.ts -------------------------------------------------------------------------------- /src/main/middleware/body-parser.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/main/middleware/body-parser.ts -------------------------------------------------------------------------------- /src/main/middleware/content-type.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/main/middleware/content-type.ts -------------------------------------------------------------------------------- /src/main/middleware/cors.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/main/middleware/cors.ts -------------------------------------------------------------------------------- /src/main/middleware/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/main/middleware/index.ts -------------------------------------------------------------------------------- /src/main/server.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/main/server.ts -------------------------------------------------------------------------------- /src/presentation/controllers/create-note.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/presentation/controllers/create-note.ts -------------------------------------------------------------------------------- /src/presentation/controllers/errors/index.ts: -------------------------------------------------------------------------------- 1 | export * from './missing-param-error' 2 | -------------------------------------------------------------------------------- /src/presentation/controllers/errors/missing-param-error.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/presentation/controllers/errors/missing-param-error.ts -------------------------------------------------------------------------------- /src/presentation/controllers/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/presentation/controllers/index.ts -------------------------------------------------------------------------------- /src/presentation/controllers/load-notes.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/presentation/controllers/load-notes.ts -------------------------------------------------------------------------------- /src/presentation/controllers/ports/controller-operation.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/presentation/controllers/ports/controller-operation.ts -------------------------------------------------------------------------------- /src/presentation/controllers/ports/http-request.ts: -------------------------------------------------------------------------------- 1 | export interface HttpRequest { 2 | body?: any 3 | } 4 | -------------------------------------------------------------------------------- /src/presentation/controllers/ports/http-response.ts: -------------------------------------------------------------------------------- 1 | export interface HttpResponse { 2 | statusCode: number 3 | body: any 4 | } 5 | -------------------------------------------------------------------------------- /src/presentation/controllers/ports/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/presentation/controllers/ports/index.ts -------------------------------------------------------------------------------- /src/presentation/controllers/remove-note.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/presentation/controllers/remove-note.ts -------------------------------------------------------------------------------- /src/presentation/controllers/sign-in.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/presentation/controllers/sign-in.ts -------------------------------------------------------------------------------- /src/presentation/controllers/sign-up.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/presentation/controllers/sign-up.ts -------------------------------------------------------------------------------- /src/presentation/controllers/update-note.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/presentation/controllers/update-note.ts -------------------------------------------------------------------------------- /src/presentation/controllers/util/http-helper.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/presentation/controllers/util/http-helper.ts -------------------------------------------------------------------------------- /src/presentation/controllers/util/index.ts: -------------------------------------------------------------------------------- 1 | export * from './http-helper' 2 | -------------------------------------------------------------------------------- /src/presentation/controllers/web-controller.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/presentation/controllers/web-controller.ts -------------------------------------------------------------------------------- /src/presentation/middleware/authentication.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/presentation/middleware/authentication.ts -------------------------------------------------------------------------------- /src/presentation/middleware/index.ts: -------------------------------------------------------------------------------- 1 | export * from './authentication' 2 | -------------------------------------------------------------------------------- /src/presentation/middleware/ports/index.ts: -------------------------------------------------------------------------------- 1 | export * from './middleware' 2 | -------------------------------------------------------------------------------- /src/presentation/middleware/ports/middleware.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/presentation/middleware/ports/middleware.ts -------------------------------------------------------------------------------- /src/shared/either.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/shared/either.ts -------------------------------------------------------------------------------- /src/shared/index.ts: -------------------------------------------------------------------------------- 1 | export * from './either' 2 | -------------------------------------------------------------------------------- /src/use-cases/authentication/custom-authentication.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/use-cases/authentication/custom-authentication.ts -------------------------------------------------------------------------------- /src/use-cases/authentication/errors/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/use-cases/authentication/errors/index.ts -------------------------------------------------------------------------------- /src/use-cases/authentication/errors/user-not-found-error.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/use-cases/authentication/errors/user-not-found-error.ts -------------------------------------------------------------------------------- /src/use-cases/authentication/errors/wrong-password-error.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/use-cases/authentication/errors/wrong-password-error.ts -------------------------------------------------------------------------------- /src/use-cases/authentication/index.ts: -------------------------------------------------------------------------------- 1 | export * from './custom-authentication' 2 | -------------------------------------------------------------------------------- /src/use-cases/authentication/ports/authentication-service.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/use-cases/authentication/ports/authentication-service.ts -------------------------------------------------------------------------------- /src/use-cases/authentication/ports/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/use-cases/authentication/ports/index.ts -------------------------------------------------------------------------------- /src/use-cases/authentication/ports/token-manager.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/use-cases/authentication/ports/token-manager.ts -------------------------------------------------------------------------------- /src/use-cases/create-note/create-note.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/use-cases/create-note/create-note.ts -------------------------------------------------------------------------------- /src/use-cases/create-note/errors/existing-title-error.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/use-cases/create-note/errors/existing-title-error.ts -------------------------------------------------------------------------------- /src/use-cases/create-note/errors/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/use-cases/create-note/errors/index.ts -------------------------------------------------------------------------------- /src/use-cases/create-note/errors/invalid-owner-error.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/use-cases/create-note/errors/invalid-owner-error.ts -------------------------------------------------------------------------------- /src/use-cases/create-note/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create-note' 2 | -------------------------------------------------------------------------------- /src/use-cases/load-notes/index.ts: -------------------------------------------------------------------------------- 1 | export * from './load-notes' 2 | -------------------------------------------------------------------------------- /src/use-cases/load-notes/load-notes.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/use-cases/load-notes/load-notes.ts -------------------------------------------------------------------------------- /src/use-cases/ports/encoder.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/use-cases/ports/encoder.ts -------------------------------------------------------------------------------- /src/use-cases/ports/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/use-cases/ports/index.ts -------------------------------------------------------------------------------- /src/use-cases/ports/note-data.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/use-cases/ports/note-data.ts -------------------------------------------------------------------------------- /src/use-cases/ports/note-repository.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/use-cases/ports/note-repository.ts -------------------------------------------------------------------------------- /src/use-cases/ports/use-case.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/use-cases/ports/use-case.ts -------------------------------------------------------------------------------- /src/use-cases/ports/user-data.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/use-cases/ports/user-data.ts -------------------------------------------------------------------------------- /src/use-cases/ports/user-repository.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/use-cases/ports/user-repository.ts -------------------------------------------------------------------------------- /src/use-cases/remove-note/errors/index.ts: -------------------------------------------------------------------------------- 1 | export * from './unexisting-note-error' 2 | -------------------------------------------------------------------------------- /src/use-cases/remove-note/errors/unexisting-note-error.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/use-cases/remove-note/errors/unexisting-note-error.ts -------------------------------------------------------------------------------- /src/use-cases/remove-note/index.ts: -------------------------------------------------------------------------------- 1 | export * from './remove-note' 2 | -------------------------------------------------------------------------------- /src/use-cases/remove-note/remove-note.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/use-cases/remove-note/remove-note.ts -------------------------------------------------------------------------------- /src/use-cases/sign-in/index.ts: -------------------------------------------------------------------------------- 1 | export * from './sign-in' 2 | -------------------------------------------------------------------------------- /src/use-cases/sign-in/sign-in.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/use-cases/sign-in/sign-in.ts -------------------------------------------------------------------------------- /src/use-cases/sign-up/errors/existing-user-error.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/use-cases/sign-up/errors/existing-user-error.ts -------------------------------------------------------------------------------- /src/use-cases/sign-up/errors/index.ts: -------------------------------------------------------------------------------- 1 | export * from './existing-user-error' 2 | -------------------------------------------------------------------------------- /src/use-cases/sign-up/index.ts: -------------------------------------------------------------------------------- 1 | export * from './sign-up' 2 | -------------------------------------------------------------------------------- /src/use-cases/sign-up/sign-up.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/use-cases/sign-up/sign-up.ts -------------------------------------------------------------------------------- /src/use-cases/update-note/index.ts: -------------------------------------------------------------------------------- 1 | export * from './update-note' 2 | -------------------------------------------------------------------------------- /src/use-cases/update-note/update-note.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/src/use-cases/update-note/update-note.ts -------------------------------------------------------------------------------- /test/builders/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/test/builders/index.ts -------------------------------------------------------------------------------- /test/builders/note-builder.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/test/builders/note-builder.ts -------------------------------------------------------------------------------- /test/builders/user-builder.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/test/builders/user-builder.ts -------------------------------------------------------------------------------- /test/doubles/authentication/authentication-stub.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/test/doubles/authentication/authentication-stub.ts -------------------------------------------------------------------------------- /test/doubles/authentication/fake-token-manager.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/test/doubles/authentication/fake-token-manager.ts -------------------------------------------------------------------------------- /test/doubles/authentication/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/test/doubles/authentication/index.ts -------------------------------------------------------------------------------- /test/doubles/encoder/fake-encoder.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/test/doubles/encoder/fake-encoder.ts -------------------------------------------------------------------------------- /test/doubles/encoder/index.ts: -------------------------------------------------------------------------------- 1 | export * from './fake-encoder' 2 | -------------------------------------------------------------------------------- /test/doubles/repositories/in-memory-note-repository.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/test/doubles/repositories/in-memory-note-repository.ts -------------------------------------------------------------------------------- /test/doubles/repositories/in-memory-user-repository.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/test/doubles/repositories/in-memory-user-repository.ts -------------------------------------------------------------------------------- /test/doubles/repositories/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/test/doubles/repositories/index.ts -------------------------------------------------------------------------------- /test/doubles/usecases/error-throwing-use-case-stub.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/test/doubles/usecases/error-throwing-use-case-stub.ts -------------------------------------------------------------------------------- /test/doubles/usecases/index.ts: -------------------------------------------------------------------------------- 1 | export * from './error-throwing-use-case-stub' 2 | -------------------------------------------------------------------------------- /test/entities/email-validation.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/test/entities/email-validation.spec.ts -------------------------------------------------------------------------------- /test/entities/note.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/test/entities/note.spec.ts -------------------------------------------------------------------------------- /test/entities/user.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/test/entities/user.spec.ts -------------------------------------------------------------------------------- /test/external/encoder/bcrypt-encoder.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/test/external/encoder/bcrypt-encoder.spec.ts -------------------------------------------------------------------------------- /test/external/repositories/mongodb/mongodb-note-repository.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/test/external/repositories/mongodb/mongodb-note-repository.spec.ts -------------------------------------------------------------------------------- /test/external/repositories/mongodb/mongodb-user-repository.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/test/external/repositories/mongodb/mongodb-user-repository.spec.ts -------------------------------------------------------------------------------- /test/external/token-manager/jwt-token-manager.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/test/external/token-manager/jwt-token-manager.spec.ts -------------------------------------------------------------------------------- /test/main/middleware/body-parser.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/test/main/middleware/body-parser.test.ts -------------------------------------------------------------------------------- /test/main/middleware/content-type.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/test/main/middleware/content-type.test.ts -------------------------------------------------------------------------------- /test/main/middleware/cors.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/test/main/middleware/cors.test.ts -------------------------------------------------------------------------------- /test/main/routes/create-note.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/test/main/routes/create-note.test.ts -------------------------------------------------------------------------------- /test/main/routes/load-notes.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/test/main/routes/load-notes.test.ts -------------------------------------------------------------------------------- /test/main/routes/remove-note.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/test/main/routes/remove-note.test.ts -------------------------------------------------------------------------------- /test/main/routes/sign-in-route.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/test/main/routes/sign-in-route.test.ts -------------------------------------------------------------------------------- /test/main/routes/sign-up-route.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/test/main/routes/sign-up-route.test.ts -------------------------------------------------------------------------------- /test/main/routes/update-note.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/test/main/routes/update-note.test.ts -------------------------------------------------------------------------------- /test/presentation/controllers/create-note.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/test/presentation/controllers/create-note.spec.ts -------------------------------------------------------------------------------- /test/presentation/controllers/load-notes.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/test/presentation/controllers/load-notes.spec.ts -------------------------------------------------------------------------------- /test/presentation/controllers/remove-note.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/test/presentation/controllers/remove-note.spec.ts -------------------------------------------------------------------------------- /test/presentation/controllers/sign-in.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/test/presentation/controllers/sign-in.spec.ts -------------------------------------------------------------------------------- /test/presentation/controllers/sign-up.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/test/presentation/controllers/sign-up.spec.ts -------------------------------------------------------------------------------- /test/presentation/controllers/update-note.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/test/presentation/controllers/update-note.spec.ts -------------------------------------------------------------------------------- /test/presentation/middleware/authentication.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/test/presentation/middleware/authentication.spec.ts -------------------------------------------------------------------------------- /test/use-cases/authentication/custom-authentication.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/test/use-cases/authentication/custom-authentication.spec.ts -------------------------------------------------------------------------------- /test/use-cases/authentication/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/test/use-cases/authentication/index.ts -------------------------------------------------------------------------------- /test/use-cases/create-note/create-note.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/test/use-cases/create-note/create-note.spec.ts -------------------------------------------------------------------------------- /test/use-cases/load-notes/load-notes.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/test/use-cases/load-notes/load-notes.spec.ts -------------------------------------------------------------------------------- /test/use-cases/remove-note/remove-note.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/test/use-cases/remove-note/remove-note.spec.ts -------------------------------------------------------------------------------- /test/use-cases/sign-in/sign-in.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/test/use-cases/sign-in/sign-in.spec.ts -------------------------------------------------------------------------------- /test/use-cases/sign-up/sign-up.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/test/use-cases/sign-up/sign-up.spec.ts -------------------------------------------------------------------------------- /test/use-cases/update-note/update-note.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/test/use-cases/update-note/update-note.spec.ts -------------------------------------------------------------------------------- /tsconfig-build.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/tsconfig-build.json -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/otaviolemos/thewisepad-core/HEAD/tsconfig.json --------------------------------------------------------------------------------