Skip to content

Repository files navigation

Simple CRM — modern, lightweight CRM for small teams 🧾⚡

Platform C# Blazor WebAssembly MudBlazor Serilog License

A short, elegant CRM with a Blazor WebAssembly frontend and an ASP.NET Core Web API backend. Designed for a clear UI (MudBlazor), simple CRUD operations and invoice generation.

✨ Key features

  • Browse and manage products and clients
  • Create, edit and delete orders
  • Generate invoices (downloadable PDF)
  • Table filtering, sorting and pagination
  • JWT-based authentication on the API side
  • Responsive UI built with MudBlazor
  • Logging with Serilog and API documentation via Swagger

🧩 Architecture

  • SimpleCrm.Blazor — Blazor WebAssembly (frontend)
    • UI: MudBlazor, Blazored.LocalStorage
    • Helper JS files: wwwroot/js/downloadFile.js, wwwroot/js/pdf-utils.js
  • SimpleCrm.API — ASP.NET Core Web API (backend)
    • Serilog, Swagger, JWT auth, CORS (policy AllowBlazorClient)
  • SimpleCrm.Shared — DTOs, requests and service interfaces (shared)

The Blazor client communicates with the API over HTTP (services defined in SimpleCrm.Shared).

🔧 Requirements

  • .NET 9 SDK
  • Visual Studio 2022 (or newer) / dotnet CLI
  • (optional) hosting account/server for the API and static hosting for the frontend

🚀 Quick start (local)

  1. Clone the repo: git clone https://github.com/kamilus500/SimpleCrm.git

  2. Running from Visual Studio:

    • Open SimpleCrm.sln.
    • Set startup projects: right-click the solution -> Set Startup Projects -> choose Multiple startup projects and set the action Start for SimpleCrm.API and SimpleCrm.Blazor.
    • Run (F5 or Ctrl+F5).
  3. Running from CLI:

    • Backend: cd SimpleCrm.API dotnet run
    • Frontend: cd SimpleCrm.Blazor dotnet run
    • API: Swagger is available at https://localhost:{port}/swagger (port depends on launch settings).

⚙️ Configuration

  • API configuration file: SimpleCrm.API/appsettings.json (and appsettings.Development.json)
    • Sections to check: ConnectionStrings, Jwt (Secret, Issuer, Audience), logging.
  • CORS: a policy named AllowBlazorClient is configured in the API — ensure the client origin is added when deploying.
  • Service Worker: the client registers service-worker.js (in wwwroot) — when testing locally you may need to clear cache/unregister the service worker in the browser dev tools.

🧪 Testing & debugging

  • Use Start in Visual Studio to debug frontend and backend simultaneously.
  • Check Serilog console logs and use Swagger UI for manual endpoint testing.
  • If invoices are not downloading correctly, inspect wwwroot/js/downloadFile.js and wwwroot/js/pdf-utils.js in the client.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages