wiki:BuildInstructions

Version 1 (modified by 221511, 5 days ago) ( diff )

--

Build Instructions

Development Environment

ComponentVersion
Python3.10 or higher
DockerRequired for PostgreSQL
Docker ComposeRequired for PostgreSQL
OSLinux, macOS, or Windows

Source Code

The prototype source code is available at: https://github.com/Teo03/FRRUAS-prototype

git clone https://github.com/Teo03/FRRUAS-prototype.git
cd FRRUAS-prototype

Build Instructions

Step 1: Start the Database

Create a docker-compose.yml file (or use the one provided in the project) and start PostgreSQL:

docker compose up -d

The database configuration is: host localhost, port 5432, database frruas_db, user frruas_user, password frruas_pass.

Step 2: Load the Schema and Sample Data

docker exec -i frruas_db psql -U frruas_user -d frruas_db < database/ddl/schema_creation.sql
docker exec -i frruas_db psql -U frruas_user -d frruas_db < database/dml/data_load.sql

Step 3: Set Up the Python Environment

python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

Step 4: Run the Application

python main.py

Testing Instructions

Test Credentials

All seed users share the same password for testing purposes:

RoleEmailPassword
Administratorana.petrovska@…password123
Administratormarko.dimitrovski@…password123
Teaching Staffelena.stojanova@…password123
Teaching Staffnikola.trajkovski@…password123
Studentstefan.nikolov@…password123
Studentmartina.ilievska@…password123

Testing Guide

  1. Log in as Administrator (ana.petrovska@… / password123)
    • Select Approve or Reject Reservations to review pending reservations
    • Select View Resource Usage Analytics to view all 7 reports
    • Select Register a New User to create a new account
  2. Log out and log in as Teaching Staff (elena.stojanova@… / password123)
    • Select Browse Available Resources to search and filter resources
    • Select Make a Resource Reservation to create a reservation
  3. Log out and log in as Student (stefan.nikolov@… / password123)
    • Select Browse Available Resources to view resources and check availability

Troubleshooting

  • Database connection fails: Verify Docker is running with docker ps. Ensure the container frruas_db is up.
  • Port 5432 in use: Stop any other PostgreSQL instance, or change the port in docker-compose.yml and db.py.
  • Re-seed the database: Re-run the Step 2 commands to reset all data to the initial state.
Note: See TracWiki for help on using the wiki.