.gitignore is created using dotnet new gitignore
command
-
Create a copy of
docker/.env.example
and save it indocker/.env
address after modifying environment values. DO NOT PUSH.env
file into source repository. -
Create a copy of
src/Host/appsettings.Development.json
and after modifying values, save it insrc/Host/appsettings.Local.json
. DO NOT PUSH this file into source repository.
cd docker
docker compose --profile db --env-file .env up -d
cd docker
docker compose --profile db --env-file .env down
Note: This command will not remove the data
cd docker
docker compose --profile db --env-file .env down
docker volumn rm docuware-pg
Note: This is useful in case you want to change database user and password
Run app locally, then open 'http://localhost:5051/swagger'. In that page locate the Open API json document link and copy it. Import API as a collection in Postman using this link
- Add logging infrastructure and log instead of writing to console ;)
- Possibly localize error messages if app is multi-lingual. You can use either
libc.translation
nuget package or useresx
files. - Use AutoMapper for mapping entities
- Add e2e tests for REST API
- Add a UI 😀
- Test with real database using TestContainers
- Validate inputs using FluentValidation (be careful with System.Text.Json because it will try to deserialize AbstractValidator<> properties...)
- Add HTML sanitization to prevent XSS attacks: https://owasp.org/www-community/attacks/xss/
- Pool database connections
- Use in-memory or a distributed caching mechanism