Skip to content

caricuanla/linkbio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LinkPro — Smart Link Management Platform

A professional, self-hosted URL shortener and link management platform with advanced analytics, QR code generation, traffic filtering, and a clean dashboard.

Features

  • 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

Tech Stack

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

Quick Start

Prerequisites

  • Node.js 18+
  • PostgreSQL 14+

1. Setup Database

createdb linkpro
psql linkpro < database/schema.sql
psql linkpro < database/seed.sql

2. Backend

cd backend
cp .env.example .env
# Edit .env with your database credentials and JWT secret
npm install
npm run dev  # → http://localhost:5000

3. Frontend

cd frontend
npm install
npm run dev  # → http://localhost:3000

Docker (Full Stack)

cp backend/.env.example backend/.env
# Edit backend/.env as needed
docker-compose up -d

The stack will be available at:

Default Credentials (seed data)

Role Email Password
Admin admin@linkpro.io Admin@123
User user@example.com User@123

Important: Change these credentials immediately after first login.

Project Structure

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

Environment Variables

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

API Documentation

See API.md for complete REST API documentation including authentication, link management, analytics, and admin endpoints.

Deployment

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.

Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/my-feature)
  3. Commit your changes (git commit -m 'Add my feature')
  4. Push to the branch (git push origin feature/my-feature)
  5. Open a Pull Request

License

MIT

About

linkbio

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors