A fullstack URL shortener application with analytics and reporting.
- 🔗 Create shortened URLs
- 📋 List all shortened URLs
- 🗑️ Delete URLs
- 📊 Usage reports and analytics
- ↪️ Automatic redirection
brev.ly/
├── web/ # Frontend (React + TypeScript + Vite)
└── server/ # Backend (Node.js + TypeScript) + DevOps
- Node.js 20+
- pnpm
- Docker (for database)
cd server
# Install dependencies
pnpm install
# Configure environment variables
cp .env.example .env
# Edit .env with your settings
# Start the database
docker compose -f devops/docker/docker-compose.dev.yml up -d
# Run migrations
pnpm db:migrate
# Start the server
pnpm devThe server will be running at http://localhost:3333
cd web
# Install dependencies
pnpm install
# Configure environment variables
cp .env.example .env
# Edit .env with your settings
# Start the development server
pnpm devThe application will be running at http://localhost:3000
Server (.env)
PORT=3333
BASE_URL=http://localhost:3333
# Database
DATABASE_URL=postgresql://postgres:postgres@localhost:5432/brevly
POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres
POSTGRES_DB=brevly
POSTGRES_PORT=5432
# Cloudflare R2 (optional - for CSV export to cloud)
CLOUDFLARE_ACCOUNT_ID=
CLOUDFLARE_ACCESS_KEY_ID=
CLOUDFLARE_SECRET_ACCESS_KEY=
CLOUDFLARE_BUCKET=brevly
CLOUDFLARE_PUBLIC_URL=Web (.env)
VITE_FRONTEND_URL=http://localhost:3000
VITE_BACKEND_URL=http://localhost:3333See individual README files for complete environment variable documentation.
- React 18
- TypeScript
- Vite
- TailwindCSS
- Node.js
- TypeScript
- Fastify
- PostgreSQL
- Drizzle ORM
MIT