π A modern, full-stack Enterprise Resource Planning (ERP) system built with Next.js, TypeScript, and cutting-edge web technologies.
Our ERP system implements a comprehensive role-based access control (RBAC) system with five distinct user levels, each with specific permissions and capabilities:
Access Level: Full
Core Responsibilities:
- π‘οΈ System Configuration: Manage global settings, security policies, and system parameters
- π User Management: Create, modify, and delete all user accounts across all roles
- π§ Module Management: Enable/disable ERP modules and configure system-wide features
- πΎ Database Management: Perform backups, maintenance, and data migration tasks
- π Security Oversight: Manage security settings, audit logs, and compliance reports
- π’ Multi-tenant Management: Configure and manage multiple organization instances
Key Capabilities:
- Configuration of all system settings
- Complete user management across all roles
- System backups and maintenance
- Global security and compliance management
Access Level: High
Core Responsibilities:
- π’ Organization Setup: Configure company settings, departments, and organizational structure
- π₯ User Administration: Manage user accounts within their organization (except System Admin)
- π All Modules Access: Full access to all ERP modules and features
- π Advanced Reporting: Generate comprehensive reports across all departments
- π° Financial Oversight: Access all financial data, budgets, and financial reports
- π Performance Monitoring: Track KPIs, productivity metrics, and organizational performance
Key Capabilities:
- Access to all modules and features
- Comprehensive reporting and analytics
- User management (excluding System Admin)
- Full organizational oversight
Access Level: Medium
Core Responsibilities:
- π Production Management: Oversee manufacturing operations and production schedules
- π₯ Workforce Allocation: Assign staff to production tasks and manage work shifts
- π Production Updates: Monitor and update production status and progress
- π§ Resource Management: Manage production resources and equipment allocation
- π Performance Tracking: Track production KPIs and efficiency metrics
Key Capabilities:
- Production updates and monitoring
- Workforce allocation and management
- Manufacturing operations oversight
Access Level: Medium
Core Responsibilities:
- π¦ Stock Management: Monitor inventory levels, track stock movements
- π Procurement: Manage purchase orders and supplier relationships
- π Usage Tracking: Track material usage and consumption patterns
- π Inventory Analytics: Generate inventory reports and forecasting
β οΈ Stock Alerts: Manage low stock alerts and reorder points
Key Capabilities:
- Stock management and monitoring
- Procurement and supplier management
- Usage tracking and analytics
Access Level: Medium
Core Responsibilities:
- π₯ Customer Management: Maintain customer database and relationships
- π Order Creation: Process sales orders and manage order lifecycle
- π° Quotations: Create and manage customer quotations and proposals
- π Sales Analytics: Track sales performance and customer metrics
- π€ Client Communication: Manage customer communications and follow-ups
Key Capabilities:
- Customer management and CRM
- Order creation and processing
- Quotation management and sales tracking
Access Level: Medium
Core Responsibilities:
- π Design Upload: Upload and manage design files and specifications
- π Specification Management: Maintain product specifications and requirements
- π Revision Tracking: Track design changes and version control
- π― Project Coordination: Coordinate with production and sales teams
- π Design Analytics: Monitor design approval rates and timelines
Key Capabilities:
- Design file upload and management
- Specification management and tracking
- Design revision control and versioning
Access Level: Medium
Core Responsibilities:
- π§Ύ Invoicing: Create and manage customer invoices and billing
- π³ Payment Tracking: Monitor payments, receivables, and outstanding amounts
- π Financial Reporting: Generate financial reports and statements
- π Expense Management: Track business expenses and cost analysis
- π Financial Analytics: Provide financial insights and forecasting
Key Capabilities:
- Invoicing and billing management
- Payment tracking and monitoring
- Financial reporting and analytics
Access Level: Low
Core Responsibilities:
- β Task Updates: Update status of assigned production tasks
- π Material Logging: Log materials used in production processes
- β° Time Tracking: Record work hours and task completion times
- π Progress Reporting: Report on task progress and completion
- π§ Equipment Usage: Log equipment usage and maintenance needs
Key Capabilities:
- Task status updates and progress tracking
- Material usage logging and recording
- Production data entry and reporting
Access Level: Restricted
Core Responsibilities:
- π Order Viewing: View their order history and current order status
- β Design Approval: Approve or request changes to design proposals
- π Production Progress: Track progress of their orders through production
- π¬ Communication: Communicate with sales team regarding orders
- π Account Management: Manage their customer profile and preferences
Key Capabilities:
- View orders and order history
- Approve designs and specifications
- Track production progress for their orders
| Feature | System Admin | Admin | Factory Manager | Inventory Manager | Sales Team | Design Team | Accounting | Production Staff | Customers |
|---|---|---|---|---|---|---|---|---|---|
| System Configuration | β Full Control | β None | β None | β None | β None | β None | β None | β None | β None |
| User Management | β All Users | β Organization | β None | β None | β None | β None | β None | β None | β None |
| Production Management | β Full Access | β Full Access | β Updates & Allocation | β View Only | β View Only | β View Only | β View Only | β Task Updates | β Progress View |
| Inventory & Stock | β Full Access | β Full Access | β View Only | β Full Management | β View Only | β View Only | β View Only | β Log Usage | β None |
| Sales & CRM | β Full Access | β Full Access | β View Only | β View Only | β Full Management | β View Only | β View Only | β None | β View Orders |
| Design Management | β Full Access | β Full Access | β View Only | β View Only | β View Only | β Full Management | β View Only | β None | β Approve Designs |
| Financial Data | β Full Access | β Full Access | β Department | β Department | β Department | β Department | β Full Management | β None | β None |
| Reporting | β All Reports | β All Reports | β Production | β Inventory | β Sales | β Design | β Financial | β Task Reports | β Order Status |
| Data Modification | β All Data | β All Data | β Production Data | β Inventory Data | β Sales Data | β Design Data | β Financial Data | β Task Data | β Limited |
| Approval Authority | β All Levels | β Organization | β Production | β Procurement | β Sales Orders | β Design Changes | β Payments | β None | β Design Approval |
- Multi-Factor Authentication (MFA): Available for all roles
- Session Management: Automatic timeout and concurrent session control
- Audit Logging: Complete activity tracking for compliance
- Data Encryption: End-to-end encryption for sensitive information
- IP Restrictions: Role-based IP access control
- Temporary Access: Time-limited access grants for external users
This ERP system is designed to streamline business operations by integrating various organizational processes into a single, unified platform. Built with modern web technologies, it provides a scalable, maintainable, and user-friendly solution for managing business resources efficiently.
- π Dashboard Analytics - Real-time business insights and KPI tracking
- π₯ User Management - Role-based access control and authentication
- π¦ Inventory Management - Track stock levels, orders, and suppliers
- π° Financial Management - Accounting, invoicing, and financial reporting
- π Sales & CRM - Customer relationship management and sales tracking
- π Project Management - Task assignment and progress tracking
- π± Responsive Design - Optimized for desktop, tablet, and mobile devices
- π Security First - Enterprise-grade security and data protection
Before you begin, ensure you have the following installed:
- Node.js (v18.0.0 or higher) - Download here
- npm, yarn, pnpm, or bun package manager
- Git for version control
-
Clone the repository
git clone https://github.com/reckless-sherixx/ERP.git cd ERP -
Install dependencies
npm install # or yarn install # or pnpm install # or bun install
-
Set up environment variables
cp .env.example .env.local # Edit .env.local with your configuration -
Run the development server
npm run dev # or yarn dev # or pnpm dev # or bun dev
-
Open your browser
Navigate to http://localhost:3000 to see your ERP system in action! π
Our ERP system is powered by a modern, enterprise-grade technology stack designed for performance, scalability, and developer experience:
| Technology | Purpose | Version | Benefits |
|---|---|---|---|
| Next.js | Full-stack React framework | 15.3.2 | SSR, SSG, API routes, optimal performance |
| React | UI component library | 19.0 | Latest features, improved performance |
| TypeScript | Type-safe JavaScript | 5.0+ | Enhanced code quality and developer experience |
| Prisma | Database ORM | 5.0+ | Type-safe database operations and migrations |
| PostgreSQL | Relational database | 16.0+ | Enterprise-grade data storage and reliability |
| WebSockets | Real-time communication | Latest | Live updates and collaborative features |
| Docker | Containerization | 24.0+ | Consistent deployment and scalability |
| Tailwind CSS | Utility-first CSS framework | 3.x | Rapid UI development and consistent styling |
| NextAuth.js | Authentication | Latest | Secure, flexible authentication system |
π Performance Enhancements
- React 19 Concurrent Features: Improved rendering performance and user experience
- Next.js 15.3.2 Turbopack: Lightning-fast development builds and hot reloading
- Streaming SSR: Progressive page loading for better perceived performance
- Automatic Code Splitting: Optimized bundle sizes for faster loading
π Real-time Capabilities
- WebSocket Integration: Instant data synchronization across all connected clients
- Live Collaboration: Real-time editing and updates without page refreshes
- Push Notifications: Immediate alerts for critical business events
- Live Analytics: Real-time dashboard updates and metrics
ποΈ Database Excellence
- Prisma ORM: Type-safe database operations with excellent developer experience
- PostgreSQL: ACID compliance, complex queries, and enterprise reliability
- Migration System: Version-controlled database schema evolution
- Connection Pooling: Optimized database connections for high performance
π³ Deployment & DevOps
- Docker Multi-stage Builds: Optimized container images for production
- Environment Isolation: Consistent behavior across development, staging, and production
- Horizontal Scaling: Container orchestration ready for enterprise deployment
- Health Checks: Built-in monitoring and auto-recovery capabilities
src/app/page.tsx- Main application entry pointsrc/app/layout.tsx- Global layout and providersnext.config.ts- Next.js build and runtime configurationprisma/schema.prisma- Database schema definition
-
User Authentication & Authorization
- Secure login/logout functionality
- Multi-tier role-based access control system
- Session management with NextAuth.js
- Granular permission management
-
Dashboard & Analytics
- Real-time business metrics
- Interactive charts and graphs
- Customizable widget layouts
-
Inventory Management
- Product catalog management
- Stock level tracking
- Supplier relationship management
- Purchase order processing
-
Financial Management
- Invoice generation and tracking
- Expense management
- Financial reporting and analytics
- Budget planning tools
-
Customer Relationship Management (CRM)
- Customer database management
- Sales pipeline tracking
- Communication history
- Lead generation and conversion
-
Human Resources (Coming Soon)
- Employee management
- Payroll processing
- Performance tracking
- Leave management
-
Project Management (Coming Soon)
- Task assignment and tracking
- Timeline management
- Resource allocation
- Progress reporting
Create a .env.local file in the root directory:
# Database
DATABASE_URL="your_database_connection_string"
# Authentication
AUTH_SECRET="your_nextauth_secret"
# Database URL
DATABASE_URL="your_postgres_database_url"
#Oauth
AUTH_GOOGLE_ID="google_id"
AUTH_GOOGLE_SECRET="secret_key"
# API Keys
UPLOADTHING_TOKEN="your_uploadthing_token"
MAILTRAP_TOKEN="your_mailtrap_token"
#API Endpoints
NEXT_PUBLIC_API_URL="your_api_endpoint"
NEXT_PUBLIC_SOCKET_URL="your_socket_url"
#Port
SOCKET_PORT="your_socket_port"
# Email Service (optional)
EMAIL_SERVER_HOST="your_smtp_host"
EMAIL_SERVER_PORT=587
EMAIL_SERVER_USER="your_email_user"
EMAIL_SERVER_PASSWORD="your_email_password"- Theming: Modify
tailwind.config.tsfor custom colors and styling - Database: Configure your preferred database in
prisma/schema.prisma - Authentication: Customize auth providers in
src/lib/auth.ts - API Routes: Add custom endpoints in
src/app/api/
We welcome contributions from the community! Here's how you can help:
-
Fork the repository
git fork https://github.com/reckless-sherixx/ERP.git
-
Create a feature branch
git checkout -b feature/amazing-feature
-
Make your changes
- Follow the existing code style
- Add tests for new features
- Update documentation as needed
-
Commit your changes
git commit -m "feat: add amazing feature" -
Push to your fork
git push origin feature/amazing-feature
-
Create a Pull Request
- Provide a clear description of your changes
- Link any relevant issues
- Ensure all tests pass
- Code Style: Follow TypeScript and React best practices
- Commits: Use conventional commit messages
- Testing: Write tests for new features
- Documentation: Update README and inline comments
- π Bug fixes and performance improvements
- β¨ New ERP modules and features
- π Documentation improvements
- π¨ UI/UX enhancements
- π§ DevOps and deployment optimizations
The easiest way to deploy your ERP system:
# Build the Docker image
docker build -t erp-system .
# Run the container
docker run -p 3000:3000 erp-system- Netlify: Follow the Next.js deployment guide
- Railway: One-click deployment with database included
- DigitalOcean: Deploy on App Platform
- Next.js Documentation - Learn about Next.js features and API
- React Documentation - Learn React fundamentals
- TypeScript Handbook - Master TypeScript
- Tailwind CSS Docs - Utility-first CSS framework
This project is licensed under the MIT License - see the LICENSE file for details.
If you find this project helpful, please consider:
- β Starring this repository
- π Reporting bugs and issues
- π‘ Suggesting new features
- π€ Contributing code improvements
- π’ Sharing with your network
Made with β€οΈ by reckless-sherixx
Empowering businesses with modern ERP solutions