Skip to content

Latest commit

 

History

12 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

URL Shortener

A full stack URL shortener — Rust + Axum + PostgreSQL backend, React frontend.

Preview

Project Structure

url-shortener/
├── backend/      # Rust API (Axum + sqlx + PostgreSQL)
└── frontend/     # React app (Vite + Tailwind + shadcn)

Prerequisites

  • Rust (curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh)
  • Node.js (v18+)
  • PostgreSQL

Quick Start

git clone <repo-url>
cd url-shortener

Each part has its own setup instructions:

Start the backend first (cargo run, default port 8080), then the frontend (npm run dev, default port 5173).

Features

  • Shorten long URLs, with optional custom short codes
  • Redirect via short code
  • Click tracking / stats per short URL

API Overview

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.

Tech Stack

Backend: Rust, Axum, sqlx, PostgreSQL Frontend: React, Vite, TypeScript, Tailwind CSS, shadcn/ui, Hugeicons# URL Shortener

Project Structure

url-shortener/
├── backend/      # Rust API (Axum + sqlx + PostgreSQL)
└── frontend/     # React app (Vite + Tailwind + shadcn)

Prerequisites

  • Rust (curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh)
  • Node.js (v18+)
  • PostgreSQL

Quick Start

git clone <repo-url>
cd url-shortener

Each part has its own setup instructions:

Start the backend first (cargo run, default port 8080), then the frontend (npm run dev, default port 5173).

Features

  • Shorten long URLs, with optional custom short codes
  • Redirect via short code
  • Click tracking / stats per short URL

API Overview

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.

Tech Stack

Backend: Rust, Axum, sqlx, PostgreSQL Frontend: React, Vite, TypeScript, Tailwind CSS, shadcn/ui, Hugeicons

About

A full stack URL shortener — Rust + Axum + PostgreSQL backend, React frontend.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages