Documentation for all the REST endpoints will be found in the apidoc direcotry. The live version of this documentation can be viewed here.
To generate these documentation in your local - npm run apidoc
Documentation for all the source code will be found in the docs direcotry.
To generate these documentation in your local - npm run sourcedoc
This is a RESTful web service. So it includes only back-end parts.
As the scenario required that there will be multiple type of client agent like website, mobile application, offline, etc, this web service will be solely responsible to accepts their requests and reply them with appropriate responds and data.
This RESTful API have been developed keeping two things in mind:
- horizontal scalibility
- optimum usage of resource.
The application have been designed arround microservices. Each microservice is isolated and independent. In this scenario it's works almost like rest endpoints, with a few exceptions. All the microservices will be found in the src/service directory. Each service has its own directory, which includes the necessary files for the service like (model or service).
There are some resources like logger or database that is usefull for many parts of the applicaion. They have been kept in a common directory src/util.
- Node.js
- Typescript
- Tslint
- Express.js
- Cote.js
- MongoDB
- Mongoose
- Pm2
- Config
- Winston
- Faker
- Kue
- Typedoc
- Apidoc
- Mocha
- Chai
To install the project:
- Clone the repository by running:
git clone https://github.com/abdullahallmehedi/rooms-quickly.git
- Set env variable PORT.
- Set env variable DATABASE_URL.
- Set env variable REDIS_URL.
- Run -
yarn install
- Run -
npm run start
You can change the env variable/configuration from editing corresponding configuration files in the config directory.
To see the features of the application, the database needs to be seeded and some rooms needs to be activated.
Run - npm run seed
to seed the database. It will create some rooms and partners in the datbase. After saving those data it will print those information in the console. Information like id of rooms and partners are required to run features of the application.
Run - npm run activate <your_room_id>
to activate a room for auction. Replace <your_room_id>
with the id of the room you wanna activate.
Run - npm test
The application doesn't have 100% test coverage now. More tests will be added later