Documentation
Everything You Need to Know
Comprehensive guides for users, administrators, and developers.
Quick Installation
Database
PostgreSQL 14+ required. Create a database and note your connection URL.
Clone & Install
Clone the repository and run npm install to install all dependencies.
Configure .env
Copy .env.example to .env and fill in your database URL, secrets, and payment keys.
Migrate & Seed
Run npx prisma migrate deploy and npm run seed to set up your database.
Build & Deploy
Run npm run build then npm start. Configure Nginx/Apache as a reverse proxy.
# Clone the repository git clone https://github.com/your-username/linkpay.git cd linkpay # Install dependencies npm install # Setup environment cp .env.example .env # Edit .env with your settings # Setup database npx prisma migrate deploy npm run seed # Build and start npm run build npm start
Getting Started
Quick Start Guide
Get up and running in 5 minutes
System Requirements
Server specs and software versions
Installation Guide
Step-by-step deployment instructions
Environment Configuration
Setting up .env variables
Database Setup
PostgreSQL schema and migrations
First Link Creation
Create and share your first short link
User Guide
Dashboard Overview
Understanding your control panel
Creating Short Links
All options and ad type selection
Managing Campaigns
Creating and monitoring ad campaigns
Analytics & Statistics
Interpreting your performance data
Earnings & Payouts
How earnings work and withdrawal process
Referral Program
Invite users and earn commissions
Admin Guide
Admin Dashboard
System-wide monitoring and controls
User Management
Managing accounts and permissions
Plan Management
Creating and editing subscription plans
Payment Configuration
Setting up Stripe, PayPal, crypto
Content Management
Pages, blog posts, announcements
System Settings
All configurable platform options
Environment Variables Reference
| Variable | Required | Description |
|---|---|---|
| DATABASE_URL | Required | PostgreSQL connection string |
| NEXTAUTH_SECRET | Required | Random secret for session encryption (32+ chars) |
| NEXTAUTH_URL | Required | Your site's full URL (e.g., https://linkpay.io) |
| STRIPE_SECRET_KEY | Optional | Stripe secret key for payment processing |
| STRIPE_PUBLISHABLE_KEY | Optional | Stripe publishable key |
| PAYPAL_CLIENT_ID | Optional | PayPal client ID |
| PAYPAL_CLIENT_SECRET | Optional | PayPal client secret |
| SMTP_HOST | Optional | Email server hostname |
| SMTP_USER | Optional | SMTP username/email |
| SMTP_PASS | Optional | SMTP password |
| HCAPTCHA_SECRET | Optional | hCaptcha secret for CAPTCHA protection |
| GEOIP_DB_PATH | Optional | Path to MaxMind GeoLite2 database |