Skip to content

drawliin/url-shortener

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

URL Shortener Monorepo

This workspace contains:

  • backend/ Laravel 10 REST API
  • frontend/ React + Vite + TypeScript SPA

Run With Docker (Recommended)

  1. Create docker env file:
cp .env.docker.example .env.docker
  1. Build and start:
docker compose --env-file .env.docker up --build -d

First startup may take 1-3 minutes because MySQL initializes.

  1. Stop:
docker compose --env-file .env.docker down
  1. Stop and remove DB volume:
docker compose --env-file .env.docker down -v

Folder Structure

url-shortener/
  backend/
  frontend/
  docker-compose.yml

Run Locally

  1. Start backend:
cd backend
composer install
cp .env.example .env
php artisan key:generate
php artisan migrate
php artisan serve
  1. Start frontend (new terminal):
cd frontend
npm install
cp .env.example .env
npm run dev

URLs

  • Backend: http://localhost:8000
  • Frontend: http://localhost:5173
  • MySQL: localhost:3306

About

Self-hosted URL shortener — shorten links, track clicks, run your own short-link service. Laravel 10 API + React + TypeScript. Docker, MySQL, analytics included.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors