A backend API that allow system admins to manage employees and also allow employees update their profile
-
TRY IT! Swagger Documentation
- Super Admin Credentials
- Email:
[email protected]
- Password:
system.admin1
- Email:
- Super Admin Credentials
-
Uses queue
-
Uses Github Actions to test and deploy application
-
Uses Docker for deploy api to heroku
-
Uses MongoDB as the datastore
-
Uses IP to restrict employee access
-
Uses Mailtrap for trapping emails
Before you begin, ensure you have docker and docker-compose installed on your machine
# Clone this repository
$ git clone https://github.com/adesege/employee-api.git
# CD into the cloned repository
$ cd employee-api
# Copy and rename .env-sample and fill the environment varialbes accordingly
$ cp .env-sample .env
# Build and run docker containers. The container will install all dependencies and build the application
$ docker-compose up --build
API will be accessible via http://localhost:3500/api
Begin you begin, ensure you have
yarn
,nodejs >= 12
,redis
andmongodb
installed on your machine.
# Clone this repository
$ git clone https://github.com/adesege/employee-api.git
# CD into the cloned repository
$ cd employee-api
# Install dependencies
$ yarn install # or npm install
# Copy and rename .env-sample and fill the environment varialbes accordingly
$ cp .env-sample .env
# Build application
$ yarn build
# production
$ yarn start:prod # or
# development
$ yarn run start
# watch mode
$ yarn run start:dev
API will be accessible via http://localhost:3500/api
To test super admin endpoints locally, manually create a user then assign
system_admin
role to it.
# unit tests
$ npm run test
# e2e tests
$ npm run test:e2e
# unit test coverage
$ npm run test:cov
# e2e test coverage
$ npm run test:e2e --coverage