- FastEndpoints
- FluentValidation
- Ardalis.Specification
- Ardalis.SmartEnum
- XUnit
- TestContainers
- FluentAssertions
- Bogus
- Rename
.env.example
to.env
- Build project
docker compose build
- Start project
docker compose up -d
- Seed platform admin
INSERT INTO public."Users"("Id", "Name", "Login", "Password", "Role", "Status", "CreatedBy", "CreatedOn", "LastModifiedBy", "LastModifiedOn") VALUES ('771b0bb0-3f87-47a0-bc64-0878e2070374', 'PlatformAdmin', '<your-username>', '<your-password>', 'PlatformAdmin', 'Active', '00000000-0000-0000-0000-000000000000', '2024-01-23 00:00:00+00', '00000000-0000-0000-0000-000000000000', NULL);
INSERT INTO public."PlatformAdmins" VALUES ('771b0bb0-3f87-47a0-bc64-0878e2070374');
INSERT INTO public."UserPreferences"("ApplicationUserId", "LanguageId") VALUES ('771b0bb0-3f87-47a0-bc64-0878e2070374','094b3769-68b1-6211-ba2d-6bba92d6a167');
- Navigate to http://localhost:5000/swagger/index.html
- Obtain token
POST /api/auth
{
"username": "<your-username>",
"password": "<your-password>"
}
- Enjoy
- start an postgres instance
- update appsettings.Development.json
- Build
- Run and debug
- Enjoy
Run the following command in the project root folder
dotnet ef migrations add MyNewMigration --project .\src\Vote.Monitor.Domain --startup-project .\src\Vote.Monitor.Api
For local developemnt you can use your lcoal file ssytem for storage by setting the file storge type in appconfig as follows.
"FileStorage": {
"FileStorageType": "LocalDisk",
"LocalDisk": {
"Path": "Uploads"
},
"S3": {
...
}
}
To use S3 file storage you need to set "FileStorageType": "S3",
and need to have the following environment variables set, with the key ID referencing an IAM user with permissions restricted to only S3.
"AWS_ACCESS_KEY_ID": "",
"AWS_SECRET_ACCESS_KEY": "",
"AWS_REGION": ""
Alternatively, you can use a locally configured aws profile.