Changes between Version 1 and Version 2 of BuildInstructions
- Timestamp:
- 01/11/26 01:27:05 (10 days ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
BuildInstructions
v1 v2 1 1 = Documentation / Build Instructions = 2 2 3 This page explains how to run the Wedding Planner Phase P4 prototype locally. 3 This page explains how to build and run the Wedding Planner Phase P4 prototype locally. 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). 4 6 5 7 == Prerequisites == 6 8 * Python 3.x installed 7 * pip (Python package manager) 8 * (Optional) virtual environment (recommended) 9 * pip installed 10 * PostgreSQL installed OR access to a PostgreSQL server 11 * (Optional) DBeaver / pgAdmin (recommended for DB management) 9 12 10 13 == Project structure == 11 The prototype is implemented asa Flask application.14 The prototype is a Flask application. 12 15 13 Main files /folders:14 * app.py - Flask entry point 16 Main files / folders: 17 * app.py - Flask entry point (server) 15 18 * requirements.txt - Python dependencies (if available) 16 * data_load.sql - demo dataset loading script17 * /templates and /static(if UI templates exist)19 * SQL scripts for schema + demo data loading 20 * (Optional) /templates and /static folders (if UI templates exist) 18 21 19 == 1. Clone / download the project==22 == 1. Obtain the project source code == 20 23 Obtain the project source code from the repository (or download it as ZIP). 21 24 22 == 2. Create virtual environment (recommended) == 23 Open terminal in the project folder and execute: 25 === ZIP option (recommended for submission) === 26 Create a ZIP archive containing the full project source code: 27 * app.py 28 * requirements.txt (if exists) 29 * SQL scripts (schema + demo dataset load scripts) 30 * any additional folders/files needed for running (templates/static if present) 24 31 25 {{{ 26 python -m venv venv 27 }}} 32 == 2. Database setup (PostgreSQL) == 28 33 29 Activate: 34 === 2.1 Create database === 35 Create a PostgreSQL database (example name): 36 * db_202526z_va_prj_wedding_planner2025 30 37 31 * Windows PowerShell: 32 {{{ 33 .\venv\Scripts\activate 34 }}} 38 === 2.2 Create schema/tables === 39 Run the SQL script that creates the database schema (tables, relations, constraints). 35 40 36 * Linux / MacOS: 37 {{{ 38 source venv/bin/activate 39 }}} 41 * Demo schema created: 42 [[Image(tables_schema_creation.png, width=900)]] 40 43 41 == 3. Install dependencies == 42 Install required packages: 44 === 2.3 Load demo dataset === 45 Load demo data into the database using SQL scripts (users, weddings, guests etc.). 46 47 * Demo user dataset loaded: 48 [[Image(user_data_load.png, width=900)]] 49 50 * Demo wedding dataset loaded: 51 [[Image(wedding_data_load.png, width=900)]] 52 53 * Demo guest dataset loaded: 54 [[Image(guest_data_load.png, width=900)]] 55 56 == 3. Install Python dependencies == 57 Open terminal in the project folder (the folder containing app.py) and execute: 43 58 44 59 {{{ … … 46 61 }}} 47 62 48 If requirements.txt is missing, install manually:63 If requirements.txt is missing, install the dependencies manually: 49 64 50 65 {{{ … … 52 67 }}} 53 68 54 == 4. Configure database ==69 == 4. Configure database connection == 55 70 The prototype uses PostgreSQL database. 56 71 57 Update the database connection string in the configuration (if required), e.g.:72 In the configuration part (inside app.py or config file), ensure the PostgreSQL connection string/credentials are correct: 58 73 74 Example connection format: 59 75 {{{ 60 76 postgresql://<username>:<password>@<host>:<port>/<database> 61 77 }}} 62 78 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 == 79 == 5. Run the Flask prototype == 72 80 Navigate into the folder that contains app.py and run: 73 81 … … 76 84 }}} 77 85 78 If the command fails, ensure the current directory is correct (containsapp.py).86 If the command fails, ensure you are in the correct folder (the current directory must contain app.py). 79 87 80 Successful run output looks like:88 Successful startup output example: 81 89 82 [[Image(http.png, width= 800)]]90 [[Image(http.png, width=900)]] 83 91 84 == 7. Access the prototype ==92 == 6. Access the prototype == 85 93 Open the browser: 86 94 87 95 * http://127.0.0.1:5000 88 96 89 Prototype overview page: 97 This page lists the available REST endpoints of the prototype. 90 98 91 [[Image(p4-prototype.png, width=800)]] 99 * Prototype endpoints overview: 100 [[Image(p4-prototype.png, width=900)]] 92 101 93 == 8. Available REST endpoints ==102 == 7. Available REST endpoints == 94 103 The prototype provides the following endpoints: 95 104 … … 103 112 Example screenshots: 104 113 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)]] 114 * Weddings list: 115 [[Image(weddings.png, width=900)]] 116 117 * Events list: 118 [[Image(events.png, width=900)]] 119 120 * Guests list: 121 [[Image(guests.png, width=900)]] 122 123 * Attendance overview: 124 [[Image(attendance.png, width=900)]] 125 126 * RSVP overview: 127 [[Image(rsvp.png, width=900)]] 110 128 111 129 == Notes == 112 130 * This is a prototype implementation for Phase P4. 113 * UI screens are demonstrated through REST JSON responses in browser. 131 * Since this is a REST-based prototype, some interactions are demonstrated through JSON responses in browser/Postman rather than a full final UI. 132 * Main focus of the prototype: wedding overview, guest/attendance/RSVP overview and venue availability conflict detection.
