No description
- TypeScript 47.7%
- CSS 27.5%
- Rust 23.1%
- HTML 0.9%
- Dockerfile 0.8%
| backend | ||
| frontend | ||
| .dockerignore | ||
| .gitignore | ||
| docker-compose.yml | ||
| README.md | ||
⚡ 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:
- ⚙️ Rust Axum Backend Service: http://localhost:3000 (
/api/health,/api/info,/api/echo) - 🌐 React SPA Frontend Service: http://localhost:5173
🌐 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 lightweightserverunner.