feat: updade workspace

This commit is contained in:
thanhnv
2026-07-11 15:56:31 +09:00
parent 4fc72332f5
commit 193a449829
120 changed files with 868 additions and 350 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

+1 -1
View File
@@ -29,7 +29,7 @@ cp packages/casan-devkit/templates/gitea-workflow/ci.yml .gitea/workflows/casan-
## 4. Runner
Uses `runs-on: ci-runner` (a self-hosted Gitea Actions runner). To set one up on your host,
see `.gitea/vps-setup-runbook.md` and `scripts/setup-ci-runner.sh`. The runner needs
`bash`, `python3`, `openssl` (and `node`/`npm` only if you enable frontend/backend tests).
`bash`, `python3`, `openssl` (and `node`/`npm` only if you enable apps/okr/frontend/backend tests).
## 5. Expected result
`CI_GATE_SUMMARY PASS=<n> FAIL=0 SKIP=<k>`. Any FAIL fails the job (exit 1). The gate is
+1 -1
View File
@@ -30,7 +30,7 @@ apps/<project>/domain/
a run against it; similarity 1.0 = no drift. Real drift detection is proven separately.
- **corpus/** — red-team attack vectors (scored for H4 recall) + a benign corpus (bounds the
false-positive rate). Domain-specific injections make the H4 score meaningful.
- **traceability-map.json** — `{"FR-01": {"name": "...", "code": ["backend/src/...", {"file":"...","symbols":["Foo"],"lines":[12]}], "tests": ["..."]}}`. Symbol/line refs are
- **traceability-map.json** — `{"FR-01": {"name": "...", "code": ["apps/okr/backend/src/...", {"file":"...","symbols":["Foo"],"lines":[12]}], "tests": ["..."]}}`. Symbol/line refs are
optional but tighten the gate.
- **domain-pack.yaml** — documents the above + optional threshold overrides.
+4 -4
View File
@@ -79,7 +79,7 @@
```
okr-web/
├── backend/ # NestJS API service
├── apps/okr/backend/ # NestJS API service
│ ├── src/
│ │ ├── main.ts # Bootstrap, Swagger, global pipes
│ │ ├── app.module.ts # Root module
@@ -97,7 +97,7 @@ okr-web/
│ ├── Dockerfile
│ └── package.json
│
├── frontend/ # React + Vite SPA
├── apps/okr/frontend/ # React + Vite SPA
│ ├── src/
│ │ ├── main.tsx # React root
│ │ ├── App.tsx # Router setup + error boundary
@@ -285,7 +285,7 @@ exec "$@"
The seed script uses `upsert` (Prisma's `createOrUpdate`) keyed on stable identifiers (email for users, slug for objectives). Running the seed twice produces no duplicates:
```typescript
// backend/prisma/seed.ts
// apps/okr/backend/prisma/seed.ts
import { PrismaClient } from '@prisma/client';
import * as bcrypt from 'bcrypt';
@@ -616,7 +616,7 @@ TanStack Query's `onError` global callback handles API error toasts without cras
- **Unit tests:** Services tested in isolation with Prisma mocked via `jest.mock`.
- **Integration tests:** `@nestjs/testing` spins up full NestJS app with SQLite in-memory database override.
- Test files co-located under `backend/test/`.
- Test files co-located under `apps/okr/backend/test/`.
### Frontend