| 44 | | This prototype demonstrates the feasibility of implementing |
| 45 | | the database usage scenarios and validates the database design. |
| | 22 | Flask development server (local execution) |
| | 23 | |
| | 24 | == Prototype Architecture |
| | 25 | |
| | 26 | The backend prototype consists of: |
| | 27 | |
| | 28 | An SQLite database created using SQL DDL scripts |
| | 29 | |
| | 30 | Pre-populated sample data using seed scripts |
| | 31 | |
| | 32 | A Flask application exposing REST endpoints |
| | 33 | |
| | 34 | JSON responses for all API calls |
| | 35 | |
| | 36 | The application is executed locally and accessed through a web browser using HTTP requests. |
| | 37 | |
| | 38 | == Implemented REST Endpoints |
| | 39 | |
| | 40 | The following REST endpoints are implemented and operational: |
| | 41 | |
| | 42 | '''/weddings''' |
| | 43 | Returns a list of weddings stored in the database. |
| | 44 | |
| | 45 | '''/weddings/<wedding_id>/events''' |
| | 46 | Returns all events associated with the selected wedding. |
| | 47 | |
| | 48 | '''/weddings/<wedding_id>/guests''' |
| | 49 | Returns all guests related to a specific wedding. |
| | 50 | |
| | 51 | '''/weddings/<wedding_id>/attendance''' |
| | 52 | Displays attendance information for a wedding event, including guest names, roles, attendance status, and table assignments. |
| | 53 | |
| | 54 | '''/weddings/<wedding_id>/rsvp''' |
| | 55 | Returns RSVP responses for guests for a selected event. |
| | 56 | |
| | 57 | '''/availability/venue''' |
| | 58 | Checks venue availability for a given venue, date, and time interval and detects possible scheduling conflicts. |
| | 59 | |
| | 60 | == Demonstrated Functionalities |
| | 61 | |
| | 62 | The prototype demonstrates the following key functionalities: |
| | 63 | |
| | 64 | Retrieval of wedding data from the database |
| | 65 | |
| | 66 | Display of attendance overview per event |
| | 67 | |
| | 68 | Role-based guest participation (guest, best man) |
| | 69 | |
| | 70 | Handling of optional attributes (e.g. table number) |
| | 71 | |
| | 72 | Venue availability checking with time overlap detection |
| | 73 | |
| | 74 | == Venue Availability Logic |
| | 75 | |
| | 76 | Venue availability is determined by checking existing bookings for a selected venue on a specific date. |
| | 77 | |
| | 78 | Two scenarios are demonstrated: |
| | 79 | |
| | 80 | Conflict case |
| | 81 | If an existing confirmed booking overlaps with the requested time interval, the venue is not available. |
| | 82 | The response returns "available": false and provides details about the conflicting booking. |
| | 83 | |
| | 84 | Free case |
| | 85 | If no overlapping bookings exist, the venue is available. |
| | 86 | The response returns "available": true with an empty conflicts list. |
| | 87 | |
| | 88 | This logic prevents double-booking of venues at the application level. |
| | 89 | |
| | 90 | == Prototype Evidence |
| | 91 | |
| | 92 | The following screenshots are attached to this page as evidence of the working prototype: |
| | 93 | |
| | 94 | Flask development server running locally |
| | 95 | |
| | 96 | Overview of available REST endpoints |
| | 97 | |
| | 98 | Wedding list endpoint response |
| | 99 | |
| | 100 | Attendance overview endpoint response |
| | 101 | |
| | 102 | Venue availability conflict example |
| | 103 | |
| | 104 | Venue availability free example |
| | 105 | |
| | 106 | These screenshots confirm the correct execution of the backend prototype and successful interaction with the database. |
| | 107 | |
| | 108 | == Conclusion |
| | 109 | |
| | 110 | Phase P4 successfully demonstrates a working backend prototype for the Wedding Planner system. |
| | 111 | The implementation validates the database design from previous phases and confirms the correct behavior |
| | 112 | of core system functionalities through RESTful API endpoints. |
| | 113 | |
| | 114 | The prototype provides a solid foundation for further development and potential frontend integration. |