Skip to content

donpotts/MudBlazorCrmApp

Repository files navigation



Logo

MudBlazor CRM

A comprehensive, enterprise-ready CRM application built with Blazor WASM and .NET 9, showcasing modern web development best practices.
Get Started Β»

Request Feature

GitHub Actions Workflow Status .NET License


MudBlazor CRM


πŸš€ About The Project

MudBlazorCrmApp is a full-featured Customer Relationship Management (CRM) system designed as both a production-ready application and a learning resource for developers. Built on the latest .NET 9 stack, it demonstrates enterprise patterns and best practices for building modern web applications.

Why Use This Project?

  • Learning Resource: Understand how to build real-world Blazor applications
  • Reference Implementation: Copy patterns for your own projects
  • Starter Template: Fork and customize for your business needs
  • Best Practices: See how to structure enterprise .NET applications

✨ Features

Core CRM Functionality

  • πŸ‘₯ Customer Management: Track companies, contacts, and relationships
  • πŸ“ˆ Sales Pipeline: Manage leads, opportunities, and deals through stages
  • πŸ›’ Product & Service Catalog: Organize offerings with categories
  • 🎫 Support Cases: Track customer issues with SLA management
  • βœ… Task Management: Todo lists and Kanban boards

Technical Features

  • πŸ–₯️ Modern Frontend: Single-page application with Blazor WASM
  • 🎨 Beautiful UI: Professional MudBlazor components
  • πŸ” Secure Authentication: ASP.NET Core Identity with JWT tokens
  • πŸ“Š Interactive Dashboard: Real-time KPIs and analytics charts
  • πŸ” Advanced Querying: OData for flexible data access
  • πŸ“ API Documentation: Swagger/OpenAPI integration
  • πŸ“‹ Audit Logging: Track all entity changes with Login/Logout events
  • πŸ’¬ Communication Tracking: Log all customer interactions
  • πŸ“€ Data Export: CSV export functionality

Enterprise-Ready

  • βœ… Data validation with annotations
  • βœ… Proper entity relationships
  • βœ… Indexed database queries
  • βœ… Rate limiting protection
  • βœ… Role-based authorization
  • βœ… Automatic timestamp tracking
  • βœ… Soft delete support
  • βœ… Auditable entities (CreatedBy, ModifiedBy)

πŸ› οΈ Tech Stack

Technology Description
.NET 9 Core application framework
Blazor Frontend C# web framework
MudBlazor Material Design components
EF Core ORM for data access
SQLite Embedded database
OData RESTful API standard
Swagger API documentation

πŸ“ Project Structure

MudBlazorCrmApp/
β”œβ”€β”€ MudBlazorCrmApp/              # ASP.NET Core Web API (Backend)
β”‚   β”œβ”€β”€ Controllers/              # API endpoints
β”‚   β”œβ”€β”€ Data/                     # DbContext and data access
β”‚   β”œβ”€β”€ Models/                   # Server-side models
β”‚   └── Services/                 # Business logic services
β”‚
β”œβ”€β”€ MudBlazorCrmApp.Blazor/       # Blazor WASM Client
β”‚   └── Program.cs                # Client entry point
β”‚
β”œβ”€β”€ MudBlazorCrmApp.Shared/       # Shared Models
β”‚   └── Models/                   # DTOs and entities
β”‚
└── MudBlazorCrmApp.Shared.Blazor/# Shared Blazor Components
    β”œβ”€β”€ Pages/                    # Razor pages
    β”œβ”€β”€ Layout/                   # App layout
    β”œβ”€β”€ Components/               # Reusable components
    └── Services/                 # Client services

πŸ“Š Data Models

Core Entities

Entity Description Key Features
Customer Companies/accounts Industry, revenue, account manager
Contact People at companies Email, phone, role, do-not-contact flag
Lead Potential customers Source, score, conversion tracking
Opportunity Sales deals Value, probability, pipeline stage
Sale Completed transactions Products, discounts, payment tracking
SupportCase Customer issues Priority, SLA, resolution tracking
Communication Interactions log Calls, emails, meetings, notes
AuditLog Change tracking Entity changes, Login/Logout events
ActivityLog User activity Authentication and action history

Pipeline Stages

  • Prospecting β†’ Qualification β†’ Proposal β†’ Negotiation β†’ Closed Won/Lost

Lead Statuses

  • New β†’ Contacted β†’ Qualified β†’ Converted / Disqualified

🏁 Getting Started

Prerequisites

Quick Start

# Clone the repository
git clone https://github.com/donpotts/MudBlazorCrmApp.git

# Navigate to the project
cd MudBlazorCrmApp

# Run the application
dotnet run --project MudBlazorCrmApp

Or with Visual Studio:

  1. Open MudBlazorCrmApp.sln
  2. Set MudBlazorCrmApp as startup project
  3. Press F5 to run

The application will open at https://localhost:5001


πŸ” Authentication

Default Accounts

Role Email Password
Administrator adminUser@example.com testUser123!
Normal User normalUser@example.com testUser123!

Roles & Permissions

  • Administrator: Full access to all features including user management
  • User: Access to CRM features (customers, leads, sales, etc.)

πŸ”Œ API Endpoints

Dashboard API

GET /api/dashboard/kpis              # Key performance indicators
GET /api/dashboard/sales-trend       # Sales over time
GET /api/dashboard/lead-sources      # Lead source distribution
GET /api/dashboard/pipeline-stages   # Sales pipeline data
GET /api/dashboard/recent-activity   # Activity feed
GET /api/dashboard/top-opportunities # Top deals

Audit & Activity APIs

GET    /api/auditlog                 # Entity change history
GET    /api/auditlog/{id}            # Audit log details
POST   /api/authactivity/login       # Log login event
POST   /api/authactivity/logout      # Log logout event

Core CRUD APIs

GET/POST       /api/customer
GET/PUT/DELETE /api/customer/{id}

GET/POST       /api/lead
GET/PUT/DELETE /api/lead/{id}

GET/POST       /api/opportunity
GET/PUT/DELETE /api/opportunity/{id}

... (similar for all entities)

OData Support

All list endpoints support OData queries:

GET /api/customer?$top=10&$skip=0&$orderby=Name
GET /api/lead?$filter=Status eq 'New'&$count=true

🎯 Extension Points

Adding New Entities

  1. Create model in MudBlazorCrmApp.Shared/Models/
  2. Add DbSet to ApplicationDbContext
  3. Create controller in MudBlazorCrmApp/Controllers/
  4. Add service methods to AppService.cs
  5. Create Blazor pages in MudBlazorCrmApp.Shared.Blazor/Pages/

Customization

  • Theming: Modify ThemeService and ThemesMenu
  • Dashboard: Edit CRMDashboard.razor for custom widgets
  • Navigation: Update NavMenu.razor for menu structure

πŸ“¬ Contact

Don Potts - Don.Potts@DonPotts.com

Project Link: https://github.com/donpotts/MudBlazorCrmApp


πŸ™ Acknowledgments

Releases

No releases published

Packages

No packages published