= Build Instructions = == Development Environment == ||'''Component'''||'''Version'''|| ||Python||3.10 or higher|| ||Docker||Required for PostgreSQL|| ||Docker Compose||Required for PostgreSQL|| ||OS||Linux, 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: ||'''Role'''||'''Email'''||'''Password'''|| ||Administrator||ana.petrovska@finki.ukim.mk||password123|| ||Administrator||marko.dimitrovski@finki.ukim.mk||password123|| ||Teaching Staff||elena.stojanova@finki.ukim.mk||password123|| ||Teaching Staff||nikola.trajkovski@finki.ukim.mk||password123|| ||Student||stefan.nikolov@students.finki.ukim.mk||password123|| ||Student||martina.ilievska@students.finki.ukim.mk||password123|| === Testing Guide === 1. '''Log in as Administrator''' (ana.petrovska@finki.ukim.mk / 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@finki.ukim.mk / 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@students.finki.ukim.mk / 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.