| | 1 | = Build Instructions = |
| | 2 | |
| | 3 | The system is a monolithic web application: |
| | 4 | * **Backend & Frontend:** Spring Boot with Thymeleaf |
| | 5 | |
| | 6 | == Required Software == |
| | 7 | |
| | 8 | '''OS''' |
| | 9 | * Windows 10/11 |
| | 10 | * macOS |
| | 11 | * Linux |
| | 12 | |
| | 13 | '''System Requirements''' |
| | 14 | * Java JDK 21 |
| | 15 | * Maven 3.9+ |
| | 16 | * Docker (Optional but recommended) |
| | 17 | |
| | 18 | == Development Environment Technology Stack == |
| | 19 | |
| | 20 | '''Tech Stack''' |
| | 21 | * Spring Boot |
| | 22 | * Spring Web |
| | 23 | * Spring Data JPA (Hibernate) |
| | 24 | * Thymeleaf (Templating Engine) |
| | 25 | * Bootstrap 5 (CSS Framework) |
| | 26 | |
| | 27 | == Build Instructions == |
| | 28 | |
| | 29 | '''1. Clone the project''' |
| | 30 | |
| | 31 | https://github.com/EmilPetrovski/petsitter |
| | 32 | |
| | 33 | {{{ |
| | 34 | git clone https://github.com/EmilPetrovski/petsitter |
| | 35 | cd petsitter |
| | 36 | }}} |
| | 37 | |
| | 38 | '''2. Database Setup''' |
| | 39 | |
| | 40 | Open DBeaver: |
| | 41 | 1. Create a new database. |
| | 42 | 2. Open and run the [https://develop.finki.ukim.mk/projects/petsitter/attachment/wiki/LogicalAndPhysicalDesign/schema_creation.sql schema_creation.sql] script to generate the tables. |
| | 43 | 3. Open and run the [https://develop.finki.ukim.mk/projects/petsitter/attachment/wiki/LogicalAndPhysicalDesign/data_load.sql data_load.sql] script to populate the database with test users, pets, and services. |
| | 44 | |
| | 45 | '''3. Environment Configuration''' |
| | 46 | |
| | 47 | The application needs database credentials as environment variables for database credentials. You can set them as system environment vars or replace them in `src/main/resources/application.properties`: |
| | 48 | {{{ |
| | 49 | export DB_USERNAME="your_postgres_username" |
| | 50 | export DB_PASSWORD="your_postgres_password" |
| | 51 | }}} |
| | 52 | |
| | 53 | '''4. Build and Run the Application (Native)''' |
| | 54 | {{{ |
| | 55 | mvn clean install -DskipTests |
| | 56 | mvn spring-boot:run |
| | 57 | }}} |
| | 58 | The application will run on '''http://localhost:8080''' |
| | 59 | |
| | 60 | '''Alternative: Build and Run via Docker''' |
| | 61 | |
| | 62 | |
| | 63 | Run the application inside a container: |
| | 64 | {{{ |
| | 65 | docker build -t petsitter-app . |
| | 66 | docker run --network host -e DB_USERNAME="your_username" -e DB_PASSWORD="your_password" petsitter-app |
| | 67 | }}} |
| | 68 | |
| | 69 | |
| | 70 | == Step by step mini guide == |
| | 71 | |
| | 72 | Main elements of the application and the standard user flow: |
| | 73 | |
| | 74 | '''For Pet Owners:''' |
| | 75 | 1. **Sign Up / Log In:** Register as a "Pet Owner" or use a test account. |
| | 76 | 2. **Add a Pet:** Navigate to "My Pets" and click "Add New Pet" to register a dog, cat, or rabbit. |
| | 77 | 3. **Find a Sitter:** Go to "Find a Sitter", filter by service type (for example Overnight Stay), and browse available sitters. |
| | 78 | 4. **Create a Booking:** Click "Book Now" on a sitter's profile, select dates, address, payment method and the pets you want to include. |
| | 79 | 5. **Manage Bookings:** Navigate to "My Bookings" to view active requests, cancel them, or leave a review for completed bookings. |
| | 80 | |
| | 81 | '''For Pet Sitters:''' |
| | 82 | 1. **Set Offered Services:** Navigate to "My Offered Services" to select the services you provide (for example Overnight Stay, Short Visit). |
| | 83 | 2. **Review Requests:** Navigate to "Pending Requests" to accept or reject incoming bookings from Pet Owners. |
| | 84 | 3. **Complete Bookings:** Once a confirmed booking is finished, mark it as "Completed" from the dashboard. |
| | 85 | |
| | 86 | '''For Administrators:''' |
| | 87 | 1. **Admin Panel:** Log in with the Admin account to access the protected Admin dashboards. |
| | 88 | 2. **Manage Platform Data:** View and manage all Platform Users, Bookings, Pets, and Reviews. The Admin can permanently delete Users and add new Service Types to the platform. |