A comprehensive room booking system built for educational environments featuring three distinct user roles: Admin, Teacher, and Student. The system provides a modern, responsive interface with role-based access control and real-time booking management.
πΈ View Screenshots to see the application in action!
π Quick Start Guide - Get up and running in 5 minutes!
- Features Overview
- Technology Stack
- Security
- UI/UX Features
- Technical Highlights
- Getting Started
- Project Structure
- Contributing
- License
- Authors
- Book study rooms with date selection, start time, and duration (2h, 4h, 6h, or 8h)
- Cancel active bookings
- View bookings categorized as "Upcoming" and "History"
- Filter out cancelled bookings via checkbox
- Validation prevents bookings on weekends and after 7:00 PM
- Create new rooms with name, type, capacity, floor, and equipment
- Edit existing rooms
- Delete rooms with safety confirmation
- Dashboard shows available/occupied rooms
- Create users with name, email, password, and role
- Edit user information
- Delete users
- Search for users via search field
- Filter users by role (Student/Teacher/Admin)
- Dropdown for quick access to specific users
- Total rooms and available rooms count
- Active bookings and total bookings statistics
- Real-time updates on changes
- Frontend: HTML5, CSS3 (with CSS variables), Vanilla JavaScript
- Backend: Node.js with Express
- Database: SQLite3
- Authentication: Session-based with cookies and scrypt for password hashing
- Architecture: MVC structure with middleware for authentication and authorization
- Role-Based Access Control (RBAC) β each role has specific permissions
- Password hashing with scrypt
- Session management with automatic cleanup of expired sessions
- Protected API endpoints β requires authentication
- Input validation on both frontend and backend
- Responsive design β works on desktop, tablet, and mobile
- Toast notifications for action feedback
- Modal dialogs for bookings and forms with nudge animation on invalid input
- Confirmation dialogs for user/room deletion
- Dark mode support via CSS variables
- Accessibility features with semantic HTML and ARIA attributes
- Modular JavaScript β code is organized into reusable components (BookingModal, UserModal, RoomModal)
- API Wrapper β centralized handling of all API calls
- Error Handling β translation of technical error messages to user-friendly text
- State Management β local management of users, rooms, and bookings with filtering
- Optimized Rendering β efficient UI updates based on filter selections
- Node.js (v18 or higher recommended)
- npm
- Clone the repository
git clone https://github.com/Christian-Gennari/fullstack-booking-system/
cd fullstack-booking-system- Install dependencies
npm install-
The database will be automatically created and seeded on first run
-
Start the server
npm start- Open your browser and navigate to:
http://localhost:80
For testing purposes, the following accounts are pre-configured:
| Password | Role | |
|---|---|---|
| admin@edugrade.com | lΓΆsen123 | Admin |
| larare@edugrade.com | lΓΆsen123 | Teacher |
| elev@edu.edugrade.com | lΓΆsen123 | Student |
The application exposes a RESTful API with the following main endpoints:
POST /api/login- User loginPOST /api/logout- User logoutGET /api/me- Get current user
GET /api/bookings- Get all bookings (filtered by role)POST /api/bookings- Create a new bookingDELETE /api/bookings/:id- Cancel a booking
GET /api/rooms- Get all roomsPOST /api/rooms- Create a room (Admin only)PUT /api/rooms/:id- Update a room (Admin only)DELETE /api/rooms/:id- Delete a room (Admin only)
GET /api/users- Get all users (Admin only)POST /api/users- Create a user (Admin only)PUT /api/users/:id- Update a user (Admin only)DELETE /api/users/:id- Delete a user (Admin only)
All API endpoints require authentication via session cookies, except for the login endpoint.
src/
βββ modules/ # Feature modules (auth, bookings, rooms, users)
βββ middleware/ # Authentication and authorization
βββ public/ # Frontend assets and pages
β βββ components/ # Reusable UI components
β βββ pages/ # Role-specific pages
β βββ utils/ # Frontend utilities
βββ db/ # Database connection
βββ utils/ # Backend utilities
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
Viktor Johansson
- LinkedIn: linkedin.com/in/viktorjohansson96
- GitHub: @discovicke
Christian Gennari
- LinkedIn: linkedin.com/in/christiangennari
- GitHub: @Christian-Gennari
Marcus LΓΆΓΆv
- LinkedIn: linkedin.com/in/marcus-lof-a64888382
- GitHub: @LeafMaster1
AndrΓ© PontΓ©n
- LinkedIn: linkedin.com/in/andreponten
- GitHub: @aponten
- Nunito Sans - Font from Google Fonts
- Node.js Community - For amazing tools and libraries
- Express.js - For a robust web framework
- SQLite - For a simple and efficient database
ELLA demonstrates a complete modern web application with clear separation between frontend and backend, secure authentication, and a user-friendly interface design. The system is modular enough to integrate with other databases for real-world implementation.
