Refactor API and enhance Angular integration
- Removed `ciTargetName` from `nx.json`. - Updated `package.json` to include new dependencies: `@types/seedrandom`, `fast-check`, `happy-dom`, and `@nestjs/schedule`. - Modified `pnpm-lock.yaml` to reflect the addition of new packages and their versions. - Improved project documentation in `PROJECT_CONTEXT.md` to clarify the use of Zod schemas and Angular framework decisions. - Introduced new Angular components and patterns in the `.agents/skills/frontend-angular` directory, including examples and reference materials for Angular 21+ features.
This commit is contained in:
@@ -145,7 +145,7 @@ Separate from the viewer overlay. Live preview of the lantern in all four corner
|
||||
|
||||
- Initialise Nx workspace with TypeScript, `@nx/angular` (or `@nx/js` if dropping Angular), `@nx/nest`, `@nx/node`.
|
||||
- Generate apps: overlay frontend, NestJS API.
|
||||
- Generate `@fog-explorer/api-interfaces` lib with Zod schemas for `Survivor`, `SurvivorState`, `Mission`, `MissionState`, `EncounterResult`, `Perk`, `PerkModifier`, `TeamPerk`.
|
||||
- Generate `@fog-explorer/api-interfaces` lib with Zod schemas for `Survivor`, `SurvivorState`, `Mission`, `MissionState`, `EncounterResult`, `Perk`, `PerkModifier`.
|
||||
- Configure `@nx/enforce-module-boundaries` with project tags (`scope:shared`, `scope:api`, `scope:overlay`). AI assistants love to reach across libraries with relative imports — enforce early.
|
||||
- Root `docker-compose.yml`: Postgres (named `fog_expedition`, healthcheck), Redis, optional API service.
|
||||
- `.devcontainer/` directory with config (see Section 7).
|
||||
@@ -167,7 +167,7 @@ Separate from the viewer overlay. Live preview of the lantern in all four corner
|
||||
- Distributed lock pattern: `SET key value NX PX <ttl>` with unique token, verify token before release. Or use Redlock. Naive `SETNX` without TTL = stuck tick on crash.
|
||||
- **Encounter resolver — pure function** in `libs/mission-logic`. Signature `resolveEncounter(survivor, perks, difficulty, seed) → EncounterResult`. Use seeded PRNG (`seedrandom`), not `Math.random()`. Store seed per tick in `mission_logs` for replay/debug.
|
||||
- `EncounterService` calls the resolver, updates state, emits log events.
|
||||
- `GroupSynergyService` aggregates team perks for SWF missions, applies to all relevant rolls.
|
||||
- `GroupSynergyService` aggregates each participant's survivor perks for SWF missions, applies combined modifiers to all relevant rolls.
|
||||
- `MissionStore` repository abstracting Redis. Keys: `active_mission:{id}`, `mission_lobby:{id}`.
|
||||
|
||||
### Stage 4 — EBS persistence
|
||||
@@ -261,7 +261,7 @@ This project is being built with heavy AI assistance. A few conventions to keep
|
||||
|
||||
Things deliberately not decided yet — flag them when you reach them:
|
||||
|
||||
- **Overlay framework:** Angular (per original plan) vs Lit vs vanilla TS. Decide before Stage 2 starts.
|
||||
- **Overlay framework:** Decided — Angular. See [ADR-0008](docs/adr/0008-angular-for-overlay-frontend.md).
|
||||
- **ORM:** TypeORM vs Prisma vs Drizzle. Pick one before any DB code is written.
|
||||
- **Group/SWF expanded UI:** designed conceptually, not mocked.
|
||||
- **Streamer config screen:** designed conceptually, not mocked.
|
||||
|
||||
Reference in New Issue
Block a user