Sauna booking site.
  • C# 44.8%
  • HTML 37.6%
  • CSS 17.6%
Find a file
2026-10-16 23:17:12 +02:00
.github/workflows Remove unstarted v2 rewrite: source tree, .sln references, stale deploy workflow 2026-10-16 23:17:12 +02:00
api Moved legacy repo from GitHub to Forgejo. Will be reviewed and updated soon. 2026-08-05 18:56:31 +02:00
client Feature: Updated FE-pipeline to reflect moving from FTP to a cloud provider. Did a cosmetic change to index.html to test trigger the pipeline. 2026-06-22 00:02:43 +02:00
.gitignore Updated gitignore 2026-06-23 12:06:34 +02:00
LICENSE Initial commit 2025-04-24 10:51:41 +02:00
README.md Feature: Updated FE-pipeline to reflect moving from FTP to a cloud provider. Did a cosmetic change to index.html to test trigger the pipeline. 2026-06-22 00:02:43 +02:00
sauna-booking.sln Remove unstarted v2 rewrite: source tree, .sln references, stale deploy workflow 2026-10-16 23:17:12 +02:00

Sauna Booking

This project is a lightweight, low-carbon footprint web application for booking a sauna (bastuflotte), designed to prioritize simplicity and energy efficiency.
It consists of a .NET 9 Web API backend and a Blazor WebAssembly frontend, deployed separately to support security, performance, and cost efficiency.

Key technologies and architecture

  • Backend: ASP.NET Core 9 Web API, Entity Framework Core (EF Core), SQLite for persistent storage
  • Frontend: Blazor WebAssembly (WASM), Bootstrap 5 for minimal UI styling
  • Hosting:
    • Backend API deployed on an EU-based Linux VM
    • Reverse proxy and TLS termination handled via Caddy Server with automated certificate management
    • Frontend static assets deployed to a separate EU-based VM over SSH/rsync
  • Security:
    • HTTPS with automatic TLS provisioning by Caddy
    • CORS configured for secure API communication
    • LocalStorage used for lightweight client-side session persistence
  • Deployment:
    • GitHub Actions CI/CD pipeline configured from a monorepo (/api/ + /client/)
    • Automated build-and-deploy workflows for backend and frontend over SSH/rsync
  • Project structure:
    • Clean separation between backend and frontend layers, with minimal coupling
  • Environment Configuration:
    • Development and production settings split across appsettings.Development.json and appsettings.json
    • Local development database (.local-data/) isolated and excluded from Git tracking

Project Goals

  • ✔ Low-maintenance, low-cost
  • ✔ Minimal energy use (small carbon footprint)
  • ✔ Mobile-first, responsive UI
  • ✔ UX-friendly, minimum viable product (MVP)

Project file and directory structure:

sauna-booking/                          Root folder of the project/repository (monorepo)
├── .github/
│   └── workflows/
│       └── deploy*.yaml                GitHub Actions workflows for build and deploy automation
│
├── api/                                .NET API ("backend")
│   ├── .local-data/                    Local development only: not tracked by Git
│   │   └── sauna-booking.db            Local database for local testing (excluded from production)
│   ├── Controllers/
│   │   ├── AuthController.cs           Handles login POST requests and returns login results
│   │   └── BookingController.cs        TODO: 
│   ├── Data/
│   │   └── SaunaBookingDbContext.cs    Entity Framework Core DbContext managing Bookings and Users tables
│   ├── Migrations/
│   │   └── *                           Entity Framework migration files (autogenerated)
│   ├── Models/
│   │   ├── DTOs/
│   │   │   └── UserDto.cs              TODO:
│   │   ├── Booking.cs                  Entity class representing a booking record in the database
│   │   ├── LoginRequest.cs             Data Transfer Object (DTO) for incoming login requests
│   │   ├── LoginResponse.cs            Data Transfer Object (DTO) for responses to login attempts
│   │   └── User.cs                     Entity class representing a registered user (admin, staff, customer)
│   ├── Properties/
│   │   └── launchSettings.json         Local server profiles (port, environment, SSL settings, etc.)
│   ├── Services/                       Business logic classes (e.g., BookingService, ValidationService)
│   ├── appsettings.Development.json    Local development environment settings (local DB config, logging level)
│   ├── appsettings.json                Production (or cloud) environment settings
│   ├── Program.cs                      Main application setup and configuration
│   └── SaunaBookingApi.csproj          .NET project file for the backend
│
├── client/                             Blazor WASM project ("frontend")
│   ├── Components/
│   │   ├── BookingPopup.razor          TODO:
│   │   └── Modal.razor                 TODO:
│   ├── Layout/
│   │   ├── MainLayout.razor            Root layout wrapper including header/footer/navigation
│   │   ├── MainLayout.razor.css        Styling for the main layout and theme switching
│   │   ├── NavMenu.razor               Navigation menu component with smart login/logout logic
│   │   └── NavMenu.razor.css           Styling for navigation menu and active page highlights
│   ├── Models/                         Frontend-only models (Blazor cannot reference backend Models)
│   │   ├── DTOs/
│   │   │   └── UserDto.cs              TODO:
│   │   ├── LoginRequest.cs             Model representing login form data (username + password)
│   │   ├── LoginResponse.cs            Model representing the API's login response (success, role, message)
│   ├── Pages/
│   │   ├── Calendar.razor              TODO:
│   │   ├── Dashboard.razor             TODO:
│   │   ├── Home.razor                  Landing page for the frontend
│   │   ├── Login.razor                 Login form page for user authentication
│   │   ├── Login.razor.css             Custom CSS for styling the login form
│   │   ├── NotFound.razor              TODO:
│   │   ├── UserManagement.razor        TODO:
│   │   └── UserManagement.razor.css    TODO:
│   ├── Properties/
│   │   └── launchSettings.json         Frontend local development server profiles
│   ├── Services/
│   │   ├── BookingStatusHelper.cs      TODO:
│   │   ├── UserManagementService.cs    TODO:
│   │   └── UserSessionService.cs       TODO:
│   ├── wwwroot/
│   │   ├── css/
│   │   │   └── app.css                 General site-wide frontend styles
│   │   ├── lib/
│   │   │   └── *                       Bootstrap and other external libraries (optional)
│   │   ├── favicon.ico                 Old format favicon (for older browser compatibility)
│   │   ├── favicon.webp                Modern compressed favicon
│   │   └── index.html                  Root HTML for Blazor WASM app, sets up the base URL and loads Blazor
│   ├── _Imports.razor                  Common Razor using directives for all frontend components
│   ├── App.razor                       Root routing handler for the Blazor app
│   ├── client.csproj                   .NET project file for the frontend
│   └── Program.cs                      Startup configuration for the Blazor frontend
│
├── client_publish/                     Local output folder for frontend publishing (not tracked by Git)
│   └── wwwroot/                        Published frontend assets used by the deploy workflow
│
├── .gitignore                          Git rules for ignoring binaries, temp files, secrets, etc.
├── LICENSE                             Open-source license for the project
├── README.md                           This file: project overview and file structure
└── sauna-booking.sln                   Visual Studio solution file tying together api/ and client/