Changes between Version 3 and Version 4 of BuildInstructions


Ignore:
Timestamp:
01/11/26 02:33:34 (10 days ago)
Author:
193284
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • BuildInstructions

    v3 v4  
    33This page explains how to build and run the Wedding Planner Phase P4 prototype locally.
    44
    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).
     5The 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
     7The prototype uses a local SQLite database, which is initialized using SQL scripts.
    68
    79== Prerequisites ==
    810 * Python 3.x installed
    911 * pip installed
    10  * PostgreSQL installed OR access to a PostgreSQL server
    11  * (Optional) DBeaver / pgAdmin (recommended for DB management)
    1212
    1313== Project structure ==
    14 The prototype is a Flask application.
    15 
    1614Main files / folders:
    17  * app.py - Flask entry point (server)
    18  * requirements.txt - Python dependencies (if available)
    19  * SQL scripts for schema + demo data loading
    20  * (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
    2119
    2220== 1. Obtain the project source code ==
    2321Obtain the project source code from the repository (or download it as ZIP).
    2422
    25 == 2. Database setup (PostgreSQL) ==
     23== 2. Install Python dependencies ==
     24Open a terminal in the project folder and navigate into the /app folder:
    2625
    27 === 2.1 Create database ===
    28 Create a PostgreSQL database (example name):
    29  * db_202526z_va_prj_wedding_planner2025
     26{{{
     27cd app
     28}}}
    3029
    31 === 2.2 Create schema/tables ===
    32 Run the SQL script that creates the database schema (tables, relations, constraints).
     30Install dependencies:
    3331
    34  * Demo schema created:
     32{{{
     33pip install -r requirements.txt
     34}}}
     35
     36== 3. Initialize database (SQLite) ==
     37The prototype uses a local SQLite database.
     38
     39Run the SQL scripts to create schema and load demo data:
     40
     41 * Schema created:
    3542   [[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.).
    3943
    4044 * Demo user dataset loaded:
     
    4751   [[Image(guest_data_load.png, width=900)]]
    4852
    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 ==
     54Navigate into the folder containing app.py:
    5155
    5256{{{
    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 {{{
     57cd app
    7658python app.py
    7759}}}
    78 
    79 If the command fails, ensure you are in the correct folder (the current directory must contain app.py).
    8060
    8161Successful startup output example:
     
    8363[[Image(http.png, width=900)]]
    8464
    85 == 6. Access the prototype ==
     65== 5. Access the prototype ==
    8666Open the browser:
    8767
    8868 * http://127.0.0.1:5000
    8969
    90 This page lists the available REST endpoints of the prototype.
     70This page lists the available REST endpoints of the prototype:
    9171
    92  * Prototype endpoints overview:
    93    [[Image(p4-prototype.png, width=900)]]
     72[[Image(p4-prototype.png, width=900)]]
    9473
    95 == 7. Available REST endpoints ==
    96 The prototype provides the following endpoints:
    97 
     74== 6. Available REST endpoints ==
    9875 * /weddings
    9976 * /weddings/1/events
     
    10481
    10582Example screenshots:
    106 
    10783 * Weddings list:
    10884   [[Image(weddings.png, width=900)]]
    109 
    11085 * Events list:
    11186   [[Image(events.png, width=900)]]
    112 
    11387 * Guests list:
    11488   [[Image(guests.png, width=900)]]
    115 
    11689 * Attendance overview:
    11790   [[Image(attendance.png, width=900)]]
    118 
    11991 * RSVP overview:
    12092   [[Image(rsvp.png, width=900)]]
     
    12294== Notes ==
    12395 * 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.