Skip to content

Devashish-1/ERP-FINAL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Master Admin ERP Portal

A comprehensive Enterprise Resource Planning (ERP) system built with modern technologies, featuring a complete admin portal for managing inventory, purchase orders, sales, finance, and more.

πŸš€ Features

Core Modules

  • Authentication & User Management - JWT-based authentication with role-based access control
  • Dashboard - Real-time KPIs, charts, and notifications
  • Inventory Management - Product catalog, stock tracking, and low-stock alerts
  • Purchase Management - Purchase orders, vendor management, and delivery tracking
  • Sales & Order Management - Sales orders, customer management, and status tracking
  • Financial Management - Invoicing, payments, and expense tracking
  • Reporting & Analytics - Comprehensive reports with Excel/PDF export
  • Security - JWT authentication, RBAC, audit logs, and data encryption

User Roles

  • Admin - Full system access
  • Finance - Financial management and reporting
  • Inventory Manager - Product and inventory management
  • Sales - Sales order management
  • Vendor/Supplier - Purchase order access
  • Distributor/Dealer/Retailer - Sales order access
  • Customer - Basic order access

πŸ› οΈ Technology Stack

Backend

  • .NET Core 8.0 - Web API framework
  • Entity Framework Core - ORM with SQL Server
  • Dapper - High-performance data access
  • JWT Authentication - Secure token-based authentication
  • BCrypt - Password hashing
  • Serilog - Structured logging
  • Swagger - API documentation
  • AutoMapper - Object mapping
  • FluentValidation - Input validation

Frontend

  • React 18 - Modern UI framework
  • TypeScript - Type-safe JavaScript
  • Tailwind CSS - Utility-first CSS framework
  • shadcn/ui - Modern UI components
  • React Router - Client-side routing
  • React Query - Data fetching and caching
  • Axios - HTTP client
  • Lucide React - Beautiful icons

Database

  • SQL Server - Primary database
  • Entity Framework Migrations - Database versioning

πŸ“ Project Structure

MasterAdminERP/
β”œβ”€β”€ backend/
β”‚   └── MasterAdminERP.API/
β”‚       β”œβ”€β”€ Controllers/          # API controllers
β”‚       β”œβ”€β”€ Models/              # Entity models
β”‚       β”œβ”€β”€ DTOs/                # Data transfer objects
β”‚       β”œβ”€β”€ Services/            # Business logic services
β”‚       β”œβ”€β”€ Data/                # Database context
β”‚       β”œβ”€β”€ Configuration/       # App configuration
β”‚       └── Program.cs           # Application entry point
β”œβ”€β”€ frontend/
β”‚   └── src/
β”‚       β”œβ”€β”€ components/          # Reusable UI components
β”‚       β”œβ”€β”€ pages/               # Page components
β”‚       β”œβ”€β”€ services/            # API services
β”‚       β”œβ”€β”€ contexts/            # React contexts
β”‚       β”œβ”€β”€ lib/                 # Utility functions
β”‚       └── App.tsx              # Main app component
β”œβ”€β”€ database/
β”‚   └── schema.sql              # Database schema
└── README.md                   # This file

πŸš€ Getting Started

Prerequisites

  • .NET 8.0 SDK
  • Node.js 18+ and npm
  • SQL Server (LocalDB or full instance)
  • Visual Studio 2022 or VS Code

Backend Setup

  1. Clone the repository

    git clone <repository-url>
    cd MasterAdminERP
  2. Set up the database

    # Run the SQL script to create the database
    sqlcmd -S (localdb)\\mssqllocaldb -i database/schema.sql
  3. Configure the connection string

    // appsettings.json
    {
      "ConnectionStrings": {
        "DefaultConnection": "Server=(localdb)\\mssqllocaldb;Database=MasterAdminERP;Trusted_Connection=true;MultipleActiveResultSets=true"
      }
    }
  4. Run the backend

    cd backend/MasterAdminERP.API
    dotnet restore
    dotnet run

    The API will be available at https://localhost:7001

Frontend Setup

  1. Install dependencies

    cd frontend
    npm install
  2. Configure environment

    cp env.example .env
    # Edit .env and set REACT_APP_API_URL=https://localhost:7001/api
  3. Start the development server

    npm start

    The frontend will be available at http://localhost:3000

πŸ” Default Credentials

  • Username: admin
  • Password: Admin@123

πŸ“Š API Documentation

Once the backend is running, visit https://localhost:7001/swagger to explore the API documentation.

πŸ—„οΈ Database Schema

The system includes the following main entities:

  • Users & Roles - Authentication and authorization
  • Products & Categories - Inventory management
  • Vendors - Supplier information
  • Purchase Orders - Procurement management
  • Sales Orders - Sales management
  • Invoices & Payments - Financial tracking
  • Expenses - Cost management
  • Notifications - System alerts
  • Audit Logs - Activity tracking

πŸ”§ Configuration

JWT Settings

{
  "JwtSettings": {
    "SecretKey": "YourSuperSecretKeyThatIsAtLeast32CharactersLong!",
    "Issuer": "MasterAdminERP",
    "Audience": "MasterAdminERP-Users",
    "ExpiryHours": 8
  }
}

CORS Configuration

The API is configured to allow requests from http://localhost:3000 for development.

πŸš€ Deployment

Backend Deployment

  1. Build the application: dotnet publish -c Release
  2. Deploy to your hosting provider (Azure, AWS, etc.)
  3. Configure production connection strings
  4. Set up SSL certificates

Frontend Deployment

  1. Build the application: npm run build
  2. Deploy the build folder to your hosting provider
  3. Configure environment variables for production

πŸ§ͺ Testing

Backend Testing

cd backend/MasterAdminERP.API
dotnet test

Frontend Testing

cd frontend
npm test

πŸ“ˆ Performance Considerations

  • Database Indexing - Optimized queries with proper indexes
  • Caching - React Query for frontend caching
  • Pagination - Efficient data loading
  • Lazy Loading - On-demand component loading
  • Connection Pooling - Optimized database connections

πŸ”’ Security Features

  • JWT Authentication - Secure token-based authentication
  • Role-Based Access Control - Granular permissions
  • Password Hashing - BCrypt for secure password storage
  • Input Validation - Comprehensive data validation
  • SQL Injection Prevention - Parameterized queries
  • CORS Configuration - Controlled cross-origin requests
  • Audit Logging - Complete activity tracking

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/new-feature
  3. Commit your changes: git commit -am 'Add new feature'
  4. Push to the branch: git push origin feature/new-feature
  5. Submit a pull request

πŸ“ License

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

πŸ†˜ Support

For support and questions:

  • Create an issue in the repository
  • Check the API documentation at /swagger
  • Review the code comments and documentation

πŸ—ΊοΈ Roadmap

  • Advanced reporting with charts
  • Email notifications
  • Mobile app
  • Multi-tenant support
  • Advanced inventory tracking
  • Integration with external systems
  • Real-time notifications
  • Advanced analytics dashboard

Built with ❀️ using modern web technologies

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published