Changes between Version 1 and Version 2 of BuildInstructions


Ignore:
Timestamp:
01/11/26 01:27:05 (10 days ago)
Author:
193284
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • BuildInstructions

    v1 v2  
    11= Documentation / Build Instructions =
    22
    3 This page explains how to run the Wedding Planner Phase P4 prototype locally.
     3This page explains how to build and run the Wedding Planner Phase P4 prototype locally.
     4
     5The 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).
    46
    57== Prerequisites ==
    68 * 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)
    912
    1013== Project structure ==
    11 The prototype is implemented as a Flask application.
     14The prototype is a Flask application.
    1215
    13 Main files/folders:
    14  * app.py - Flask entry point
     16Main files / folders:
     17 * app.py - Flask entry point (server)
    1518 * requirements.txt - Python dependencies (if available)
    16  * data_load.sql - demo dataset loading script
    17  * /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)
    1821
    19 == 1. Clone / download the project ==
     22== 1. Obtain the project source code ==
    2023Obtain the project source code from the repository (or download it as ZIP).
    2124
    22 == 2. Create virtual environment (recommended) ==
    23 Open terminal in the project folder and execute:
     25=== ZIP option (recommended for submission) ===
     26Create 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)
    2431
    25 {{{
    26 python -m venv venv
    27 }}}
     32== 2. Database setup (PostgreSQL) ==
    2833
    29 Activate:
     34=== 2.1 Create database ===
     35Create a PostgreSQL database (example name):
     36 * db_202526z_va_prj_wedding_planner2025
    3037
    31  * Windows PowerShell:
    32 {{{
    33 .\venv\Scripts\activate
    34 }}}
     38=== 2.2 Create schema/tables ===
     39Run the SQL script that creates the database schema (tables, relations, constraints).
    3540
    36  * Linux / MacOS:
    37 {{{
    38 source venv/bin/activate
    39 }}}
     41 * Demo schema created:
     42   [[Image(tables_schema_creation.png, width=900)]]
    4043
    41 == 3. Install dependencies ==
    42 Install required packages:
     44=== 2.3 Load demo dataset ===
     45Load 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 ==
     57Open terminal in the project folder (the folder containing app.py) and execute:
    4358
    4459{{{
     
    4661}}}
    4762
    48 If requirements.txt is missing, install manually:
     63If requirements.txt is missing, install the dependencies manually:
    4964
    5065{{{
     
    5267}}}
    5368
    54 == 4. Configure database ==
     69== 4. Configure database connection ==
    5570The prototype uses PostgreSQL database.
    5671
    57 Update the database connection string in the configuration (if required), e.g.:
     72In the configuration part (inside app.py or config file), ensure the PostgreSQL connection string/credentials are correct:
    5873
     74Example connection format:
    5975{{{
    6076postgresql://<username>:<password>@<host>:<port>/<database>
    6177}}}
    6278
    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 ==
    7280Navigate into the folder that contains app.py and run:
    7381
     
    7684}}}
    7785
    78 If the command fails, ensure the current directory is correct (contains app.py).
     86If the command fails, ensure you are in the correct folder (the current directory must contain app.py).
    7987
    80 Successful run output looks like:
     88Successful startup output example:
    8189
    82 [[Image(http.png, width=800)]]
     90[[Image(http.png, width=900)]]
    8391
    84 == 7. Access the prototype ==
     92== 6. Access the prototype ==
    8593Open the browser:
    8694
    8795 * http://127.0.0.1:5000
    8896
    89 Prototype overview page:
     97This page lists the available REST endpoints of the prototype.
    9098
    91 [[Image(p4-prototype.png, width=800)]]
     99 * Prototype endpoints overview:
     100   [[Image(p4-prototype.png, width=900)]]
    92101
    93 == 8. Available REST endpoints ==
     102== 7. Available REST endpoints ==
    94103The prototype provides the following endpoints:
    95104
     
    103112Example screenshots:
    104113
    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)]]
    110128
    111129== Notes ==
    112130 * 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.