feat: wire BuildPulse to Appwrite-backed persistence
This commit is contained in:
+17
-19
@@ -2,7 +2,7 @@
|
||||
|
||||
## Architecture Goal
|
||||
|
||||
Keep v0.1 boring, local-first, and easy to understand.
|
||||
Keep v0.1 boring, Appwrite-backed, and easy to understand.
|
||||
BuildPulse should be simple enough for AI coding agents to modify safely without losing context.
|
||||
|
||||
## Recommended v0.1 Stack
|
||||
@@ -11,19 +11,11 @@ Preferred simple stack:
|
||||
- React
|
||||
- Vite
|
||||
- TypeScript if practical
|
||||
- LocalStorage or IndexedDB
|
||||
- Tiny local API bridge to Appwrite on the Unraid server
|
||||
- Appwrite document persistence for canonical state
|
||||
- LocalStorage cache fallback in the browser
|
||||
- Markdown/JSON export
|
||||
|
||||
Optional if file-backed storage is explicitly wanted:
|
||||
- Tiny Node/Express backend
|
||||
- Files:
|
||||
- `data/project.json`
|
||||
- `data/features/*.json`
|
||||
- `data/parking_lot/*.json`
|
||||
- `data/pulses.jsonl`
|
||||
|
||||
Do not add a database in v0.1.
|
||||
|
||||
## Design Principle
|
||||
|
||||
BuildPulse is pulse-compatible, not pulse-dependent.
|
||||
@@ -139,17 +131,21 @@ src/
|
||||
|
||||
## Storage Strategy
|
||||
|
||||
### Fastest v0.1
|
||||
### v0.1 Canonical Persistence
|
||||
|
||||
Use browser storage.
|
||||
Use Appwrite on the Unraid server as the source of truth.
|
||||
- Store one serialized app state object.
|
||||
- Include a schema version.
|
||||
- Mirror the latest good state into browser storage as a cache/fallback.
|
||||
- Support export/import to avoid lock-in.
|
||||
|
||||
Example key:
|
||||
Current runtime shape:
|
||||
|
||||
```text
|
||||
buildpulse.appState.v1
|
||||
Appwrite project: freecastle
|
||||
Database: freecastle
|
||||
Collection: runtime
|
||||
Document: buildpulse_state
|
||||
```
|
||||
|
||||
### Future File-Backed Mode
|
||||
@@ -160,12 +156,16 @@ Later, the same data can be saved as:
|
||||
data/
|
||||
project.json
|
||||
features/
|
||||
parking_lot/
|
||||
feature_001.json
|
||||
feature_002.json
|
||||
parking_lot.json
|
||||
pulses.jsonl
|
||||
```
|
||||
|
||||
Do not build this unless explicitly requested for v0.1.
|
||||
|
||||
For v0.1, do not build this file-backed mode unless explicitly requested. Export/import should still preserve this same logical structure.
|
||||
|
||||
## Migration Strategy
|
||||
|
||||
Every stored state must include:
|
||||
@@ -189,7 +189,6 @@ v0.1 Pulse events should already include:
|
||||
- `agent_id`
|
||||
- `pulse_type`
|
||||
- `message`
|
||||
- `structured_payload`
|
||||
- `confidence_score`
|
||||
- `evidence_refs`
|
||||
- `trace_id`
|
||||
@@ -201,7 +200,6 @@ Even if many fields are optional or manually filled.
|
||||
Do not introduce:
|
||||
- Redux unless needed
|
||||
- Complex state machines
|
||||
- Backend services
|
||||
- Event buses
|
||||
- WebSockets
|
||||
- Plugins
|
||||
|
||||
Reference in New Issue
Block a user