-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from IhorTrokhymchuk/readme-dev
Added README file
- Loading branch information
Showing
4 changed files
with
89 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,63 +1,109 @@ | ||
# THIS IS TEST README | ||
# THIS VERSION DONT HAVE TESTS | ||
## Tests will be added after verification | ||
# Booking Application API | ||
![My Photo](./photo.png) | ||
## Project Description | ||
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. | ||
|
||
### SETUP | ||
## Technologies | ||
Here's a breakdown of the main technologies used in this project: | ||
|
||
To set up and run the project locally, follow these steps: | ||
|
||
1. Clone the repository. | ||
2. Ensure you have Java 17 installed. | ||
3. Ensure you have Maven installed. | ||
4. Ensure you have Docker installed. | ||
5. Update the database configuration in the `.env` file. | ||
6. Build the project using Maven: `mvn clean package`. | ||
7. Build the image using Docker: `docker-compose build`. | ||
8. Run the application using Docker: `docker-compose up`. | ||
### Frameworks and Libraries | ||
- **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. | ||
|
||
### Database and ORM | ||
- **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. | ||
|
||
### CREATED USERS | ||
### Testing | ||
- **JUnit**: The primary testing framework. | ||
- **Testcontainers**: Allows for integration testing with real database instances. | ||
- **Mockito**: Provides support for mocking dependencies in tests. | ||
|
||
1. **User 1:** | ||
- **Email:** [email protected] | ||
- **Password:** aliALI200@ | ||
- **Authorities:** | ||
- ADMIN | ||
- USER | ||
### Messaging and Integration | ||
- **Telegram Bots**: Integration with Telegram for automated messaging and notifications. | ||
- **Stripe**: A platform for handling online payments and transactions. | ||
|
||
2. **User 2:** | ||
- **Email:** [email protected] | ||
- **Password:** aliALI200@ | ||
- **Authorities:** | ||
- USER | ||
### Utilities | ||
- **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. | ||
|
||
### POSTMAN | ||
## Project Structure | ||
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. | ||
|
||
For a quick start, use the provided [Postman collection](https://www.postman.com/galactic-trinity-475750/workspace/booking-application/collection/30093328-72222bec-69a3-47c2-a303-9abb610bed87?action=share&creator=30093328) to test the API endpoints. Import the collection into Postman and follow the included documentation. | ||
### Setup | ||
To set up and run the project locally, follow these steps: | ||
1. **Ensure you have Java 17 installed.** | ||
2. **Ensure you have Maven installed.** | ||
3. **Ensure you have Docker installed.** | ||
4. **Update the database configuration in the `.env` file.** | ||
5. **Build the project using Maven:** | ||
```bash | ||
mvn clean package | ||
``` | ||
6. **Build the image using Docker:** | ||
```bash | ||
docker compose build | ||
``` | ||
7. **Run the application using Docker:** | ||
```bash | ||
docker-compose up | ||
```` | ||
|
||
### .env | ||
## Example .env | ||
```yaml | ||
###MYSQL### | ||
MYSQLDB_USER= | ||
MYSQLDB_ROOT_PASSWORD= | ||
MYSQLDB_DATABASE= | ||
MYSQLDB_LOCAL_PORT= | ||
MYSQLDB_DOCKER_PORT= | ||
MYSQLDB_USER=root | ||
MYSQLDB_ROOT_PASSWORD=root1234 | ||
MYSQLDB_DATABASE=booking_app | ||
MYSQLDB_LOCAL_PORT=3307 | ||
MYSQLDB_DOCKER_PORT=3306 | ||
###DOCKER### | ||
SPRING_LOCAL_PORT= | ||
SPRING_DOCKER_PORT= | ||
DEBUG_PORT= | ||
SPRING_LOCAL_PORT=8081 | ||
SPRING_DOCKER_PORT=8080 | ||
DEBUG_PORT=5005 | ||
###JWT### | ||
JWT_SECRET= | ||
JWT_EXPIRATIONS= | ||
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= | ||
``` | ||
TELEGRAM_SECRET=qrasderkajs564re | ||
``` | ||
## For use | ||
1. **User 1:** | ||
- **Email:** [email protected] | ||
- **Password:** admADM200@ | ||
- **Authorities:** | ||
- ADMIN | ||
- CUSTOMER | ||
|
||
|
||
2. **User 2:** | ||
- **Email:** [email protected] | ||
- **Password:** admADM200@ | ||
- **Authorities:** | ||
- CUSTOMER | ||
|
||
## Postman Collection | ||
For a quick start, use the provided [Postman collection](https://www.postman.com/galactic-trinity-475750/workspace/booking-application/collection/30093328-72222bec-69a3-47c2-a303-9abb610bed87?action=share&creator=30093328) to test the API endpoints. Import the collection into Postman and follow the included documentation. | ||
|
||
## Acknowledgments | ||
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! | ||
|
||
## Contact | ||
For questions or support, contact the project maintainer at **[email protected]** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ | |
|
||
@Data | ||
public class PaymentDto { | ||
private Long id; | ||
private PaymentStatusDto status; | ||
private String sessionId; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters