© Aleksandra Gołek | All rights reserved. This work is legally protected and requires permission for use.
Smart Place Organization Tool | "Your campus. Your space. Your SPOT."
Say goodbye to booking conflicts, uncertainty, and the hassle of manually searching for available rooms. SPOT (Smart Place Organization Tool) is a revolutionary platform for academic space management, designed for the prestige and dynamism of the modern university.
SPOT combines an elegant interface with a powerful organizational engine that automates the booking process for rooms, labs, and lecture halls. It's a tool that brings order and peace of mind, allowing the entire academic community to focus on what matters most: learning, development, and collaboration.
Read the documentation:
- Technologies
- Start-up
- Architecture & Structure
- Database (ERD & advanced SQL elements)
- Main functionalities
- Manual test scenario
- Quality by Lighthouse
- Requirements Checklist
The project is implemented in accordance with the strict requirements (no PHP frameworks):
- Backend: PHP 8.3 (Object-Oriented, PDO, MVC Pattern)
- Frontend: HTML5, CSS3 (Responsive/Flexbox/Grid), JavaScript (Vanilla + Fetch API)
- Database: PostgreSQL 16
- Containerization: Docker & Docker Compose
- Web Server: Nginx (Alpine)
- Make sure you have Docker installed.
- Clone the repo and go to project directory.
- Launch the app with:
docker-compose up --build
- App:
http://localhost:8080 - PgAdmin:
http://localhost:5050(Login:admin@example.com, Hasło:admin)
Default login examples (u can make users like that):
- Student:
student@spot.com - Admin:
admin@example.com
App is based on MVC (Model-View-Controller). All traffic is managed by index.php (Front Controller) and class Routing.
Layer diagram:
graph TD
User((Użytkownik)) --> Browser[Przeglądarka / JS Fetch]
Browser -- HTTP Request --> Nginx[Nginx :8080]
Nginx -- FastCGI --> PHP[Kontener PHP]
subgraph Backend PHP
PHP --> Router[Routing.php]
Router --> Controller[Controller]
Controller --> Model[Model]
Controller --> View[View / Template]
Model --> Repo[Repository]
end
Repo -- PDO --> DB[(PostgreSQL :5432)]
erDiagram
ROLES {
int id PK "Unique identifier"
string name "Role name (student, admin)"
}
USERS {
int id PK "Unique identifier"
string email UK "Login email"
string password "Hashed password"
string name "First name"
string surname "Last name"
int id_role FK "Foreign key to ROLES"
timestamp created_at "Creation date"
}
USER_CREATION_LOGS {
int user_id PK,FK "User ID"
timestamp created_at_log "Log timestamp"
}
ROOMS {
string id PK "Room code (e.g. ROOM1)"
string name "Display name"
int workspaces "Seat capacity"
string type "Type (Lab, Lecture Hall)"
text description "Optional details"
}
BOOKINGS {
int id PK "Booking ID"
int user_id FK "Who booked"
string room_id FK "Which room"
date date "Reservation date"
time start_time "Start"
time end_time "End"
string status "Confirmed/Cancelled"
timestamp created_at "Booking timestamp"
}
BOOKINGS_AUDIT_LOG {
int log_id PK "Log ID"
int booking_id "Deleted booking ID"
int user_id "User ID from booking"
string room_id "Room ID from booking"
string reason "Reason for deletion"
timestamp deleted_at "Time of deletion"
}
%% Relacje
ROLES ||--|{ USERS : "defines permissions for"
USERS ||--|| USER_CREATION_LOGS : "logs creation in"
USERS ||--o{ BOOKINGS : "makes"
ROOMS ||--o{ BOOKINGS : "is reserved in"
Views:
- vw_booking_details: Aggregates booking data with user and room details using JOINs.
- vw_room_stats: Calculates usage statistics for each room.
Trigger:
- trg_log_booking_delete: Automatically saves information about deleted bookings into the bookings_audit_log table for security/audit purposes.
Procedure:
- clean_archived_bookings: A stored procedure that cleans up historical reservation data to maintain database performance.
Stored function:
- log_booking_deletion(): Contains the logic executed by the trigger. Captures the details of a deleted booking (ID, user, room) and inserts a record into the bookings_audit_log table.
Transaction: To ensure data integrity. Multiple SQL operations are treated as a single atomic unit—either all succeed, or all fail (rollback).
- User Registration: When adding new user, system inserts it into the users table and creates a log entry in user_creation_logs in 1 transaction.
- Reservations: When creating or updating a booking, the system validates the logic and saves the booking data inside a transaction to prevent race conditions or partial updates.
- Logging and sesions: Secure authentication with password hashing.
- Registration: live input validation.
- Roles: Role system (Student/Teacher/Admin) with access blocking (Middleware checkAdmin).
- Reservations: Interactive SVG map, date&time validation, bookings list, database conflict resolving.
- Admin panel: User, rooms, bookings management (CRUD).
- User profile: User data edition.
| Log in page. | Register account. Type non identical passwords. | Successful login. | Add reservation. |
| Chosen room. | Booking is chosen to be less than 15 minutes long. Message displayed. | Display info about SPOT! | Admin view: manage users. |
| Admin view: manage users' bookings. Delete a reservation. | Log out. Successfully redirected to log in page and user logged out. |
My bookings page.
|
Reservation page.
|
- Technologies: Docker, GIT, HTML5, CSS, JS, PHP, PostgreSQL.
- MVC Architecture without frameworks.
- Responsive Design (Media Queries).
- Login, Sessions, Permissions.
- Database: Relationships, 3rd Normal Form.
- Views (2), Trigger (1), Procedure (1).
- SQL Transactions (during reservation).
- Fetch API (room availability check).
- Tests (PHPUnit + Bash).
- Error Handling (400, 403, 404, 500 pages).
- Documentation and README.
- Filtering and sorting options for the user tables (as there is for admin).
- Dynamic map change.
- More specific limits (e.g. booking should not only last over 15 minutes but less than...) for booking.
- Interactive messages after having completed reservation.
- Booking assigned to teacher having more priority than student one.
- Confirm reservation button 15 minutes before the reservation.
- Room booking by: capacity, purpose, equipement. Not limiting by date and time.

































