A professional, self-hosted URL shortener and link management platform with advanced analytics, QR code generation, traffic filtering, and a clean dashboard.
- Link Shortener — Custom short keys, multiple link types (URL, WhatsApp, Email, Phone, Social)
- Analytics — Clicks over time, geo breakdown, device/browser/OS stats, referrers
- QR Codes — Customizable QR with color picker, download PNG/SVG
- Smart Redirects — Country/device/language-based redirect rules
- Traffic Filtering — IP/country/referrer blacklist & whitelist
- Password Protection — Per-link password gate
- Custom Domains — Connect your own branded domains
- API Access — REST API with API key authentication
- Admin Panel — User management, system stats
- Dark/Light Mode — Full theme support
| Layer | Technology |
|---|---|
| Frontend | React 18, Vite, Tailwind CSS, Recharts |
| Backend | Node.js, Express |
| Database | PostgreSQL |
| Auth | JWT, bcrypt |
| QR | qrcode npm package |
| Geo | geoip-lite |
- Node.js 18+
- PostgreSQL 14+
createdb linkpro
psql linkpro < database/schema.sql
psql linkpro < database/seed.sqlcd backend
cp .env.example .env
# Edit .env with your database credentials and JWT secret
npm install
npm run dev # → http://localhost:5000cd frontend
npm install
npm run dev # → http://localhost:3000cp backend/.env.example backend/.env
# Edit backend/.env as needed
docker-compose up -dThe stack will be available at:
- Frontend: http://localhost:3000
- Backend API: http://localhost:5000
- Database: localhost:5432
| Role | Password | |
|---|---|---|
| Admin | admin@linkpro.io | Admin@123 |
| User | user@example.com | User@123 |
Important: Change these credentials immediately after first login.
linkpro/
├── backend/ # Express API server
│ ├── src/
│ │ ├── app.js # App entry point
│ │ ├── routes/ # Route handlers
│ │ ├── controllers/ # Business logic
│ │ ├── models/ # Database models
│ │ ├── middleware/ # Auth, error handling
│ │ └── utils/ # Helpers (geo, qr, etc.)
│ ├── uploads/ # User file uploads
│ ├── Dockerfile
│ └── .env.example
├── frontend/ # React/Vite SPA
│ ├── src/
│ │ ├── components/ # Reusable UI components
│ │ ├── pages/ # Page-level components
│ │ ├── hooks/ # Custom React hooks
│ │ ├── store/ # State management
│ │ └── utils/ # API client, helpers
│ ├── Dockerfile
│ └── nginx.conf
├── database/
│ ├── schema.sql # Table definitions
│ └── seed.sql # Default data
├── nginx/
│ └── nginx.conf # Reverse proxy config
├── docker-compose.yml
└── README.md
Copy backend/.env.example to backend/.env and configure:
| Variable | Description | Default |
|---|---|---|
PORT |
API server port | 5000 |
NODE_ENV |
Environment | development |
DB_HOST |
PostgreSQL host | localhost |
DB_PORT |
PostgreSQL port | 5432 |
DB_NAME |
Database name | linkpro |
DB_USER |
Database user | — |
DB_PASSWORD |
Database password | — |
JWT_SECRET |
Secret for signing JWTs | — |
JWT_EXPIRES_IN |
Token expiry | 7d |
BASE_URL |
Public base URL for short links | http://localhost:5000 |
FRONTEND_URL |
Frontend URL (for CORS) | http://localhost:3000 |
See API.md for complete REST API documentation including authentication, link management, analytics, and admin endpoints.
See SETUP.md for step-by-step VPS and shared hosting deployment guides, including nginx reverse proxy setup and SSL/TLS configuration with Let's Encrypt.
- Fork the repository
- Create a feature branch (
git checkout -b feature/my-feature) - Commit your changes (
git commit -m 'Add my feature') - Push to the branch (
git push origin feature/my-feature) - Open a Pull Request
MIT