This repository contains a layered .NET 8 solution for an Accounting Management system. Below are quick links to the full documentation and getting started steps.
- docs/Overview.md
- docs/Endpoints.md
- docs/ApplicationServices.md
- docs/DomainAndRepositories.md
- docs/Configuration.md
-
Prerequisites
- .NET 8 SDK
- SQL Server instance
-
Configure appsettings
- Update
Accounting.WebApi/appsettings.jsonconnection stringConnectionStrings:SqlServer - Set JWT settings under
JWT: Issuer, Audience, SecretKey
- Update
-
Run the API
- Set startup project to
Accounting.WebApi dotnet run --project Accounting.WebApi- Swagger UI available in Development at
/swagger
- Set startup project to
-
First-time seed
- On start, an admin user is created: Email
admin@admin.com, PasswordPassword12*
- On start, an admin user is created: Email
-
Auth flow
- Obtain token via
POST /api/Auth/Login - Use
Authorization: Bearer <token>for protected endpoints
- Obtain token via
See the docs/ directory for detailed API specs and examples.
-
Login
curl -s -X POST http://localhost:5000/api/Auth/Login \ -H 'Content-Type: application/json' \ -d '{"EmailOrUserName":"admin@admin.com","Password":"Password12*"}'
-
Create Company
curl -s -X POST http://localhost:5000/api/Companies/CreateCompany \ -H 'Authorization: Bearer $TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "CompanyName": "ACME Ltd", "ServerName": "SQL01", "DatabaseName": "ACME_DB", "UserId": "sa", "Password": "StrongP@ssw0rd" }'