Skip to content

LinkHub is a powerful, modern link-in-bio platform built with Node.js and deployed on Tencent Kubernetes Engine (TKE). Create stunning, customizable link pages with analytics, QR codes, and more.

License

Notifications You must be signed in to change notification settings

RectiFlex/link-bio-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

18 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ”— LinkHub - Modern Link-in-Bio Platform

Deploy to TKE Tests License: MIT

πŸ“– Overview

LinkHub is a powerful, modern link-in-bio platform built with Node.js and deployed on Tencent Kubernetes Engine (TKE). Create stunning, customizable link pages with analytics, QR codes, and more.

✨ Features

  • 🎨 Customizable themes and layouts
  • πŸ“Š Advanced analytics and tracking
  • πŸ”’ Secure authentication and authorization
  • πŸ“± Mobile-responsive design
  • 🌍 Multi-language support
  • πŸ”„ Real-time statistics
  • πŸ“· Image and media hosting
  • πŸ”— QR code generation
  • πŸ“ˆ Performance monitoring

πŸš€ Quick Start

Prerequisites

  • Node.js >= 16
  • Docker
  • kubectl
  • Tencent Cloud account
  • MongoDB

Local Development

# Clone the repository
git clone https://github.com/yourusername/linkhub.git

# Install dependencies
cd linkhub
npm install

# Set up environment variables
cp .env.example .env

# Start development server
npm run dev

🐳 Docker Deployment

# Build Docker image
docker build -t linkhub-api .

# Run container
docker run -p 3000:3000 linkhub-api

🌟 Kubernetes Deployment

TKE Setup

# Apply Kubernetes configurations
kubectl apply -k k8s/overlays/prod

# Verify deployment
kubectl get pods -n linkhub-prod

Environment Configuration

# Create namespace
kubectl create namespace linkhub-prod

# Create secrets
kubectl create secret generic linkhub-secrets \
  --from-literal=JWT_SECRET=your-jwt-secret \
  --from-literal=AWS_ACCESS_KEY=your-aws-key \
  --from-literal=AWS_SECRET_KEY=your-aws-secret \
  -n linkhub-prod

πŸ—οΈ Project Structure

linkhub/
β”œβ”€β”€ πŸ“ src/
β”‚   β”œβ”€β”€ πŸ“ config/
β”‚   β”œβ”€β”€ πŸ“ controllers/
β”‚   β”œβ”€β”€ πŸ“ middleware/
β”‚   β”œβ”€β”€ πŸ“ models/
β”‚   β”œβ”€β”€ πŸ“ routes/
β”‚   └── πŸ“ utils/
β”œβ”€β”€ πŸ“ k8s/
β”‚   β”œβ”€β”€ πŸ“ base/
β”‚   └── πŸ“ overlays/
β”œβ”€β”€ πŸ“ tests/
└── πŸ“„ README.md

πŸ§ͺ Testing

# Run all tests
npm test

# Run specific tests
npm test tests/integration/profile.test.js

# Run tests with coverage
npm run test:coverage

πŸ“Š Monitoring & Analytics

  • πŸ“ˆ Prometheus metrics
  • πŸ“Š Grafana dashboards
  • πŸ” Error tracking
  • ⚑ Performance monitoring

πŸ” Security Features

  • πŸ”’ JWT Authentication
  • πŸ›‘οΈ Rate limiting
  • πŸ”‘ Role-based access control
  • πŸ” TLS encryption
  • πŸ›‘ XSS protection

πŸš€ CI/CD Pipeline

graph LR
    A[Code Push] --> B[Tests]
    B --> C[Build]
    C --> D[Deploy to Dev]
    D --> E[Tests Pass]
    E --> F[Deploy to Staging]
    F --> G[Manual Approval]
    G --> H[Deploy to Prod]
Loading

πŸ“± API Endpoints

Authentication

  • πŸ”‘ POST /api/auth/signup
  • πŸ”‘ POST /api/auth/login
  • πŸ”‘ POST /api/auth/forgot-password

Profile

  • πŸ‘€ GET /api/profile
  • πŸ‘€ PATCH /api/profile
  • πŸ“Έ POST /api/profile/image

Links

  • πŸ”— GET /api/links
  • πŸ”— POST /api/links
  • πŸ”— PATCH /api/links/:id
  • πŸ”— DELETE /api/links/:id

Analytics

  • πŸ“Š GET /api/analytics/dashboard
  • πŸ“Š GET /api/analytics/links/:linkId

πŸ› οΈ Environment Variables

NODE_ENV=production
PORT=3000
MONGODB_URI=mongodb://localhost:27017/linkhub
JWT_SECRET=your-secret-key
AWS_ACCESS_KEY=your-access-key
AWS_SECRET_KEY=your-secret-key

🀝 Contributing

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

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ“ž Support

πŸ™ Acknowledgments

  • Tencent Cloud for TKE
  • MongoDB Team
  • Node.js Community
  • All contributors

Made with ❀️ by Your Team

About

LinkHub is a powerful, modern link-in-bio platform built with Node.js and deployed on Tencent Kubernetes Engine (TKE). Create stunning, customizable link pages with analytics, QR codes, and more.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published