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.
- 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
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)
- Serilog, Swagger, JWT auth, CORS (policy
SimpleCrm.Shared— DTOs, requests and service interfaces (shared)
The Blazor client communicates with the API over HTTP (services defined in SimpleCrm.Shared).
- .NET 9 SDK
- Visual Studio 2022 (or newer) / dotnet CLI
- (optional) hosting account/server for the API and static hosting for the frontend
-
Clone the repo: git clone https://github.com/kamilus500/SimpleCrm.git
-
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
StartforSimpleCrm.APIandSimpleCrm.Blazor. - Run (F5 or Ctrl+F5).
- Open
-
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).
- API configuration file:
SimpleCrm.API/appsettings.json(andappsettings.Development.json)- Sections to check:
ConnectionStrings,Jwt(Secret, Issuer, Audience), logging.
- Sections to check:
- CORS: a policy named
AllowBlazorClientis configured in the API — ensure the client origin is added when deploying. - Service Worker: the client registers
service-worker.js(inwwwroot) — when testing locally you may need to clear cache/unregister the service worker in the browser dev tools.
- 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.jsandwwwroot/js/pdf-utils.jsin the client.