🔗 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 URL
  • GET /api/urls — List all URLs
  • GET /api/stats — Get analytics
  • GET /api/urls/{id} — Get URL info
  • GET /{id} — Redirect to original URL
  • GET /health — Health check

Deployment

The project uses Gitea Actions CI/CD:

  1. Lint & test on every push
  2. Build Docker image on merge to main
  3. Push to Harbor registry
  4. Deploy to Kubernetes cluster

Architecture

┌─────────────┐     ┌──────────────┐     ┌─────────────┐
│   React UI  │────▶│  Axum API    │────▶│  Harbor     │
│  (Vite)     │     │  (Rust)      │     │  Registry   │
└─────────────┘     └──────────────┘     └─────────────┘
                              │                    │
                              ▼                    ▼
                       ┌──────────────┐     ┌─────────────┐
                       │  Victoria    │     │ Kubernetes  │
                       │  Metrics     │     │ Cluster     │
                       └──────────────┘     └─────────────┘
S
Description
Hello Web - Rust + React URL Shortener
Readme
39 KiB
Languages
JavaScript 43.2%
Rust 32.3%
HTML 18.5%
Dockerfile 6%