No description
  • TypeScript 47.7%
  • CSS 27.5%
  • Rust 23.1%
  • HTML 0.9%
  • Dockerfile 0.8%
Find a file
2026-08-07 20:01:03 +02:00
backend Initial commit 2026-08-07 19:46:35 +02:00
frontend Switch frontend runner to serve static server and add explicit allowedHosts 2026-08-07 20:01:03 +02:00
.dockerignore Initial commit 2026-08-07 19:46:35 +02:00
.gitignore Initial commit 2026-08-07 19:46:35 +02:00
docker-compose.yml Initial commit 2026-08-07 19:46:35 +02:00
README.md Initial commit 2026-08-07 19:46:35 +02:00

Rust + React Enterprise Web Infrastructure

A modern, containerized full-stack web application setup featuring a Rust (Axum) backend and a React 18 + Vite frontend, optimized for external reverse proxies (e.g. your system Nginx / Traefik / Caddy).


🚀 Quick Start with Docker

To build and launch the stack in isolated Docker containers:

docker compose up -d --build

Once running:


🌐 External Nginx Configuration Example

If you have an existing Nginx instance on your host machine or reverse proxy container, add the following configuration:

server {
    listen 80;
    server_name yourdomain.com;

    # Forward web application traffic to Frontend container
    location / {
        proxy_pass http://127.0.0.1:5173;
        proxy_http_version 1.1;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }

    # Forward API traffic directly to Rust Axum backend
    location /api/ {
        proxy_pass http://127.0.0.1:3000/api/;
        proxy_http_version 1.1;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }
}

🛠️ Infrastructure Overview

                        ┌───────────────────────────────┐
                        │     External Nginx Proxy      │
                        │    (System / Host Machine)    │
                        └───────────────┬───────────────┘
                                        │
                 ┌──────────────────────┴──────────────────────┐
                 │                                             │
                 ▼ Port 5173                                   ▼ Port 3000
    ┌───────────────────────────────┐             ┌───────────────────────────────┐
    │     React 18 + Vite SPA       │             │       Rust Axum Backend       │
    │      (Node Serve Runner)      │             │         (Tokio Engine)        │
    └───────────────────────────────┘             └───────────────────────────────┘
  • Backend (/backend): Axum 0.8 on Tokio, CORS support, system metrics (sysinfo), structured JSON responses (serde).
  • Frontend (/frontend): React 18 SPA built with Vite, styled with custom dark glassmorphism design, served directly via lightweight serve runner.