Skip to content
Β 
Β 

Latest commit

Β 

History

46 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧠 Neural Nexus - Smart Link Hub Platform

Neural Nexus Version License

Your intelligent link hub platform with powerful analytics, QR code generation, health monitoring, and rule-based routing.

Features β€’ Tech Stack β€’ Installation β€’ Usage β€’ API Documentation


πŸ“‹ Table of Contents


🌟 Overview

Neural Nexus is a modern, full-stack link management platform that allows users to create beautiful, shareable link hubs (similar to Linktree) with advanced features like analytics, QR code generation, link health monitoring, and intelligent rule-based routing.

Perfect for:

  • πŸ“± Social media influencers
  • πŸ’Ό Business professionals
  • 🎀 Event organizers
  • 🎨 Content creators
  • 🏒 Marketing teams

✨ Features

πŸ”— Link Hub Management

  • Create multiple customizable link hubs
  • Add, edit, delete, and reorder links
  • Custom slugs for branded URLs
  • Enable/disable links without deleting
  • Rich preview cards with thumbnails

πŸ“Š Advanced Analytics

  • Real-time click tracking
  • Geographic distribution maps
  • Device type breakdown (mobile, desktop, tablet)
  • Browser analytics
  • Time-series charts for trend analysis
  • Export data capabilities

πŸ§ͺ A/B Testing

  • Create A/B tests for links
  • Track conversion rates
  • Statistical significance analysis
  • Automatic winner selection

πŸ‘₯ Audience Segmentation

  • Create custom audience segments
  • Rule-based visitor categorization
  • Target specific user groups
  • Behavior-based segmentation

βš™οΈ Rule Engine

  • Create conditional routing rules
  • Time-based redirects
  • Device-specific routing
  • Location-based rules
  • Performance-based optimization

πŸ“± QR Code Generation

  • Generate QR codes for link hubs
  • Customizable colors and sizes
  • High error correction for distance scanning
  • Download as PNG
  • Print-ready format
  • Python script for local IP/ngrok support

πŸ₯ Link Health Monitoring

  • Real-time link availability checks
  • Response time tracking
  • Status categorization (active, slow, broken)
  • Bulk health checks
  • Browser header spoofing to bypass bot detection

🎨 User Interface

  • Modern, responsive design
  • Dark/Light theme toggle
  • Mobile-first approach
  • Smooth animations
  • Intuitive navigation
  • Accessible components

πŸ” Security

  • JWT-based authentication
  • Password hashing with bcrypt
  • Rate limiting
  • CORS protection
  • Input validation
  • XSS protection

πŸ›  Tech Stack

Frontend

  • Framework: React 18.3.1
  • Build Tool: Vite 6.0.5
  • Styling: Tailwind CSS 3.4.17
  • UI Components: Radix UI
  • Animations: Framer Motion
  • Charts: Recharts
  • QR Codes: qrcode.react
  • HTTP Client: Axios
  • Routing: React Router (custom implementation)
  • Notifications: Sonner

Backend

  • Runtime: Node.js
  • Framework: Express.js 4.21.2
  • Database: MongoDB with Mongoose
  • Caching: Redis
  • Authentication: JWT (jsonwebtoken)
  • Security: Helmet, express-rate-limit
  • Validation: Joi
  • Password Hashing: bcrypt
  • HTTP Client: Axios (for link health checks)

Additional Tools

  • Python: QR code generation with local network support
  • Git: Version control
  • npm: Package management

πŸ“¦ Installation

Prerequisites

  • Node.js (v16 or higher)
  • MongoDB (local or cloud)
  • Redis (optional, for caching)
  • Python 3.x (for QR generator script)

1. Clone the Repository

git clone https://github.com/Nihar1604/NeuralNexus.git
cd NeuralNexus

2. Backend Setup

cd backend
npm install

Create .env file:

PORT=3000
MONGODB_URI=mongodb://localhost:27017/neural-nexus
JWT_SECRET=your_super_secret_jwt_key_here_change_in_production
JWT_EXPIRES_IN=7d
REDIS_URL=redis://localhost:6379
FRONTEND_URL=http://localhost:5173
NODE_ENV=development

Start MongoDB:

# Windows
mongod

# macOS/Linux
sudo systemctl start mongod

Start Redis (optional):

# Windows
redis-server

# macOS/Linux
sudo systemctl start redis

Start backend:

npm run dev

3. Frontend Setup

cd frontend
npm install

Create .env file:

VITE_API_URL=http://localhost:3000/api

Start frontend:

npm run dev

4. Python QR Generator (Optional)

pip install qrcode[pil]

πŸš€ Usage

Access the Application

Create an Account

  1. Navigate to the landing page
  2. Click "Register"
  3. Fill in your details
  4. Start creating link hubs!

Create Your First Hub

  1. Log in to your account
  2. Go to "My Link Hubs"
  3. Click "Create New Hub"
  4. Add your links
  5. Share your unique URL or QR code

Generate QR Codes

Option 1: Web Interface

  1. Navigate to "QR Generator"
  2. Select your hub
  3. Customize colors and size
  4. Download as PNG

Option 2: Python Script (for local network access)

# Local WiFi only
python qr_generator.py my-github

# Public access with ngrok
python qr_generator.py my-github --public https://abc123.ngrok.io

# Custom output file
python qr_generator.py my-github myqr.png

Monitor Link Health

  1. Go to "Link Health"
  2. Select a hub
  3. Click "Check All Links"
  4. View status, response times, and issues

View Analytics

  1. Navigate to "Analytics"
  2. Select date range
  3. View clicks, geographic data, devices, and browsers
  4. Export data for reports

πŸ“ Project Structure

NeuralNexus/
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ config/         # Database and Redis configuration
β”‚   β”‚   β”œβ”€β”€ controllers/    # Route handlers
β”‚   β”‚   β”œβ”€β”€ middleware/     # Authentication, validation, rate limiting
β”‚   β”‚   β”œβ”€β”€ models/         # Mongoose schemas
β”‚   β”‚   β”œβ”€β”€ routes/         # API routes
β”‚   β”‚   β”œβ”€β”€ services/       # Business logic
β”‚   β”‚   └── utils/          # Helper functions
β”‚   β”œβ”€β”€ .env               # Environment variables
β”‚   └── package.json
β”œβ”€β”€ frontend/
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ api/           # API client functions
β”‚   β”‚   β”œβ”€β”€ app/
β”‚   β”‚   β”‚   β”œβ”€β”€ components/  # Reusable UI components
β”‚   β”‚   β”‚   └── pages/       # Page components
β”‚   β”‚   β”œβ”€β”€ context/       # React context providers
β”‚   β”‚   └── styles/        # Global styles
β”‚   β”œβ”€β”€ .env              # Environment variables
β”‚   └── package.json
β”œβ”€β”€ qr_generator.py       # Python QR code generator
β”œβ”€β”€ setup_public_access.md # Public access setup guide
└── README.md

πŸ“š API Documentation

Authentication

Register

POST /api/auth/register
Content-Type: application/json

{
  "email": "user@example.com",
  "password": "password123",
  "username": "johndoe",
  "fullName": "John Doe"
}

Login

POST /api/auth/login
Content-Type: application/json

{
  "email": "user@example.com",
  "password": "password123"
}

Link Hubs

Get All Hubs

GET /api/hubs
Authorization: Bearer {token}

Create Hub

POST /api/hubs
Authorization: Bearer {token}
Content-Type: application/json

{
  "title": "My Links",
  "slug": "my-links",
  "description": "My personal link hub",
  "links": [
    {
      "title": "GitHub",
      "url": "https://github.com/username",
      "isActive": true
    }
  ]
}

Update Hub

PUT /api/hubs/:id
Authorization: Bearer {token}
Content-Type: application/json

{
  "title": "Updated Title",
  "links": [...]
}

Delete Hub

DELETE /api/hubs/:id
Authorization: Bearer {token}

Check Hub Health

POST /api/hubs/:id/check-health
Authorization: Bearer {token}

Public Access

Get Public Hub

GET /api/public/:slug

Track Click

POST /api/public/:slug/click
Content-Type: application/json

{
  "linkId": "link123",
  "referrer": "https://twitter.com",
  "userAgent": "Mozilla/5.0..."
}

Analytics

Get Hub Analytics

GET /api/analytics/:hubId?startDate=2026-01-01&endDate=2026-01-31
Authorization: Bearer {token}

Segmentation

Get Segments

GET /api/segmentation
Authorization: Bearer {token}

Create Segment

POST /api/segmentation
Authorization: Bearer {token}
Content-Type: application/json

{
  "name": "Mobile Users",
  "criteria": [
    {
      "field": "device",
      "operator": "equals",
      "value": "mobile"
    }
  ]
}

Rule Engine

Get Rules

GET /api/rules
Authorization: Bearer {token}

Create Rule

POST /api/rules
Authorization: Bearer {token}
Content-Type: application/json

{
  "name": "Weekend Redirect",
  "hubId": "hub123",
  "isEnabled": true,
  "conditions": [
    {
      "field": "dayOfWeek",
      "operator": "in",
      "value": ["Saturday", "Sunday"]
    }
  ],
  "action": {
    "type": "redirect",
    "value": "https://weekend-special.com"
  }
}

πŸ”§ Environment Variables

Backend (.env)

# Server
PORT=3000
NODE_ENV=development

# Database
MONGODB_URI=mongodb://localhost:27017/neural-nexus

# Authentication
JWT_SECRET=your_secret_key_change_in_production
JWT_EXPIRES_IN=7d

# Redis (optional)
REDIS_URL=redis://localhost:6379

# Frontend URL
FRONTEND_URL=http://localhost:5173

Frontend (.env)

# API
VITE_API_URL=http://localhost:3000/api

πŸ“± QR Code Generation

Web-Based Generation

Use the built-in QR Generator page in the application.

Python Script

For generating QR codes that work on local networks or with ngrok:

# Install dependencies
pip install qrcode[pil]

# Generate QR code (auto-detects local IP)
python qr_generator.py my-hub-slug

# Use ngrok for public access
ngrok http 5173
python qr_generator.py my-hub-slug --public https://abc123.ngrok.io

# Custom output file
python qr_generator.py my-hub-slug output.png

See setup_public_access.md for detailed instructions on using ngrok for external access.


🌐 Deployment

Frontend Deployment (Vercel/Netlify)

Vercel

npm install -g vercel
cd frontend
vercel

Netlify

npm install -g netlify-cli
cd frontend
npm run build
netlify deploy --prod --dir=dist

Backend Deployment (Render/Railway)

Render

  1. Create new Web Service
  2. Connect GitHub repository
  3. Set build command: cd backend && npm install
  4. Set start command: cd backend && npm start
  5. Add environment variables

Railway

  1. Create new project
  2. Connect GitHub repository
  3. Add environment variables
  4. Deploy

Database (MongoDB Atlas)

  1. Create free cluster at mongodb.com
  2. Get connection string
  3. Update MONGODB_URI in backend .env

🀝 Contributing

We welcome contributions! Here's how you can help:

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

Development Guidelines

  • Follow existing code style
  • Write meaningful commit messages
  • Add comments for complex logic
  • Test your changes thoroughly
  • Update documentation as needed

πŸ› Known Issues

  • Theme toggle requires page refresh on first use (working on fix)
  • Link health checks may timeout for slow servers (configurable)

πŸ“ License

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


πŸ‘₯ Authors


πŸ™ Acknowledgments


πŸ“§ Support

For support, email support@neuralnexus.app or open an issue on GitHub.


Made with ❀️ for Advitya Hackathon 2026

⭐ Star this repo if you find it useful!

About

A repo for hackathon project

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages