Skip to content

Commit 3410c0b

Browse files
Sara Gowendynamictulip
authored andcommitted
Add some docs about how to get started with the .NET projects
1 parent 661e000 commit 3410c0b

1 file changed

Lines changed: 46 additions & 2 deletions

File tree

README.md

Lines changed: 46 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,50 @@
11
# PocketDDD
22

3-
# Populating Sessionize data
3+
A Blazor web app and .NET API to make DDD South West even more awesome for attendees.
4+
5+
## Folders
6+
7+
- `PocketDDD.BlazorClient` - This is the UI
8+
- `PocketDDD.Server` - This is the API
9+
- `PocketDDD.Shared` - This is shared between the UI and the API
10+
- `PocketDDDClient` - This is deprecated, we'll delete it at some point!
11+
12+
## Getting started
13+
14+
You will need:
15+
16+
- .NET 8
17+
- SQL Server
18+
19+
### Configuring the backend for the first time
20+
21+
- Set up the database
22+
- Create a new database
23+
- Run `PocketDDD.Server/PocketDDD.Server.DB/Migrations/FullDBScript.sql`
24+
- Add a row to the `EventDetail` table with `Id=1, Version=1, SessionizeId=<SessionizeId>`
25+
- Set up the API
26+
- Set two user secrets for API (see [Microsoft docs](https://learn.microsoft.com/en-us/aspnet/core/security/app-secrets?view=aspnetcore-8.0&tabs=windows#secret-manager) if unfamiliar with user secrets)
27+
- `AdminKey` - this is used in an `Authorization` header to access the API
28+
- `ConnectionStrings:PocketDDDContext` - this is the connection string for the database
29+
- Start the API
30+
- Set up the data
31+
- Call the `api/EventData/RefreshFromSessionize` endpoint with the `AdminKey` in an `Authorization` header
32+
- In the database, tidy up the `Tracks` data and add `TimeSlots` for the breaks
33+
34+
### Running the frontend
35+
36+
The Blazor web app is designed to be run as a static web app. This means that the `appsettings` files are located inside `PocketDDD.BlazorClient/PocketDDD.BlazorClient/wwwroot`.
37+
There are two settings which can be altered:
38+
39+
- `apiUrl` - the api the app is pointing to
40+
- `fakeBackend` - whether or not to use a local fake api
41+
42+
Beware when running the frontend that it caches on the client. The app is designed to be downloaded once and then largely work offline.
43+
44+
If testing a new UI change then use a new incognito window or delete local storage for the site
45+
46+
47+
## Populating Sessionize data
448
Auto-populating the session data from Sessionize requires a basic set of seed data. An example of this can be found in [2024_SeedData.sql](PocketDDD.Server/PocketDDD.Server.DB/Migrations/2024_SeedData.sql)
549

650
Once this script has been run against the DB you can call the admin endpoint to refresh the data. This requires the Admin API key which can be retrieved from Azure key vault secret `pocketddd-<env>-admin-api-key`
@@ -10,7 +54,7 @@ Host: pocketddd-dev-api-server.azurewebsites.net
1054
Authorization: <insert-admin-key>
1155
```
1256

13-
# Running terraform locally
57+
## Running terraform locally
1458
Ensure the Azure, GitHub, and terraform CLIs are installed
1559
```
1660
brew install azure-cli

0 commit comments

Comments
 (0)