Skip to content

Mavdii/Nexus-Core

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

NexusCore Logo

NexusCore

Production-Ready SaaS Starter Kit

Built with passion by Umar πŸ’»


MIT License TypeScript React Node.js PostgreSQL Docker PRs Welcome


🎯 Features β€’ πŸ–ΌοΈ Screenshots β€’ πŸš€ Quick Start β€’ πŸ“– Documentation β€’ 🀝 Contributing


NexusCore Dashboard


πŸ‘‹ About This Project

Hey there! I'm Umar, and I built NexusCore because I was tired of spending the first 3 months of every SaaS project building the same boring infrastructure over and over again.

Authentication? βœ… Done.
Multi-tenancy? βœ… Done.
Billing? βœ… Done.
Role-based permissions? βœ… Done.

Now you can focus on what actually makes your product unique. Ship faster. Build better.

"The best code is the code you don't have to write." β€” Me, after building my 5th authentication system from scratch πŸ˜…


🎯 Features

NexusCore Features

πŸ” Authentication & Security

Feature Description
JWT Authentication Secure access & refresh token system
Argon2 Hashing Industry-leading password security
Session Management Track devices, revoke sessions
Email Verification Verify user emails with tokens
Password Reset Secure password recovery flow
Rate Limiting Protect against brute force attacks

🏒 Multi-Tenancy & Teams

Feature Description
Organizations Isolated workspaces for teams
Role-Based Access Owner, Admin, Member, Viewer roles
Granular Permissions 15+ fine-grained permissions
Team Invitations Email-based invite system
Member Management Add, remove, update team members

πŸ’³ Subscription & Billing

Feature Description
Multi-tier Plans Free, Pro, Enterprise tiers
Usage Tracking Monitor limits and quotas
Invoice Generation Automatic invoice creation
Trial Periods Configurable free trials
Plan Upgrades Seamless plan switching

πŸ“Š Dashboard & Analytics

Feature Description
Real-time Stats Live metrics and KPIs
Activity Feed Track user actions
Audit Logging Complete action history
Usage Charts Visual data representation

🎨 Modern UI/UX

Feature Description
Responsive Design Works on all devices
Dark/Light Themes User preference support
Toast Notifications Real-time feedback
Loading States Smooth user experience

πŸ–ΌοΈ Screenshots

πŸ” Authentication Flow

Login Page



πŸ“Š Dashboard Overview

Dashboard

πŸ› οΈ Tech Stack

πŸ”§ Backend

Technology Purpose
Node.js 20+ - Runtime
Express.js - Framework
TypeScript - Type Safety
PostgreSQL - Database
Redis - Caching
Zod - Validation

🎨 Frontend

Technology Purpose
React 18 - UI Framework
Vite - Build Tool
TypeScript - Type Safety
React Router - Routing
TanStack Query - Data Fetching
CSS Variables - Styling

πŸ“ Project Structure

πŸ“¦ nexuscore/
β”œβ”€β”€ πŸ“‚ backend/
β”‚   β”œβ”€β”€ πŸ“‚ src/
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ modules/
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ” auth/           # Authentication & sessions
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ‘€ users/          # User management
β”‚   β”‚   β”‚   β”œβ”€β”€ 🏒 organizations/  # Multi-tenancy & RBAC
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ’³ subscriptions/  # Plans & usage limits
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“„ billing/        # Invoices & payments
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ”” notifications/  # In-app notifications
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‹ audit/          # Audit logging
β”‚   β”‚   β”‚   └── πŸ“Š dashboard/      # Analytics & stats
β”‚   β”‚   └── πŸ“‚ shared/             # Shared utilities
β”‚   β”œβ”€β”€ πŸ“‚ migrations/             # Database migrations
β”‚   └── πŸ“„ package.json
β”‚
β”œβ”€β”€ πŸ“‚ frontend/
β”‚   β”œβ”€β”€ πŸ“‚ src/
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ api/                # API client & endpoints
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ components/         # Reusable UI components
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ pages/              # Page components
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ hooks/              # Custom React hooks
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ stores/             # Zustand state stores
β”‚   β”‚   └── πŸ“‚ styles/             # CSS design system
β”‚   └── πŸ“„ package.json
β”‚
β”œβ”€β”€ 🐳 docker-compose.yml          # Docker configuration
β”œβ”€β”€ πŸ“„ .env.example                # Environment template
└── πŸ“„ README.md                   # You are here!

πŸš€ Quick Start

Prerequisites

  • Node.js 20 or higher
  • Docker & Docker Compose
  • Git

1️⃣ Clone the Repository

git clone https://github.com/Mavdii/Nexus-Core.git
cd Nexus-Core

2️⃣ Setup Environment

cp .env.example .env
# Edit .env with your configuration

3️⃣ Start Infrastructure

# Start PostgreSQL, Redis, and MailHog
docker-compose up -d postgres redis mailhog

4️⃣ Install & Run Backend

cd backend
npm install
npm run db:migrate
npm run db:seed
npm run dev

5️⃣ Install & Run Frontend

cd frontend
npm install
npm run dev

πŸ“– Documentation

πŸ”Œ API Endpoints

πŸ” Authentication
Method Endpoint Description
POST /api/auth/signup Register new user
POST /api/auth/login Authenticate user
POST /api/auth/logout Invalidate session
POST /api/auth/refresh Refresh access token
GET /api/auth/me Get current user
POST /api/auth/forgot-password Request password reset
POST /api/auth/reset-password Reset password
POST /api/auth/verify-email Verify email address
🏒 Organizations
Method Endpoint Description
GET /api/organizations List user's organizations
POST /api/organizations Create organization
GET /api/organizations/:id Get organization details
PATCH /api/organizations/:id Update organization
DELETE /api/organizations/:id Delete organization
GET /api/organizations/:id/members List members
POST /api/organizations/:id/members Invite member
PATCH /api/organizations/:id/members/:userId Update member role
DELETE /api/organizations/:id/members/:userId Remove member
πŸ’³ Subscriptions
Method Endpoint Description
GET /api/subscriptions/plans List available plans
GET /api/subscriptions/organizations/:id Get subscription
POST /api/subscriptions/organizations/:id/change Change plan
POST /api/subscriptions/organizations/:id/cancel Cancel subscription
GET /api/subscriptions/organizations/:id/usage Get usage stats
πŸ“„ Billing
Method Endpoint Description
GET /api/billing/organizations/:id/invoices List invoices
GET /api/billing/organizations/:id/invoices/:invoiceId Get invoice
GET /api/billing/organizations/:id/invoices/:invoiceId/pdf Download PDF

πŸ§ͺ Testing

# Backend tests
cd backend && npm run test

# Frontend tests
cd frontend && npm run test

# E2E tests
npm run test:e2e

🐳 Docker Deployment

# Build and start all services
docker-compose up -d --build

# View logs
docker-compose logs -f

# Stop all services
docker-compose down

πŸ—ΊοΈ Roadmap

  • Authentication & Authorization
  • Multi-tenancy with RBAC
  • Subscription Management
  • Invoice Generation
  • Activity & Audit Logs
  • Notification System
  • Stripe Integration
  • Webhook System
  • Admin Dashboard
  • Email Templates
  • API Rate Limiting Dashboard
  • Mobile App (React Native)

🀝 Contributing

Contributions are what make the open source community amazing! Any contributions you make are greatly appreciated.

  1. Fork the Project
  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

Distributed under the MIT License. See LICENSE for more information.


πŸ‘¨β€πŸ’» Author

Umar

Umar (Mavdii)

Full-Stack Developer & Open Source Enthusiast

Building tools that help developers ship faster πŸš€

GitHub LinkedIn Telegram WhatsApp Email


⭐ Star this repo if you find it helpful!


Made with ❀️ and mass amounts of β˜•


Copyright Β© 2024 Umar (Mavdii). All rights reserved.

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages