Tourify is a RESTful API designed for multi-operator tour management System. Operators can post and manage tours, while customers can browse, book, and review tours, Designed with readability, maintainability, and scalability in mind.
A live version of the API is hosted on an Azure Virtual Machine and is accessible at: https://tourify.belalmuhammad.me/api-docs
You can test the API with the following demo credentials:
Operator Account:
- Email: [email protected]
- Password: password
Customer Account:
- Email: [email protected]
- Password: password
Alternatively, feel free to create your own account. Note that email verification is required for new accounts.
- Architecture: RESTful API, MVC
- Backend: Node.js, Express.js, MongoDB
- Authentication: JWT, Role-based Access Control
- Email Service: SendGrid
- Testing: Vitest, Supertest, Postman
- Containerization: Docker, Docker Compose, Docker Hub
- Deployment:MongoDB Atlas, Azure Virtual Machine
- Image Storage: Cloudinary
- Server-sidr Rendering: Pug, HTML, CSS, JavaScript, maptiler
- Documentation: Postman, Swagger
- Authentication: Users can signup, verify email, resend verification email, login, logout, and reset password.
- Authorization: Users are assigned roles (customer, operator, admin) and can only access routes that are permitted for their role.
- RESTful API: Well-defined endpoints for CRUD operations on tours, users, reviews, and bookings.
- API Features: Pagination, Filtering, Sorting, Field Limiting, and Aliasing.
- Email Service: Users receive welcome emails and password reset emails.
- Image Upload: Operators can upload images for their profile.
Clone the repository
git cloneNavigate to the project directory
cd tourifyCreate a .env file in the root directory and add the following environment variables
# APPLICATION
NODE_ENV=production
PORT=443
# AUTHENTICATION
JWT_SECRET=<YOUR_JWT_SECRET>
JWT_EXPIRES_IN=90d
JWT_COOKIE_EXPIRES_IN=90
# DATABASE
DB_USERNAME=<DB_USERNAME>
DB_PASSWORD=<DB_PASSWORD>
DB_URI=<DB_URI>
# EMAIL
SENDER_NAME=noreply
SENDER_EMAIL=<YOUR_EMAIL>
EMAIL_HOST=<YOUR_EMAIL_HOST>
EMAIL_PORT=<YOUR_EMAIL_PORT>
EMAIL_USERNAME=<YOUR_EMAIL_USERNAME>
EMAIL_PASSWORD=<YOUR_EMAIL_PASSWORD>
# CLOUDINARY
CLOUDINARY_CLOUD_NAME=<YOUR_CLOUD_NAME>
CLOUDINARY_API_KEY=<YOUR_CLOUDINARY_API_KEY>
CLOUDINARY_API_SECRET=<YOUR_CLOUDINARY_API_SECRET>Build docker image and run the container
docker compose -f docker-compose.yml up -d --buildVisit http://localhost:443/api-docs in your browser