Service dedicated to the management of users: enrollment, unsubscription, modification and everything related to users of online course platforms.
├── app.js
├── application
│ ├── controllers
│ │ └── UserController.js
│ ├── logger.js
│ ├── serializers
│ │ └── UserSerializer.js
│ └── useCases
│ ├── CreateNewUser.js
│ ├── GetAllUsers.js
│ ├── GetUserById.js
│ ├── PatchUser.js
│ ├── RemoveAllUsers.js
│ ├── RemoveUser.js
│ └── UpdateUser.js
├── deploy
│ └── heroku-entrypoint.sh
├── docker-compose.yml
├── Dockerfile
├── domain
│ ├── UpdateUserSchema.json
│ ├── UserModel.js
│ ├── UserRepository.js
│ └── UserSchema.json
├── errors
│ ├── UnexpectedError.js
│ ├── UserAlreadyExists.js
│ └── UserNotFound.js
├── heroku.yml
├── index.js
├── infrastructure
│ ├── config
│ │ └── ServiceLocator.js
│ ├── db
│ │ ├── Database.js
│ │ └── Sequelize.js
│ └── routes
│ └── Users.js
├── jest.config.js
├── LICENSE
├── logs.log
├── monitoring
│ └── datadog.yml
├── package.json
├── package-lock.json
├── persistence
│ └── repositories
│ └── UserRepositoryPostgres.js
├── README.md
├── swagger.json
└── test
└── users.test.js
- NodeJS
- Express (as web framework for NodeJS applications)
- Sequelize (as an ORM for NodeJS)
- PostgreSQL (as relational database)
- Docker
- Docker-compose
To run this application you need to define the following environment variable:
USERSERVICE_APIKEY = YOUR_USERS_SERVICE_APIKEY
docker-compose up -d --build
This command deploys the service:
usersservice_web
: Web Serviceusersservice_db
: Data basepgadmin
: Data base admin
docker-compose stop
docker-compose down
docker-compose exec node npm run test
You can try it out at https://staging-users-service-v2.herokuapp.com/api-docs