Skip to content

ilearncoding1/reservation-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🏢 RéservaSalle - Système de Réservation de Salles de Réunion

A modern Java Swing desktop application for managing meeting room reservations with a beautiful custom UI.

Java Swing MySQL

📋 Description

Ce projet implémente un système de réservation de salles de réunion distribué permettant aux utilisateurs de réserver, modifier ou consulter les disponibilités des salles de manière centralisée et en temps réel.

✨ Features

🔐 Authentication

  • Secure login with email/password
  • Show/hide password toggle with custom icon
  • Role-based access (Admin/User)

📅 Reservation Management

  • Create, view, and cancel room reservations
  • Visual room selection dialog
  • Conflict detection for overlapping reservations
  • Filter reservations by user

🏠 Room Management (Admin)

  • Add, edit, and delete meeting rooms
  • Room types: PETITE, MOYENNE, GRANDE
  • Equipment tracking (projector, whiteboard, etc.)
  • Availability status

👥 User Management (Admin)

  • Create and manage user accounts
  • Assign roles (Admin/User)
  • Secure password handling

🔔 Real-time Notifications

  • Subscribe to room notifications
  • Persistent subscriptions - preferences saved to database
  • Subscriptions restored after logout/login
  • Auto-connect to notification server

📊 Export & Backup

  • Export statistics to CSV
  • Export any table to CSV
  • Full database backup to JSON

🎨 Modern UI

  • 25+ custom icons throughout the application
  • Styled buttons with hover effects
  • Modern color scheme
  • Styled message dialogs and confirmations
  • Responsive table headers

🛠️ Technologies Utilisées

Technology Purpose
Java 17+ Programming Language
Swing GUI Framework
MySQL Database
JDBC Database Connectivity
Maven Build Tool
JAX-WS (SOAP) Web Services
JAX-RS (REST) REST API
RMI Remote Method Invocation
Sockets TCP Real-time notifications

📁 Project Structure

com.reservation/
├── model/                    # Entités (Salle, Reservation, Utilisateur)
├── dao/                      # Data Access Objects
│   ├── SalleDAO.java
│   ├── ReservationDAO.java
│   ├── UtilisateurDAO.java
│   └── NotificationSubscriptionDAO.java
├── rest/                     # Services REST (JAX-RS)
├── soap/                     # Services SOAP (JAX-WS)
├── rmi/                      # Services RMI
├── socket/                   # Serveur/Client Socket TCP
├── gui/                      # Interface graphique Swing
│   ├── ReservationDashboard.java
│   ├── ServiceMonitor.java
│   ├── StatisticsDashboard.java
│   └── NotificationClient.java
├── util/                     # Utilitaires (DBConnection)
└── MainServer.java           # Lanceur principal

🚀 Getting Started

Prerequisites

  • Java 17 or higher
  • MySQL Server
  • Maven

Installation

  1. Clone the repository

    git clone https://github.com/YOUR_USERNAME/reservation-server.git
    cd reservation-server
  2. Set up the database (using XAMPP MySQL)

    mysql -u root -p < src/main/resources/database.sql

    Or import database.sql via phpMyAdmin.

  3. Configure database connection

    Update DBConnection.java with your MySQL credentials.

  4. Build the project

    mvn clean install
  5. Run the GUI application

    mvn exec:java -Dexec.mainClass="com.reservation.gui.ReservationDashboard"
  6. Run all distributed servers

    mvn exec:java -Dexec.mainClass="com.reservation.MainServer"

Database Tables

Table Description
utilisateurs User accounts with roles
salles Meeting rooms with type and equipment
reservations Room bookings with dates and status
notification_subscriptions User notification preferences (auto-created)

Types de Salles

Type Capacité Équipements
PETITE 4-6 pers. Tableau blanc, projecteur
MOYENNE 6-12 pers. Tableau blanc, projecteur, vidéoconférence
GRANDE 12-25 pers. Tous équipements + microphones, écran

🌐 Distributed Services

REST API (Port 8080)

GET    /api/salles                    - Get all rooms
GET    /api/salles/{id}               - Get room by ID
POST   /api/salles                    - Create room (admin)
PUT    /api/salles/{id}               - Update room (admin)
DELETE /api/salles/{id}               - Delete room (admin)

GET    /api/reservations              - Get all reservations
GET    /api/reservations/{id}         - Get reservation by ID
GET    /api/reservations/salle/{id}   - Get reservations by room
POST   /api/reservations              - Create reservation
DELETE /api/reservations/{id}         - Cancel reservation

SOAP Service (Port 8081)

  • WSDL: http://localhost:8081/reservation?wsdl
  • Operations: creerReservation, annulerReservation, consulterReservation, verifierDisponibilite

RMI Service (Port 1099)

  • Registry: localhost:1099
  • Service name: ReservationService
  • Full remote interface for all reservation operations

Socket Server (Port 9999)

Real-time notification system for live updates.

Features:

  • Subscribe to room notifications
  • Receive real-time alerts when reservations are created/cancelled
  • Persistent subscriptions stored in database (restored on login)

Commands:

SUBSCRIBE:<salleId>    - Subscribe to room notifications
UNSUBSCRIBE:<salleId>  - Unsubscribe from room notifications
PING                   - Test connection
LIST                   - Show current subscriptions
NAME:<yourname>        - Set client name
QUIT                   - Disconnect

🖥️ GUI Features

Tab Structure

  • Tableau de Bord - Homepage with welcome message, quick stats, and recent activity
  • Salles - Room management with search and filtering
  • Réservations - Reservation management with "Mes réservations" filter
  • Paramètres - User settings including notifications and profile
  • Utilisateurs (Admin) - User management
  • Administration (Admin) - System overview and admin actions
  • Services (Admin) - Monitor all distributed services status

Key Features

  • Auto-connect to notification server on startup
  • Persistent notification subscriptions (saved to database)
  • Real-time service status monitoring
  • Clean, modern UI without cluttered statistics
  • Scrollable panels for all content
  • Responsive layout
  • Copy to clipboard with simple confirmation message

🎨 Custom Icons

The application uses 30+ custom icons for a modern look:

  • Navigation icons (tabs, buttons)
  • Action icons (add, edit, delete, export)
  • Status icons (success, error, warning)
  • Form icons (email, password, user)
  • Service icons (server, notification)

👤 Authors

  • ilearncoding1 (AYA EL BADRI)
  • AYA LAHGUI
  • OUMAIMA HORMA

📝 License

This project is open source and available under the MIT License.


⭐ Star this repository if you find it helpful!

About

A Java Swing desktop application for managing room reservations with user authentication, admin panel, and modern UI with custom icons.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages