This is a microservices-based platform for Airbnb-like functionality, built using Node.js, TypeScript, and Express.
airbnb/
├── HotelService/ # Hotel management service
│ ├── src/ # Source code
│ ├── sequelize/ # Database schema and migrations
│ └── ...
├── BookingService/ # Booking management service
│ ├── src/ # Source code
│ ├── prisma/ # Database schema and migrations
│ └── ...
└── README.md # This file
- Manages hotel listings and availability
- Handles hotel details, pricing, and amenities
- Provides search and filtering capabilities
- Handles booking reservations
- Manages booking status and updates
- Processes payment information
- Handles guest information
- Language: TypeScript
- Framework: Express.js
- Database: PostgreSQL with Prisma ORM
- API Documentation: Swagger/OpenAPI
- Logging: Winston
- Testing: Jest
- Containerization: Docker
- Node.js (v16 or higher)
- PostgreSQL
- npm or yarn
- Docker (optional)
-
Clone the repository:
git clone https://github.com/Dibyendu-dev/airbnb.git cd airbnb
-
Install dependencies for each service:
# Install HotelService dependencies cd HotelService npm install # Install BookingService dependencies cd ../BookingService npm install
-
Set up environment variables:
- Copy
.env.example
to.env
in each service directory - Update the variables according to your environment
- Copy
-
Run database migrations:
# In each service directory npx prisma migrate dev
-
Start the services:
# Start HotelService cd HotelService npm run dev # Start BookingService cd ../BookingService npm run dev
Each service has its own API documentation. Access them at:
- HotelService:
http://localhost:3000/api-docs
- BookingService:
http://localhost:3001/api-docs
Run tests for each service:
# In each service directory
npm run test
The project uses GitHub Actions for continuous integration and deployment:
- Automated testing
- Code quality checks
- Docker image building
- Deployment to staging/production
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Dibyendu Das - Initial work
- Express.js team
- Prisma team
- TypeScript team
- All contributors and maintainers