Changes between Version 3 and Version 4 of BuildInstructions
- Timestamp:
- 01/11/26 02:33:34 (10 days ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
BuildInstructions
v3 v4 3 3 This page explains how to build and run the Wedding Planner Phase P4 prototype locally. 4 4 5 The P4 prototype is implemented as a Flask REST application with PostgreSQL database. Since this is a prototype phase, the main scenarios are demonstrated through REST endpoints (JSON responses in browser/Postman). 5 The P4 prototype is implemented as a Flask REST application. Since this is a prototype phase, the main scenarios are demonstrated through REST endpoints (JSON responses in browser/Postman). 6 7 The prototype uses a local SQLite database, which is initialized using SQL scripts. 6 8 7 9 == Prerequisites == 8 10 * Python 3.x installed 9 11 * pip installed 10 * PostgreSQL installed OR access to a PostgreSQL server11 * (Optional) DBeaver / pgAdmin (recommended for DB management)12 12 13 13 == Project structure == 14 The prototype is a Flask application.15 16 14 Main files / folders: 17 * app.py - Flask entry point (server)18 * requirements.txt - Python dependencies (if available)19 * SQL scripts for schema + demo data loading20 * (Optional) /templates and /static folders (if UI templates exist)15 * /app/app.py - Flask entry point 16 * /app/requirements.txt - Python dependencies 17 * schema.sql - database schema creation script 18 * seed.sql - demo dataset loading script 21 19 22 20 == 1. Obtain the project source code == 23 21 Obtain the project source code from the repository (or download it as ZIP). 24 22 25 == 2. Database setup (PostgreSQL) == 23 == 2. Install Python dependencies == 24 Open a terminal in the project folder and navigate into the /app folder: 26 25 27 === 2.1 Create database === 28 Create a PostgreSQL database (example name): 29 * db_202526z_va_prj_wedding_planner2025 26 {{{ 27 cd app 28 }}} 30 29 31 === 2.2 Create schema/tables === 32 Run the SQL script that creates the database schema (tables, relations, constraints). 30 Install dependencies: 33 31 34 * Demo schema created: 32 {{{ 33 pip install -r requirements.txt 34 }}} 35 36 == 3. Initialize database (SQLite) == 37 The prototype uses a local SQLite database. 38 39 Run the SQL scripts to create schema and load demo data: 40 41 * Schema created: 35 42 [[Image(tables_schema_creation.png, width=900)]] 36 37 === 2.3 Load demo dataset ===38 Load demo data into the database using SQL scripts (users, weddings, guests etc.).39 43 40 44 * Demo user dataset loaded: … … 47 51 [[Image(guest_data_load.png, width=900)]] 48 52 49 == 3. Install Python dependencies==50 Open terminal in the project folder (the folder containing app.py) and execute:53 == 4. Run the Flask prototype == 54 Navigate into the folder containing app.py: 51 55 52 56 {{{ 53 pip install -r requirements.txt 54 }}} 55 56 If requirements.txt is missing, install the dependencies manually: 57 58 {{{ 59 pip install flask flask_sqlalchemy psycopg2-binary 60 }}} 61 62 == 4. Configure database connection == 63 The prototype uses PostgreSQL database. 64 65 In the configuration part (inside app.py or config file), ensure the PostgreSQL connection string/credentials are correct: 66 67 Example connection format: 68 {{{ 69 postgresql://<username>:<password>@<host>:<port>/<database> 70 }}} 71 72 == 5. Run the Flask prototype == 73 Navigate into the folder that contains app.py and run: 74 75 {{{ 57 cd app 76 58 python app.py 77 59 }}} 78 79 If the command fails, ensure you are in the correct folder (the current directory must contain app.py).80 60 81 61 Successful startup output example: … … 83 63 [[Image(http.png, width=900)]] 84 64 85 == 6. Access the prototype ==65 == 5. Access the prototype == 86 66 Open the browser: 87 67 88 68 * http://127.0.0.1:5000 89 69 90 This page lists the available REST endpoints of the prototype .70 This page lists the available REST endpoints of the prototype: 91 71 92 * Prototype endpoints overview: 93 [[Image(p4-prototype.png, width=900)]] 72 [[Image(p4-prototype.png, width=900)]] 94 73 95 == 7. Available REST endpoints == 96 The prototype provides the following endpoints: 97 74 == 6. Available REST endpoints == 98 75 * /weddings 99 76 * /weddings/1/events … … 104 81 105 82 Example screenshots: 106 107 83 * Weddings list: 108 84 [[Image(weddings.png, width=900)]] 109 110 85 * Events list: 111 86 [[Image(events.png, width=900)]] 112 113 87 * Guests list: 114 88 [[Image(guests.png, width=900)]] 115 116 89 * Attendance overview: 117 90 [[Image(attendance.png, width=900)]] 118 119 91 * RSVP overview: 120 92 [[Image(rsvp.png, width=900)]] … … 122 94 == Notes == 123 95 * This is a prototype implementation for Phase P4. 124 * Since this is a REST-based prototype, some interactions are demonstrated through JSON responses in browser/Postman rather than a full final UI. 125 * Main focus of the prototype: wedding overview, guest/attendance/RSVP overview and venue availability conflict detection. 96 * Since this is a REST-based prototype, interactions are demonstrated through JSON responses in browser/Postman rather than a full final UI.
