Skip to content

UsefulHands/Reception

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

60 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🏨 Reception β€” Hotel Reception Management System

A full-stack web application built to digitize hotel reception operations from end to end. Guest records, room management, reservations, payments, parking tracking, and more β€” all managed from a single place.

The backend is powered by Spring Boot 3.4, the frontend by Angular 21. It uses PostgreSQL as the database, MinIO for file storage, Stripe for payments, and SendGrid for email delivery. Everything runs on Docker.


πŸ“‘ Table of Contents


🧰 Tech Stack

Layer Technology
Backend Java 17, Spring Boot 3.4.2, Spring Security, Spring Data JPA
Frontend Angular 21, TypeScript 5.9, Bootstrap 5 (Bootswatch), Tailwind CSS 4
Database PostgreSQL 15
File Storage MinIO (S3-compatible object storage)
Payments Stripe
Email SendGrid + Thymeleaf templates
Authentication JWT (JSON Web Token)
Migration Flyway
Mapping MapStruct + Lombok
Rate Limiting Bucket4j + Caffeine Cache
API Docs Springdoc OpenAPI (Swagger UI)
Testing JUnit, Spring Security Test, H2 (in-memory), Vitest (frontend)
Containers Docker & Docker Compose
Build Maven (backend), npm (frontend), multi-stage Dockerfile

πŸ“ Project Structure

Reception/
β”œβ”€β”€ docker-compose.yml          # Spins up all services
β”œβ”€β”€ Dockerfile                  # Multi-stage build for the backend
β”œβ”€β”€ pom.xml                     # Maven dependencies
β”œβ”€β”€ .env                        # (You need to create this) Environment variables
β”‚
β”œβ”€β”€ src/main/java/.../reception/
β”‚   β”œβ”€β”€ common/                 # Shared infrastructure
β”‚   β”‚   β”œβ”€β”€ config/             # Application configuration
β”‚   β”‚   β”œβ”€β”€ entity/             # Base entity classes
β”‚   β”‚   β”œβ”€β”€ exception/          # Global error handling
β”‚   β”‚   β”œβ”€β”€ filter/             # JWT filters
β”‚   β”‚   β”œβ”€β”€ response/           # Standardized API response models
β”‚   β”‚   β”œβ”€β”€ security/           # Spring Security setup
β”‚   β”‚   └── utility/            # Helper classes
β”‚   β”‚
β”‚   └── features/               # Business logic modules
β”‚       β”œβ”€β”€ admin/              # Admin management
β”‚       β”œβ”€β”€ audit/              # Audit logs
β”‚       β”œβ”€β”€ email/              # Email delivery
β”‚       β”œβ”€β”€ guest/              # Guest operations
β”‚       β”œβ”€β”€ images/             # Image management (MinIO)
β”‚       β”œβ”€β”€ parking/            # Parking tracking
β”‚       β”œβ”€β”€ profile/            # User profile
β”‚       β”œβ”€β”€ receptionist/       # Receptionist management
β”‚       β”œβ”€β”€ reservation/        # Reservation operations
β”‚       β”œβ”€β”€ room/               # Room management
β”‚       β”œβ”€β”€ schedule/           # Scheduling / Shifts
β”‚       β”œβ”€β”€ stripe/             # Payment integration
β”‚       └── user/               # User authentication
β”‚
β”œβ”€β”€ src/main/resources/
β”‚   β”œβ”€β”€ application.properties  # Application settings
β”‚   β”œβ”€β”€ db/migration/           # Flyway SQL files (V1–V8)
β”‚   └── templates/              # Thymeleaf email templates
β”‚
└── src/main/frontend/          # Angular application
    β”œβ”€β”€ Dockerfile              # Multi-stage build for the frontend
    β”œβ”€β”€ nginx.conf              # Nginx reverse proxy config
    └── src/app/
        β”œβ”€β”€ core/               # Guards, interceptors, models, services
        β”œβ”€β”€ features/           # Page components (16 modules)
        └── shared/             # Shared components

✨ Features

πŸ‘€ User Roles

The application is built around three distinct roles:

Role Permissions
ADMIN Full access β€” user, room, guest, reservation, receptionist, parking, image, and audit log management
RECEPTIONIST Guest, reservation, parking, and schedule management
GUEST View own profile, track reservations, make payments

πŸ”‘ Security & Authentication

  • Stateless authentication via JWT
  • Role-based access control (route guards + backend filtering)
  • Temporary password mechanism for account creation
  • Rate limiting for brute-force protection (Bucket4j)

🏠 Room & Reservation Management

  • Create, edit, and delete rooms
  • Upload room images (via MinIO)
  • Create and track reservations
  • Guest-specific reservation history

πŸ’³ Payments

  • Secure online payments with Stripe integration
  • Refund support

πŸ“§ Email

  • Email delivery via SendGrid API
  • Thymeleaf templates (reservation confirmation, temporary password)

πŸš— Parking Tracking

  • Assign and manage parking spaces for guests

πŸ“‹ Audit Logs

  • Automatic created_by, created_at, updated_by, updated_at tracking for all entities
  • Audit log viewer in the admin panel

πŸ–ΌοΈ Image Management

  • Image storage on MinIO (S3-compatible) object storage
  • Room image upload and listing

βš™οΈ Prerequisites

Make sure you have the following installed before getting started:

  • Java JDK 17 or higher
  • Node.js v18+ and npm
  • Docker Desktop
  • Maven (comes bundled with most IDEs)

πŸ”§ Setup

1. Create the Environment Variables File

Create a .env file in the project root directory and fill in the following variables with your own values:

# Database
DB_USER=reception_admin
DB_PASSWORD=your_strong_password

# JWT
JWT_SECRET_KEY=your_unique_jwt_secret_key

# SendGrid (Email)
SENDGRID_API_KEY=your_sendgrid_api_key
SPRING_EMAIL=verified@email.com
MAIL_FROM_NAME=Reception Hotel

# Stripe (Payments)
STRIPE_SECRET_KEY=your_stripe_secret_key

# MinIO (File Storage)
MINIO_USER=minioadmin
MINIO_PASSWORD=minioadmin
MINIO_ENDPOINT=http://localhost:9000

2. IDE Environment Variables (For Local Development)

If you're running the app from your IDE, add these environment variables to the ReceptionApplication run configuration:

DB_USER=reception_admin
DB_PASSWORD=your_strong_password
SPRING_DATASOURCE_URL=jdbc:postgresql://localhost:5432/reception_db
SPRING_DATASOURCE_USERNAME=reception_admin
SPRING_DATASOURCE_PASSWORD=your_strong_password
JWT=your_unique_jwt_secret_key
SENDGRID_API_KEY=your_sendgrid_api_key
SPRING_EMAIL=verified@email.com
MAIL_FROM_NAME=Reception Hotel
STRIPE_SECRET_KEY=your_stripe_secret_key
MINIO_USER=minioadmin
MINIO_PASSWORD=minioadmin
MINIO_ENDPOINT=http://localhost:9000

πŸš€ Running the App

You can run the application in two ways:

Option 1: Docker (Recommended) 🐳

The easiest way. A single command brings everything up:

docker compose up --build -d

This command starts the following services:

  • reception_backend β€” Spring Boot application
  • reception_frontend β€” Angular app (served via Nginx)
  • reception_postgres β€” PostgreSQL database
  • reception_flyway β€” Database migrations
  • reception_minio β€” File storage service

Open the app: http://localhost:4200

To follow the logs:

docker logs -f reception_backend

To start fresh (including wiping the database):

docker compose down -v
docker compose up --build -d

Option 2: Local Development πŸ’»

Ideal for active development. The database still runs via Docker, but the backend and frontend run locally.

Step 1 β€” Start the database and MinIO:

docker compose up --build -d db minio

Step 2 β€” Start the backend:

  • Run ReceptionApplication.java from your IDE, or:
./mvnw spring-boot:run

Step 3 β€” Start the frontend:

cd src/main/frontend
npm install
npm run build
ng serve

Frontend: http://localhost:4200
Backend (Swagger): http://localhost:8080/swagger-ui/index.html


πŸ”Œ Port Map

Service Port Description
Frontend 4200 Angular app (Nginx in Docker, ng serve locally)
Backend (Docker) 8082 Spring Boot application (Docker container)
Backend (Local) 8080 Spring Boot application (IDE / Maven)
PostgreSQL 5432 Database
MinIO API 9000 Object storage API
MinIO Console 9001 MinIO management console

πŸ“– API Documentation

Explore and test all API endpoints through Swagger UI.

All REST endpoints are versioned with the /api/v1 prefix.


πŸ—οΈ Technical Details

Topic Detail
Architecture Feature-based package structure split into common (infrastructure) and features (business logic)
Security Stateless JWT authentication with JwtAuthenticationFilter for request filtering
Database Migration 8 SQL migration files (V1–V8) managed by Flyway
Error Handling Global exception handler with standardized HTTP error responses
Auditing JPA Auditing for automatic created_by/at, updated_by/at tracking
Logging Structured logging via SLF4J (@Slf4j), configured in logback-spring.xml
Rate Limiting API request throttling with Bucket4j + Caffeine Cache
Object Mapping DTO ↔ Entity conversions via MapStruct
Email Templates HTML email templates with Thymeleaf (reservation-confirmation, temporary-password)
Frontend Build Multi-stage Docker build (Node.js β†’ Nginx), Tailwind CSS + Bootstrap
Testing Backend: JUnit + Spring Security Test + H2, Frontend: Vitest

πŸ”’ Git Policies

The following are excluded via .gitignore for security and a clean repository:

  • .env β€” Environment secrets, should never be committed
  • target/ β€” Java build artifacts
  • node_modules/ β€” Frontend dependencies
  • src/main/resources/static/* β€” Auto-generated frontend assets
  • .idea/, .vscode/ β€” IDE configurations

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/awesome-feature)
  3. Commit your changes (git commit -m 'Add awesome feature')
  4. Push to the branch (git push origin feature/awesome-feature)
  5. Open a Pull Request

Reception β€” Built to simplify hotel management. 🏨

About

Fourth Year / Comprehensive receptionist web app. (Angluar, Java Spring, Postgres, Docker, Flyway, Auditlogs, JWT, Global Excpetion Handling, Swagger, Logs, Feature Based) and much more.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors