This is a Node.js-based API for house renting and listing. Users can post their houses for rent and list houses for sale. It is built using Express.js, MongoDB, Jest for testing, Docker for containerization, and other technologies. Below is a breakdown of the tech stack and a directory explanation.
- Server: Express.js
- Database: MongoDB
- Tests Framework: Jest
- Code Versioning: Git
- Code Repository: GitHub
- Container System: Docker, docker-compose
- Continuous Integration: GitHub Actions
- IDE: Visual Studio Code (VSCode)
- Contains the routes for both admin and user services.
- Services are defined here with a v1 versioning structure.
- Contains the business logic for processing endpoint requests.
- Contains the model files used in the application.
- Defines HTTP verbs (GET, PUT, POST, etc.) for each resource.
- Each verb for a route has a separate service file containing the business logic for that endpoint.
- Contains middleware functions used in the application.
- Contains utility feature-related files used app-wide.
- Examples include
emailer.js
,multer.js
, andemailtemplate generator
.
- Contains middleware for request validations, such as Joi validation and ID validators.
- Contains custom-made messages and configuration files.
- Contains HTML templates sent to users as part of the application.
- Clone the repository from GitHub.
- Install Node.js and npm if not already installed.
- Run
npm install
to install project dependencies. - Set up a MongoDB instance and configure the database connection.
- Run the application using
npm start
.
- Use Jest for running tests. Run
npm test
to execute the test suite.
- Docker and docker-compose files are provided for containerization. Use
docker build -t <container-name> .
ordocker-compose up
to run the application in a Docker container.
- GitHub Actions have been set up for continuous integration to automate testing and deployment processes.
Feel free to contribute to this project by opening issues or pull requests on the GitHub repository.
This project is licensed under the MIT License. Work still in progress