Production-ready authentication and forum system with C++ loader integration, designed for secure software licensing and community management.
- JWT Authentication with refresh token rotation
- Session Binding to Device + IP + Timestamp
- Multi-factor Security with device fingerprinting
- Payload Encryption (AES-256-GCM on top of HTTPS)
- Anti-Replay Protection with nonce-based system
- Rate Limiting (Redis-backed)
- Multiple License Types: Trial, Subscription, Lifetime, One-Time
- Device Binding with configurable device limits
- HWID Tracking with tolerance for hardware changes
- Activation Management with automatic expiration
- License Suspension and shadow banning
- Secure Handshake protocol (RSA-4096 key exchange)
- Anti-Debugging detection (IsDebuggerPresent, PEB checks)
- Anti-VM/Sandbox detection
- Memory & Binary Integrity validation
- Self-Checksum verification
- Complete API Interface with example code
- Categories & Threads with soft-delete support
- RBAC/ABAC Permissions (Role & Attribute-based access control)
- Thread/Post-level Permissions
- Markdown Support for rich text
- Direct Messaging between users
- File Attachments with size limits
- User Management (ban, HWID reset, session control)
- License Management (generate, revoke, view activations)
- Security Monitoring (audit logs, suspicious activity alerts)
- Real-time Statistics
- NestJS (TypeScript)
- PostgreSQL (Database)
- Redis (Caching, Sessions, Rate Limiting)
- Prisma (ORM)
- JWT (Authentication)
- OpenSSL (Cryptography)
- Next.js 14 (React with App Router)
- TypeScript
- TailwindCSS (Dark mode support)
- Axios (API Client)
- CMake (Build System)
- OpenSSL (libssl, libcrypto)
- libcurl (HTTP Client)
- Node.js 20+
- Option A: Docker - Docker & Docker Compose
- Option B: Local - PostgreSQL 16+ & Redis 7+
git clone https://github.com/naix1337/authsysteminsolution.git
cd authsysteminsolutiondocker-compose up -d postgres rediscd backend
npm install
npx prisma generate
npx prisma migrate dev
npm run start:devBackend runs on: http://localhost:3001
API Docs: http://localhost:3001/api/docs
cd frontend
npm install
npm run devFrontend runs on: http://localhost:3000
π Siehe SETUP-OHNE-DOCKER.md fΓΌr detaillierte Anleitung!
Kurzversion:
- Installiere PostgreSQL 16+ und Redis lokal
- Erstelle Datenbank:
CREATE DATABASE authsystem; - Konfiguriere
backend/.env(siehe.env.example) - Backend:
npm install && npx prisma migrate dev && npm run start:dev - Frontend:
npm install && npm run dev
git clone https://github.com/YOUR_USERNAME/auth-system.git
cd auth-systemdocker-compose up -d postgres rediscd backend
npm install
npx prisma generate
npx prisma migrate dev
npm run start:devBackend runs on: http://localhost:3001
API Docs: http://localhost:3001/api/docs
cd frontend
npm install
npm run devFrontend runs on: http://localhost:3000
cd cpp-loader
mkdir build && cd build
cmake ..
cmake --build . --config Releaseauth-system/
βββ backend/ # NestJS Backend API
β βββ src/
β β βββ auth/ # Authentication module
β β βββ loader/ # C++ Loader API
β β βββ licensing/ # License management
β β βββ forum/ # Forum features
β β βββ admin/ # Admin panel
β β βββ crypto/ # Cryptography utilities
β β βββ security/ # Security middleware
β β βββ permissions/ # RBAC/ABAC
β βββ prisma/
β βββ schema.prisma # Database schema (21 tables)
β
βββ frontend/ # Next.js Frontend
β βββ src/
β βββ app/ # App router pages
β βββ components/ # Reusable components
β βββ features/ # Feature modules
β
βββ cpp-loader/ # C++ Loader Client
β βββ include/ # Header files
β β βββ protection.h # Anti-debug/VM
β β βββ auth_client.h # API interface
β βββ examples/ # Integration examples
β βββ CMakeLists.txt # Build configuration
β
βββ docs/ # Documentation
β βββ DEPLOYMENT.md # Production deployment guide
β βββ ...
β
βββ docker-compose.yml # PostgreSQL + Redis
21 Tables including:
- Users & Sessions (JWT, Refresh Tokens)
- Device Fingerprints (HWID tracking)
- Licenses & Activations (License management)
- Forum (Categories, Threads, Posts, Likes)
- Permissions (Roles, RBAC/ABAC)
- Security (Audit Logs, IP Reputation, Security Events)
- Admin (Ban Records, Admin Actions)
See prisma/schema.prisma for complete schema.
POST /api/auth/register- Register new userPOST /api/auth/login- User loginPOST /api/auth/refresh- Refresh access tokenPOST /api/auth/logout- Logout userGET /api/auth/verify- Verify session
POST /api/loader/handshake- Initial handshakePOST /api/loader/login- Loader loginPOST /api/loader/heartbeat- Keep-alive heartbeatGET /api/loader/ban-status/:id- Check ban status
Full API Documentation: http://localhost:3001/api/docs (Swagger UI)
- RSA-4096 for key exchange
- AES-256-GCM for payload encryption
- HMAC-SHA256 for request signing
- Bcrypt for password hashing (cost factor: 12)
- Nonce-based Anti-Replay (Redis store)
- Timestamp Validation (Β±5 minute window)
- Session Binding (Device + IP + Time)
- Rate Limiting (100 req/min per IP)
- IP Reputation Scoring
- Geo-location Anomaly Detection
- Anti-Debugging (IsDebuggerPresent, PEB checks, timing attacks)
- Anti-VM Detection (CPUID, registry, process scanning)
- Memory Integrity Checks
- Binary Hash Validation
- Self-Checksum Verification
- Implementation Plan - Detailed technical plan
- Security Architecture - Security diagrams & flows
- Deployment Guide - Production deployment
- Backend README - Backend documentation
- Frontend README - Frontend documentation
- C++ Loader README - Loader integration guide
# Backend unit tests
cd backend
npm run test
# Backend E2E tests
npm run test:e2e
# Frontend tests
cd frontend
npm run testSee DEPLOYMENT.md for complete production deployment guide including:
- Server setup (Ubuntu)
- SSL certificates (Let's Encrypt)
- Nginx reverse proxy
- Docker deployment
- Database backups
- Monitoring & logs
- Security hardening
Contributions are welcome! Please read our contributing guidelines before submitting PRs.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with NestJS
- Frontend powered by Next.js
- UI styled with TailwindCSS
- Database managed with Prisma
For support, email support@example.com or open an issue on GitHub.
This software is provided for educational purposes. Ensure compliance with all applicable laws and regulations when implementing licensing systems.
Made with β€οΈ by NAIX