Skip to content

Latest commit

 

History

143 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Restorio Platform

Restorio is a full-stack, multi-tenant restaurant management platform designed and implemented as a monorepo. The system comprises a RESTful backend built with the FastAPI framework, five specialised front-end applications developed in React and Next.js, a set of shared library packages, and an infrastructure layer orchestrated through Docker Compose and Cloudflare Workers. The project follows the monorepo pattern managed by Turborepo and Bun workspaces, which ensures consistent dependency resolution and unified build pipelines across all sub-projects.

System Architecture

Production topology and deployment boundaries are defined in ADR 0001. The current edge routing decision is defined in ADR 0003.

Production runs behind the shared Contabo platform-edge Caddy deployment, which proxies each Restorio hostname directly to its k3s NodePort. The restorio-edge Nginx Helm release is preview-only and remains on Mikrus because that host exposes only ports 20122 and 30122.

The repository is organised into the following top-level directories, each fulfilling a distinct role within the overall system architecture:

restorio-fullstack/
├── app/
│   ├── api/                 # RESTful backend service (Python 3.12+, FastAPI)
│   ├── apps/
│   │   ├── admin-panel/     # Administration dashboard        (React 18, Vite – port 3001)
│   │   ├── kitchen-panel/   # Kitchen order management panel  (React 19, Vite – port 3002)
│   │   ├── mobile-app/      # Customer-facing mobile client   (React 18, Vite – port 3003)
│   │   ├── public-web/      # Public website and ordering     (Next.js 19    – port 3000)
│   │   └── waiter-panel/    # Waiter management interface     (React 18, Vite – port 3004)
│   └── packages/
│       ├── api-client/      # HTTP client abstraction layer (Axios)
│       ├── auth/            # Authentication logic and context providers
│       ├── mobile/          # Shared mobile runtime shell, screens, and view models
│       ├── types/           # Shared TypeScript type definitions
│       ├── ui/              # Reusable component library with Tailwind CSS theming
│       └── utils/           # Common utility functions
├── e2e/                     # End-to-end test suite (Playwright)
├── nginx/                   # Reverse proxy configuration and TLS termination
├── worker/                  # Edge computing module (Cloudflare Workers)
├── deploy/                  # Application Helm charts and release delivery scripts
├── infrastructure/          # k3s provisioning and observability configuration
└── scripts/                 # Build automation and coverage reporting scripts

Technology Stack

The following table summarises the principal technologies and frameworks employed at each layer of the system:

Layer Technologies
Backend FastAPI, SQLAlchemy 2.0 (asynchronous), Alembic, Motor (MongoDB), Redis, MinIO
Frontend React 18/19, Next.js 19, Vite, TypeScript, Tailwind CSS, Zustand, TanStack Query, TanStack Virtual, React Hook Form
Infrastructure k3s, Helm, Nginx, Cloudflare Workers, PostgreSQL 17 with PostGIS, MongoDB 8, MinIO
Quality Assurance Vitest, Playwright, pytest, React Testing Library
Development Tooling Turborepo, Bun, uv, Ruff, ESLint, Prettier, Husky

Prerequisites

The following software must be installed prior to running the platform:

  • Bun >= 1.3.5 — JavaScript runtime and package manager
  • Python >= 3.12 — required for the backend service
  • uv — Python dependency management tool
  • Docker and Docker Compose — container orchestration

Environment Setup

The setup procedure consists of the following steps:

Step 1 — Install front-end dependencies

bun install

Step 2 — Start infrastructure services

# Development configuration (with automatic reloading)
docker compose -f docker-compose.dev.yml up -d

# Production configuration
docker compose up -d

This command initialises the PostgreSQL database server, MongoDB instance, MinIO object storage, and the API service.

Step 3 — Install backend dependencies

cd app/api
uv sync --extra dev

Step 4 — Apply database migrations

cd app/api
make migrate

Step 5 — Launch development servers

# Start all applications concurrently
bun run dev

# Alternatively, start a specific application
bun run dev:kitchen-panel

Available Scripts

The root package.json exposes the following commands for build orchestration, testing, and code quality enforcement:

Command Description
bun run dev Launch all applications in development mode with hot reloading
bun run build Execute production builds for all applications and packages
bun run test:unit Run the unit test suite via Vitest
bun run test:e2e Run the end-to-end test suite via Playwright
bun run check Perform static analysis and formatting verification
bun run format Apply automatic code formatting across the codebase
bun run clean Remove all build artefacts and cached outputs
bun run coverage:report Generate a consolidated test coverage report

Service Endpoints

During local development, the individual services are accessible at the following addresses:

Service URL Description
Public Web http://localhost:3000 Public-facing website with menu browsing and ordering
Admin Panel http://localhost:3001 Tenant administration and configuration dashboard
Kitchen Panel http://localhost:3002 Real-time order visualisation for kitchen personnel
Mobile App http://localhost:3003 Mobile-optimised customer interface
Waiter Panel http://localhost:3004 Order and table management for waiting staff
API http://localhost:8000 RESTful backend API
API Documentation http://localhost:8000/docs Interactive API documentation (Swagger UI)
MinIO Console http://localhost:9001 Object storage administration interface

Licence

Refer to the LICENSE file for licensing information.

Repository evolution

This repository remains the operational product source of truth during the gradual Python-to-Rust migration. It continues to own all frontend applications, the legacy FastAPI API, current API contracts, and the current production and preview deployment definitions until explicit parity migrations are complete. Python remains available under https://api.restorio.org/api/v1, while new Rust business APIs use https://api.restorio.org/v2. After the Python API and deployment configuration have been extracted, this repository will be renamed to restorio-frontend.

See Repository ecosystem and migration boundaries before moving code or deployment ownership.

About

full-stack, multi-tenant restaurant management platform

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages