Skip to content

ABDO-ADELL/My-Net-Worth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

42 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🏒 PRISM - Enterprise Resource Planning System

A comprehensive ERP solution designed for small and medium-sized businesses to streamline operations, manage finances, and drive growth.

πŸ“‹ Table of Contents


🎯 Overview

PRISM is a modern, scalable ERP system built to help small and medium-sized businesses manage their entire operation from a single platform. From inventory management to financial reporting, PRISM provides the tools businesses need to operate efficiently and make data-driven decisions.

Why PRISM?

  • πŸš€ Modern Architecture: Built with .NET 9 and clean architecture principles
  • πŸ’Ό Business-Focused: Designed specifically for SMB needs
  • πŸ“Š Real-Time Insights: Live dashboards and comprehensive reporting
  • πŸ” Secure: Enterprise-grade security with role-based access control
  • πŸ“± Responsive: Works seamlessly across desktop and mobile devices

✨ Features

Core Modules

πŸ“¦ Inventory Management

  • Multi-branch inventory tracking
  • Real-time stock levels and alerts
  • Item categorization and SKU management
  • Supplier management and relationships

πŸ›’ Order Management

  • Complete order lifecycle tracking
  • Customer order history
  • Dynamic pricing and discounts
  • Order status workflows

πŸ’° Financial Management

  • Expense tracking and categorization
  • Payment processing and reconciliation
  • Revenue and profit analytics
  • Multi-business financial oversight

πŸ“ˆ Business Intelligence

  • Interactive dashboards
  • Custom report generation
  • Excel export functionality
  • Top-selling items analytics
  • Customer insights

πŸ‘₯ Multi-Business Support

  • Manage multiple businesses from one account
  • Branch-level operations
  • Consolidated reporting
  • Business-specific configurations

πŸ”’ Security & Authentication

  • JWT-based authentication
  • Cookie-based session management
  • Role-based access control (RBAC)
  • Secure password management
  • Audit logging

πŸ›  Tech Stack

Backend

  • Framework: .NET 9.0 (ASP.NET Core MVC)
  • ORM: Entity Framework Core 9.0
  • Database: Microsoft SQL Server (Latest)
  • Authentication: ASP.NET Core Identity + JWT
  • Architecture: Clean Architecture with Repository & Unit of Work patterns

Frontend

  • UI Framework: Bootstrap 5
  • JavaScript: jQuery
  • Icons: Font Awesome
  • Charts: Chart.js, Recharts
  • Data Export: ClosedXML (Excel)

DevOps & Infrastructure

  • Hosting: MonsterASP
  • CI/CD: GitHub Actions
  • Version Control: Git/GitHub
  • Container: Docker support

πŸ— Architecture

PRISM follows Clean Architecture principles with clear separation of concerns:

PRISM/
β”œβ”€β”€ Controllers/          # HTTP request handlers
β”œβ”€β”€ Services/            # Business logic layer
β”‚   β”œβ”€β”€ IServices/      # Service interfaces
β”‚   └── *Service.cs     # Service implementations
β”œβ”€β”€ Repositories/        # Data access layer
β”‚   β”œβ”€β”€ IRepositories/  # Repository interfaces
β”‚   └── Repository.cs   # Generic repository
β”œβ”€β”€ DataAccess/         # Database context & migrations
β”‚   β”œβ”€β”€ IRepositories/  # Unit of Work interface
β”‚   └── UnitOfWork.cs   # Unit of Work implementation
β”œβ”€β”€ Models/             # Domain entities
β”œβ”€β”€ Dto/                # Data transfer objects
β”œβ”€β”€ Helpers/            # Utility classes
└── Views/              # Razor views

Key Patterns Implemented

  • βœ… Repository Pattern: Abstraction over data access
  • βœ… Unit of Work Pattern: Transaction management
  • βœ… Service Layer Pattern: Business logic separation
  • βœ… Dependency Injection: Loose coupling
  • βœ… SOLID Principles: Maintainable, extensible code

πŸš€ Getting Started

Prerequisites

Installation

  1. Clone the repository

    git clone https://github.com/your-org/prism.git
    cd prism
  2. Configure Database Connection

    Update appsettings.json:

    {
      "ConnectionStrings": {
        "DefaultConnection": "Server=YOUR_SERVER;Database=PRISM_DB;Trusted_Connection=True;MultipleActiveResultSets=True;TrustServerCertificate=True;"
      }
    }
  3. Configure JWT Settings

    {
      "jwt": {
        "key": "YOUR_SECRET_KEY_HERE_MIN_32_CHARS",
        "Issuer": "yourdomain.com",
        "Audience": "yourdomain.com",
        "DurationInDays": 30
      }
    }
  4. Run Migrations

    dotnet ef database update
  5. Run the Application

    dotnet run
  6. Access the Application

    • Navigate to: https://localhost:8081
    • Or: http://localhost:8080

πŸ’» Development

Branch Strategy

We follow Git Flow branching model:

  • main - Production-ready code
  • develop - Integration branch for features
  • feature/* - New features (e.g., feature/order-management)
  • bugfix/* - Bug fixes (e.g., bugfix/login-issue)
  • hotfix/* - Critical production fixes
  • release/* - Release preparation

Commit Message Convention

We use Conventional Commits:

type(scope): subject

body (optional)

footer (optional)

Types:

  • feat: New feature
  • fix: Bug fix
  • docs: Documentation changes
  • style: Code style changes (formatting)
  • refactor: Code refactoring
  • test: Adding or updating tests
  • chore: Maintenance tasks

Examples:

feat(orders): add UTC datetime field with edit capability
fix(auth): resolve cookie authentication issue
docs(readme): update installation instructions
refactor(orders): implement repository pattern and clean architecture

Code Style Guidelines

  • C# Naming Conventions: Follow Microsoft C# conventions
  • Indentation: 4 spaces
  • Line Length: Max 120 characters
  • Comments: XML documentation for public APIs
  • Async/Await: Use async methods for I/O operations
  • Null Safety: Use nullable reference types

Running Tests

# Run all tests
dotnet test

# Run specific test project
dotnet test PRISM.Tests

# With coverage
dotnet test /p:CollectCoverage=true

Database Migrations

# Add new migration
dotnet ef migrations add MigrationName

# Update database
dotnet ef database update

# Rollback migration
dotnet ef database update PreviousMigrationName

# Remove last migration (if not applied)
dotnet ef migrations remove

🚒 Deployment

Production Deployment (MonsterASP)

The application is automatically deployed via GitHub Actions on push to main.

Manual Deployment

  1. Publish the Application

    dotnet publish -c Release -o ./publish
  2. Configure Production Settings

    Ensure appsettings.Production.json has correct values:

    {
      "ConnectionStrings": {
        "DefaultConnection": "Production_Connection_String"
      },
      "jwt": {
        "key": "Production_JWT_Secret_Key"
      }
    }
  3. Deploy via FTP or Web Deploy

    • Upload contents of ./publish folder
    • Ensure web.config is configured
    • Restart the application pool

Environment Variables

Set these in your hosting environment:

Variable Description Required
ASPNETCORE_ENVIRONMENT Environment name (Production) βœ…
ConnectionStrings__DefaultConnection Database connection string βœ…
jwt__key JWT signing key βœ…
jwt__Issuer JWT issuer βœ…
jwt__Audience JWT audience βœ…

πŸ‘₯ Team

Project Leadership

  • Abdelrahman Adel - Project Manager, DevOps Engineer & Full-Stack Developer

Development Team

  • Beshoy Gamal Waheb - Full-Stack Developer
  • Salah Eldin Mohamed - Full-Stack Developer
  • Mohamed Bahaa Mohamed - Full-Stack Developer

Quality Assurance

  • Aya Yehya - QA Engineer & Unit Testing Specialist

πŸ—Ί Roadmap

βœ… Phase 1: Foundation (Completed - Q4 2024)

  • Core authentication and authorization
  • Multi-business and branch management
  • Basic CRUD operations for all entities
  • Database design and migrations
  • Initial UI/UX implementation

βœ… Phase 2: Core Features (Completed - Q1 2025)

  • Order management system
  • Inventory tracking
  • Customer management
  • Supplier management
  • Expense tracking
  • Payment processing
  • Dashboard with real-time metrics
  • Report generation and Excel export

βœ… Phase 3: Architecture & Optimization (Completed - Q1 2025)

  • Implement Repository Pattern
  • Implement Unit of Work Pattern
  • Service Layer extraction
  • Clean Architecture refactoring
  • Performance optimization
  • Transaction management

πŸ”„ Phase 4: Advanced Features (In Progress - Q2 2025)

  • Advanced analytics and BI dashboards
  • Forecasting and predictive analytics
  • Automated inventory replenishment
  • Multi-currency support
  • Tax calculation and compliance
  • Email notifications system
  • Document management (invoices, receipts)
  • Barcode/QR code scanning

πŸ“‹ Phase 5: API & Integration (Q2 2025)

  • RESTful API with Swagger documentation
  • API rate limiting and versioning
  • Webhook support
  • Third-party integrations (payment gateways)
  • Mobile app API endpoints
  • Export/Import functionality (CSV, JSON)

πŸ” Phase 6: Enhanced Security & Compliance (Q3 2025)

  • Two-factor authentication (2FA)
  • Advanced audit logging
  • Data encryption at rest
  • GDPR compliance features
  • Backup and disaster recovery
  • Security penetration testing

πŸ§ͺ Phase 7: Testing & Quality (Q3 2025)

  • Comprehensive unit test coverage (80%+)
  • Integration tests
  • End-to-end testing
  • Performance testing and benchmarking
  • Load testing
  • Automated testing pipeline

πŸš€ Phase 8: Scale & Enterprise Features (Q4 2025)

  • Microservices architecture evaluation
  • Containerization with Kubernetes
  • Caching layer (Redis)
  • Message queue implementation
  • Multi-tenant architecture
  • White-label capability
  • API marketplace

🌍 Phase 9: Internationalization (2026)

  • Multi-language support (i18n)
  • Regional date/time formats
  • Currency localization
  • Right-to-left (RTL) language support
  • Regional compliance features

🀝 Contributing

We welcome contributions! Please follow these guidelines:

Pull Request Process

  1. Create a Feature Branch

    git checkout -b feature/your-feature-name
  2. Make Your Changes

    • Write clean, documented code
    • Follow our code style guidelines
    • Add/update tests as needed
  3. Commit Your Changes

    git commit -m "feat(module): description of changes"
  4. Push to Your Branch

    git push origin feature/your-feature-name
  5. Open a Pull Request

    • Use the PR template
    • Link related issues
    • Request review from team members
    • Ensure CI/CD passes

Code Review Guidelines

  • Required Reviewers: Minimum 1 team member approval
  • Review Checklist:
    • Code follows style guidelines
    • No console.log or debug code
    • Tests pass locally
    • Documentation updated if needed
    • No merge conflicts
    • Performance considerations addressed

Issue Reporting

Use GitHub Issues with appropriate labels:

  • bug - Something isn't working
  • enhancement - New feature or request
  • documentation - Documentation improvements
  • good first issue - Good for newcomers
  • help wanted - Extra attention needed
  • priority-high - Critical issues

πŸ“š API Documentation

Authentication

All API endpoints require authentication via JWT token.

Login Endpoint:

POST /api/Authentication/Login
Content-Type: application/json

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

Response:

{
  "token": "eyJhbGciOiJIUzI1NiIs...",
  "refreshToken": "refresh_token_here",
  "email": "user@example.com",
  "userName": "user@example.com",
  "roles": ["Admin"],
  "expiresOn": "2025-02-22T10:30:00Z"
}

Using the API

Include the token in request headers:

Authorization: Bearer eyJhbGciOiJIUzI1NiIs...

Available Endpoints

Orders

  • GET /Order - List all orders
  • GET /Order/Details/{id} - Get order details
  • POST /Order/Create - Create new order
  • POST /Order/Edit/{id} - Update order
  • POST /Order/Delete/{id} - Delete order (soft delete)

Business Management

  • GET /Business - List businesses
  • POST /Business/Create - Create business
  • PUT /Business/Edit/{id} - Update business
  • DELETE /Business/Delete/{id} - Archive business

Inventory

  • GET /Items - List items
  • POST /Items/Create - Create item
  • PUT /Items/Edit/{id} - Update item
  • DELETE /Items/Delete/{id} - Archive item

Note: Full Swagger/OpenAPI documentation coming in Phase 5


πŸ›‘ Security

Security Features

  • βœ… JWT token authentication
  • βœ… Password hashing with ASP.NET Core Identity
  • βœ… HTTPS enforcement
  • βœ… SQL injection prevention (parameterized queries)
  • βœ… XSS protection
  • βœ… CSRF tokens
  • βœ… Rate limiting
  • βœ… Audit logging

πŸ™ Acknowledgments

  • Built with ❀️ by the PRISM Team
  • Special thanks to all contributors
  • Powered by .NET and open-source technologies

πŸ“ž Contact & Support


Made with πŸ’Ό for Small and Medium Businesses
Β© 2024-2025 PRISM Team. All rights reserved.

About

ERP system helps Small and medium businesess to Track profits and expenses

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors