This is the backend API for StayHub, a platform for managing property rentals. This project is currently under development.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
- Clone the repository:
git clone https://github.com/GustavoMelloGit/stayhub-api
- Navigate to the project directory:
cd stayhub-api
- Start the application using Docker Compose:
docker compose up
- Run the database migrations:
docker-compose exec api bun run db:migrate
This will start the development server. The API will be available at http://localhost:3000
.
The project follows a clean architecture pattern, separating concerns into the following layers:
src/domain
: Contains the core business logic of the application, including entities and repository interfaces.src/application
: Contains the application-specific logic, such as use cases and data transfer objects.src/infra
: Contains the implementation details of the application, such as database repositories, web frameworks, and dependency injection.src/presentation
: Contains the API controllers, which handle incoming HTTP requests and call the appropriate use cases.
- Bun - JavaScript runtime and toolkit
- TypeScript - Typed superset of JavaScript
- PostgreSQL - The World's Most Advanced Open Source Relational Database
- Drizzle - TypeScript ORM that feels like writing SQL
- Zod - TypeScript-first schema validation
- ESLint - Pluggable linting utility for JavaScript and JSX
- Prettier - Opinionated code formatter
- Husky - Git hooks made easy
Contributions are welcome! Please open an issue or submit a pull request.
This project is licensed under the MIT License - see the LICENSE.md file for details.