A full stack URL shortener — Rust + Axum + PostgreSQL backend, React frontend.
url-shortener/
├── backend/ # Rust API (Axum + sqlx + PostgreSQL)
└── frontend/ # React app (Vite + Tailwind + shadcn)
git clone <repo-url>
cd url-shortenerEach part has its own setup instructions:
backend/README.md— PostgreSQL setup, environment config, running the APIfrontend/README.md— installing dependencies, running the dev server
Start the backend first (cargo run, default port 8080), then the
frontend (npm run dev, default port 5173).
- Shorten long URLs, with optional custom short codes
- Redirect via short code
- Click tracking / stats per short URL
| Method | Path | Description |
|---|---|---|
| GET | /api/health |
Health check |
| POST | /api/shorten |
Create a short URL |
| GET | /{code} |
Redirect to original URL |
| GET | /api/stats/{code} |
Get click stats |
See backend/README.md for full request/response examples.
Backend: Rust, Axum, sqlx, PostgreSQL Frontend: React, Vite, TypeScript, Tailwind CSS, shadcn/ui, Hugeicons# URL Shortener
url-shortener/
├── backend/ # Rust API (Axum + sqlx + PostgreSQL)
└── frontend/ # React app (Vite + Tailwind + shadcn)
git clone <repo-url>
cd url-shortenerEach part has its own setup instructions:
backend/README.md— PostgreSQL setup, environment config, running the APIfrontend/README.md— installing dependencies, running the dev server
Start the backend first (cargo run, default port 8080), then the
frontend (npm run dev, default port 5173).
- Shorten long URLs, with optional custom short codes
- Redirect via short code
- Click tracking / stats per short URL
| Method | Path | Description |
|---|---|---|
| GET | /api/health |
Health check |
| POST | /api/shorten |
Create a short URL |
| GET | /{code} |
Redirect to original URL |
| GET | /api/stats/{code} |
Get click stats |
See backend/README.md for full request/response examples.
Backend: Rust, Axum, sqlx, PostgreSQL Frontend: React, Vite, TypeScript, Tailwind CSS, shadcn/ui, Hugeicons
