Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ dist
.env.local
npm-debug.log*
serviceAccountKey*.json
data/*.tmp.*
data
.migration-*

# Private webhook signing registrations and test-only emulator artifacts
data/.clickup-webhooks.json*
Expand Down
6 changes: 3 additions & 3 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ NODE_ENV=production
# Firebase Service Account Key (JSON string, base64, or file path) for zen-flow Firestore
FIREBASE_SERVICE_ACCOUNT_KEY=

# Optional persistent volume for local store, audit log and private webhook registry.
# Cloud persistence uses Firebase Admin; unauthenticated Web SDK fallback is disabled.
ZENFLOW_DATA_DIR=
# Existing Firestore storage target. Google identity trust remains zen-flow-7173d.
FIREBASE_PROJECT_ID=zen-flow-7173d
FIREBASE_DATABASE_ID=(default)
2 changes: 1 addition & 1 deletion .github/workflows/readiness.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ jobs:
- run: npm run lint
- run: npx tsc --noEmit --noUnusedLocals --noUnusedParameters
- run: npm run build
- run: node --import tsx tests/smoke-production.ts
- run: npm run test:persistence
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@ data/*.tmp.*
data/.clickup-webhooks.json*
.firebase/
*-debug.log

data/
8 changes: 8 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ This document records the complete lifecycle of architectural sweeps, discovered

## 1. Discovered Optimizations

### Sweep 53: 2026-10-27 (Standalone Firestore Workspace)

- Removed active ClickUp integration: synchronization, proxy routes, webhooks, credential controls, member mapping and task destination/link UI. Retired API URLs return 410; native cross-board subtask delegation remains available.
- Firestore now owns members, tasks, timers, activity history and append-only audit records. Mutations commit atomically before HTTP success and SSE, with revision conflict detection and rollback on database failure. Local JSON/NDJSON persistence and browser credential upload are removed.
- Added a restart-safe migration and private metadata backup without saved tokens. Existing IDs, content, native parent links and ownership are retained.
- Added database failure tests and Firestore/Auth emulator coverage for migration, atomic audit rollback, conflicts, compiled-server CRUD, delegation and restart/deletion recovery. See docs/READINESS.md for deployment constraints and evidence; earlier integration descriptions below are historical.


### Sweep 52: 2026-10-25 (Verified API Identity, Private ClickUp Credentials, Server-Owned Firebase, Signed Webhooks and Bounded Resources)

- **SEC-16 (Verified Backend Identity and Authorization):** Firebase identities are verified against the fixed Google login project, independently of configurable storage credentials. HttpOnly same-origin sessions protect REST, downloads and SSE. Server-owned role and ownership checks replace client header assertions, including atomic batch validation. Universal authenticated cross-board subtask delegation remains available (AUTH-07).
Expand Down
7 changes: 3 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ FROM node:22-slim AS builder
WORKDIR /app

COPY package*.json ./
RUN npm install
RUN npm ci

COPY . .
RUN mkdir -p /app/data && npm run build
RUN npm run build

FROM node:22-slim AS runner

Expand All @@ -17,10 +17,9 @@ ENV NODE_ENV=production
ENV PORT=3000

COPY package*.json ./
RUN npm install --omit=dev
RUN npm ci --omit=dev

COPY --from=builder /app/dist ./dist
COPY --from=builder /app/data ./data
COPY --from=builder /app/firebase-applet-config.json* ./

EXPOSE 3000
Expand Down
378 changes: 20 additions & 358 deletions README.md

Large diffs are not rendered by default.

28 changes: 0 additions & 28 deletions data/compliance-audit.jsonl

This file was deleted.

14 changes: 0 additions & 14 deletions data/store.json

This file was deleted.

Loading
Loading