Imagine a booking service in your area, offering individuals the opportunity to rent homes, apartments, and other accommodations for their chosen duration. Currently, this service faces significant operational challenges due to antiquated, manual processes for managing properties, renters, financial transactions, and booking records. Our project addresses these issues by creating an efficient online platform for managing housing rentals, transforming the way people experience accommodation booking.
Here's a breakdown of the main technologies used in this project:
- Spring Boot: Framework for building Java-based applications. It provides a comprehensive set of tools for building RESTful APIs, integrating with databases, and more.
- Spring Data JPA: Allows for seamless interaction with relational databases using JPA (Java Persistence API).
- Spring Security: Provides authentication and authorization capabilities, with JWT support.
- Springdoc OpenAPI: Offers OpenAPI (Swagger) documentation for your RESTful APIs.
- MySQL: The primary database for storing booking information, user data, and other details.
- Liquibase: A tool for managing database migrations and version control for schema changes.
- MapStruct: A mapping framework for converting between data objects and DTOs.
- JUnit: The primary testing framework.
- Testcontainers: Allows for integration testing with real database instances.
- Mockito: Provides support for mocking dependencies in tests.
- Telegram Bots: Integration with Telegram for automated messaging and notifications.
- Stripe: A platform for handling online payments and transactions.
- Lombok: Helps reduce boilerplate code for entity classes and more.
- Checkstyle: A tool to ensure code style consistency.
- Dotenv: Simplifies environment variable management.
- Docker Compose: Facilitates running multiple Docker containers for development and testing.
The project follows the standard Spring Boot structure with controllers, services, and repositories. The src
directory contains the source code, and the test
directory includes test cases.
To set up and run the project locally, follow these steps:
- Ensure you have Java 17 installed.
- Ensure you have Maven installed.
- Ensure you have Docker installed.
- Update the database configuration in the
.env
file. - Build the project using Maven:
mvn clean package
- Build the image using Docker:
docker compose build
- Run the application using Docker:
docker-compose up
###MYSQL###
MYSQLDB_USER=root
MYSQLDB_ROOT_PASSWORD=root1234
MYSQLDB_DATABASE=booking_app
MYSQLDB_LOCAL_PORT=3307
MYSQLDB_DOCKER_PORT=3306
###DOCKER###
SPRING_LOCAL_PORT=8081
SPRING_DOCKER_PORT=8080
DEBUG_PORT=5005
###JWT###
JWT_SECRET=horekrtrfkjbadjw12345jwodjwod1234jwdjowj9234902349
JWT_EXPIRATIONS=300000
###STRIPE_SECRET_KEY###
STRIPE_SECRET_KEY=
STRIPE_CANCEL_URL=http://localhost:8081/payments/cancel/{CHECKOUT_SESSION_ID}
STRIPE_SUCCESS_URL=http://localhost:8081/payments/success/{CHECKOUT_SESSION_ID}
###TELEGRAM###
BOT_NAME=
BOT_TOKEN=
TELEGRAM_SECRET=qrasderkajs564re
-
User 1:
- Email: [email protected]
- Password: admADM200@
- Authorities:
- ADMIN
- CUSTOMER
-
User 2:
- Email: [email protected]
- Password: admADM200@
- Authorities:
- CUSTOMER
For a quick start, use the provided Postman collection to test the API endpoints. Import the collection into Postman and follow the included documentation.
Special thanks to the Spring Boot community and the contributors to the libraries and tools used in this project. Your dedication and expertise make projects like these possible.
Feel free to explore, contribute, and provide feedback. Happy coding!
For questions or support, contact the project maintainer at [email protected]