| | 1 | = Documentation / Build Instructions = |
| | 2 | |
| | 3 | This page explains how to run the Wedding Planner Phase P4 prototype locally. |
| | 4 | |
| | 5 | == Prerequisites == |
| | 6 | * Python 3.x installed |
| | 7 | * pip (Python package manager) |
| | 8 | * (Optional) virtual environment (recommended) |
| | 9 | |
| | 10 | == Project structure == |
| | 11 | The prototype is implemented as a Flask application. |
| | 12 | |
| | 13 | Main files/folders: |
| | 14 | * app.py - Flask entry point |
| | 15 | * requirements.txt - Python dependencies (if available) |
| | 16 | * data_load.sql - demo dataset loading script |
| | 17 | * /templates and /static (if UI templates exist) |
| | 18 | |
| | 19 | == 1. Clone / download the project == |
| | 20 | Obtain the project source code from the repository (or download it as ZIP). |
| | 21 | |
| | 22 | == 2. Create virtual environment (recommended) == |
| | 23 | Open terminal in the project folder and execute: |
| | 24 | |
| | 25 | {{{ |
| | 26 | python -m venv venv |
| | 27 | }}} |
| | 28 | |
| | 29 | Activate: |
| | 30 | |
| | 31 | * Windows PowerShell: |
| | 32 | {{{ |
| | 33 | .\venv\Scripts\activate |
| | 34 | }}} |
| | 35 | |
| | 36 | * Linux / MacOS: |
| | 37 | {{{ |
| | 38 | source venv/bin/activate |
| | 39 | }}} |
| | 40 | |
| | 41 | == 3. Install dependencies == |
| | 42 | Install required packages: |
| | 43 | |
| | 44 | {{{ |
| | 45 | pip install -r requirements.txt |
| | 46 | }}} |
| | 47 | |
| | 48 | If requirements.txt is missing, install manually: |
| | 49 | |
| | 50 | {{{ |
| | 51 | pip install flask flask_sqlalchemy psycopg2-binary |
| | 52 | }}} |
| | 53 | |
| | 54 | == 4. Configure database == |
| | 55 | The prototype uses PostgreSQL database. |
| | 56 | |
| | 57 | Update the database connection string in the configuration (if required), e.g.: |
| | 58 | |
| | 59 | {{{ |
| | 60 | postgresql://<username>:<password>@<host>:<port>/<database> |
| | 61 | }}} |
| | 62 | |
| | 63 | == 5. Load demo dataset == |
| | 64 | To make the prototype runnable immediately, demo data is loaded into the database using SQL scripts. |
| | 65 | |
| | 66 | * Demo schema created: [[Image(tables_schema_creation.png, width=800)]] |
| | 67 | * Demo user dataset loaded: [[Image(user_data_load.png, width=800)]] |
| | 68 | * Demo wedding dataset loaded: [[Image(wedding_data_load.png, width=800)]] |
| | 69 | * Demo guest dataset loaded: [[Image(guest_data_load.png, width=800)]] |
| | 70 | |
| | 71 | == 6. Run the Flask prototype == |
| | 72 | Navigate into the folder that contains app.py and run: |
| | 73 | |
| | 74 | {{{ |
| | 75 | python app.py |
| | 76 | }}} |
| | 77 | |
| | 78 | If the command fails, ensure the current directory is correct (contains app.py). |
| | 79 | |
| | 80 | Successful run output looks like: |
| | 81 | |
| | 82 | [[Image(http.png, width=800)]] |
| | 83 | |
| | 84 | == 7. Access the prototype == |
| | 85 | Open the browser: |
| | 86 | |
| | 87 | * http://127.0.0.1:5000 |
| | 88 | |
| | 89 | Prototype overview page: |
| | 90 | |
| | 91 | [[Image(p4-prototype.png, width=800)]] |
| | 92 | |
| | 93 | == 8. Available REST endpoints == |
| | 94 | The prototype provides the following endpoints: |
| | 95 | |
| | 96 | * /weddings |
| | 97 | * /weddings/1/events |
| | 98 | * /weddings/1/guests |
| | 99 | * /weddings/1/attendance |
| | 100 | * /weddings/1/rsvp |
| | 101 | * /availability/venue?venue_id=1&date=2026-06-20&start=15:00&end=21:00 |
| | 102 | |
| | 103 | Example screenshots: |
| | 104 | |
| | 105 | * Weddings list: [[Image(weddings.png, width=800)]] |
| | 106 | * Events list: [[Image(events.png, width=800)]] |
| | 107 | * Guests list: [[Image(guests.png, width=800)]] |
| | 108 | * Attendance overview: [[Image(attendance.png, width=800)]] |
| | 109 | * RSVP overview: [[Image(rsvp.png, width=800)]] |
| | 110 | |
| | 111 | == Notes == |
| | 112 | * This is a prototype implementation for Phase P4. |
| | 113 | * UI screens are demonstrated through REST JSON responses in browser. |