Skip to content

Commit f93a0a2

Browse files
committed
docs: update README
1 parent eaf8e37 commit f93a0a2

1 file changed

Lines changed: 26 additions & 33 deletions

File tree

README.md

Lines changed: 26 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# ScanEventWorker
22

3-
A .NET 10 worker service that continuously polls a scan event API, queues events through Amazon SQS, and persists parcel summary data to SQL Server. Built for the Freightways take-home exercise.
3+
A .NET 10 worker service that continuously polls a scan event API, queues events through Amazon SQS, and persists parcel summary data to SQL Server.
4+
5+
Built for the Freightways take-home exercise.
46

57
## Architecture
68

@@ -35,43 +37,24 @@ flowchart LR
3537

3638
## Prerequisites
3739

38-
- [.NET 10 SDK](https://dotnet.microsoft.com/download)
40+
- [mise](https://mise.jdx.dev/getting-started.html)
41+
3942
- [Docker](https://www.docker.com/) (for SQL Server + LocalStack)
4043

4144
## Quick Start
4245

4346
See **[docs/local-setup.md](docs/local-setup.md)** for the full setup walkthrough. In brief:
4447

45-
```bash
48+
```shell
49+
mise i # Install all dependencies incl dotnet
50+
dotnet test # Running Tests
51+
dotnet build # Debug build
52+
dotnet publish -c Release # Native AOT binary
4653
docker-compose up -d
4754
dotnet user-secrets set "ScanEventApi:BaseUrl" "https://your-api-host" --project src/ScanEventWorker
4855
dotnet run --project src/ScanEventWorker/ScanEventWorker.csproj
4956
```
5057

51-
## Running Tests
52-
53-
```bash
54-
dotnet test
55-
```
56-
57-
33 unit tests covering domain behaviour, API client parsing/validation, processor logic, and both BackgroundService workers (`ApiPollerWorker`, `EventProcessorWorker`).
58-
59-
## Building
60-
61-
```bash
62-
dotnet build # Debug build
63-
dotnet publish -c Release # Native AOT binary
64-
```
65-
66-
## External Dependencies
67-
68-
| Dependency | Purpose |
69-
| ----------- | --------------------------------------------- |
70-
| Docker | Runs SQL Server (Azure SQL Edge) + LocalStack |
71-
| .NET 10 SDK | Build and run the solution |
72-
73-
Everything else (NuGet packages, SQS queues, DB schema) is self-contained.
74-
7558
---
7659

7760
## Assumptions
@@ -87,18 +70,28 @@ Everything else (NuGet packages, SQS queues, DB schema) is self-contained.
8770

8871
## Potential Improvements
8972

90-
- [ ] **Health checks**: expose `/healthz` endpoint reporting queue depth and DB connectivity
73+
- [ ] **Health checks**: expose `/healthz` endpoint[^1] reporting queue depth and DB connectivity
9174
- [ ] **Metrics**: OpenTelemetry counters for events processed/sec, SQS queue depth, DLQ size
9275
- [ ] **Horizontal scaling**: run multiple `EventProcessorWorker` instances; SQS competing-consumer model handles this without coordination
9376
- [ ] **DLQ visibility**: persist DLQ messages to a `FailedEvents` DB table for operational queries
9477
- [ ] **Rate limiting**: token bucket on the API poller to avoid hammering the upstream service
9578
- [ ] **Database migrations**: replace the `IF NOT EXISTS` initialiser with FluentMigrator for versioned schema changes
9679
- [ ] **Production database**: RDS SQL Server (managed via CDK stack) instead of Docker for managed backups and HA
9780

98-
---
81+
[^1]: `/healthz` endpoint is [actually deprecated](https://kubernetes.io/docs/reference/using-api/health-checks/#api-endpoints-for-health) since Kubernetes v1.16, and the more specific `/livez` and `/readyz` endpoints are preferred.
9982

100-
## Further Reading
83+
## Detailed Documentations
10184

102-
- [Local Setup](docs/local-setup.md) — Docker, database, credentials, and run steps
103-
- [Infrastructure](docs/infrastructure.md) — CDK stack and downstream fan-out architecture
104-
- [Design Rationale](docs/design-rationale.md) — Domain model, error handling, and AOT decisions
85+
- [Local Setup](docs/local-setup.md)
86+
- Docker
87+
- Azure Edge SQL database
88+
- credentials, and run steps
89+
- [Infrastructure](docs/infrastructure.md)
90+
- CDK stack
91+
- downstream fan-out architecture
92+
- [Design Rationale](docs/design-rationale.md)
93+
- Domain model
94+
- error handling
95+
- AOT decisions
96+
97+
---

0 commit comments

Comments
 (0)