main
🔗 Hello Web — URL Shortener
Rust + React URL shortener with analytics dashboard.
Features
- Create short URLs with optional custom aliases
- Click tracking and analytics
- Beautiful React frontend with dark theme
- RESTful API backend
- Full CI/CD pipeline with Gitea Actions
- Docker multi-stage builds
- Kubernetes deployment with auto-scaling
Tech Stack
- Backend: Rust + Axum
- Frontend: React + Vite
- CI/CD: Gitea Actions
- Registry: Harbor
- Deployment: Kubernetes + ArgoCD
- Monitoring: VictoriaMetrics
Local Development
# Backend
cargo run
# Frontend (separate terminal)
cd frontend
npm install
npm run dev
API Endpoints
POST /api/shorten— Create short URLGET /api/urls— List all URLsGET /api/stats— Get analyticsGET /api/urls/{id}— Get URL infoGET /{id}— Redirect to original URLGET /health— Health check
Deployment
The project uses Gitea Actions CI/CD:
- Lint & test on every push
- Build Docker image on merge to main
- Push to Harbor registry
- Deploy to Kubernetes cluster
Architecture
┌─────────────┐ ┌──────────────┐ ┌─────────────┐
│ React UI │────▶│ Axum API │────▶│ Harbor │
│ (Vite) │ │ (Rust) │ │ Registry │
└─────────────┘ └──────────────┘ └─────────────┘
│ │
▼ ▼
┌──────────────┐ ┌─────────────┐
│ Victoria │ │ Kubernetes │
│ Metrics │ │ Cluster │
└──────────────┘ └─────────────┘
Languages
JavaScript
43.2%
Rust
32.3%
HTML
18.5%
Dockerfile
6%