Skip to content
Open
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
27 changes: 27 additions & 0 deletions Frontiers/Utopia/NOTES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Phase 2 Wiring Notes

## Recon + Diff map
- Current app entry path is now `main/static/index.html` + `main/static/app.js`, served by `main/server.py`.
- UI read/write now flows through REST bindings in `main/server.py` (bootstrap, board state, card/list mutations, views).
- Removed old schema assumptions from UI wiring: no category-bucket reads (`ships/captains/...`) and no denormalized single-array access in components.
- Replaced with relational assumptions: `board -> columns -> cards`, tags through `card_tags`, stable ordering by `position` with `id` tie-break.


## Updated entry points
- Added browser app entry at `main/static/index.html` and JS entry `main/static/app.js`.
- Added runtime launcher `main/run_utopia` (wraps `main/server.py`).

## Updated state/store/data hooks
- Added canonical board-state adapter `main/static/domain/adapters.js`.
- UI now boots via `/api/bootstrap` and loads board state from `/api/boards/:id/state`.
- Added API writes for create board/list/card, edit card, move card, and save views.

## Updated components/data contracts
- UI now uses canonical schema concepts: `boards`, `columns`, `cards`, `tags` (`card_tags` join), and `saved_views`.
- Legacy bucket assumptions are removed from UI wiring; rendering is column/card relational.
- Drag/drop uses numeric gap indexing (`position` midpoint strategy) and stable sort by `(position, id)`.

## Remaining known follow-ups
- Server is stdlib HTTP (no auth/multi-user session isolation yet).
- Rebalancing logic for dense `position` values is not yet implemented (midpoint strategy in place).
- Activity stream exists in schema but is not surfaced in UI yet.
24 changes: 21 additions & 3 deletions Frontiers/Utopia/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
# Utopia Phase 1: Data Layer Refactor
# Utopia Phase 1+2: Data Layer + App Wiring

This folder contains the normalized schema, migration/backfill scripts, and repository/service data access layer for Utopia.
This folder now contains:
- normalized schema/migrations/backfill tooling,
- repository/service data access layer,
- and a wired app shell that runs end-to-end against the new schema.

## Quick start
## Run app

```bash
Frontiers/Utopia/main/run_utopia
```

Open `http://127.0.0.1:8787`.

## Data setup

```bash
# Build schema + backfill from legacy data
Expand All @@ -12,4 +23,11 @@ Frontiers/Utopia/migrate_utopia_data --rebuild
python3 Frontiers/Utopia/scripts/verify_utopia_data.py --db-path Frontiers/Utopia/db/utopia.sqlite
```

## Smoke test

```bash
python3 Frontiers/Utopia/tests/smoke_phase2.py
```

See `schema.md` for ERD, normalization rationale, indexing strategy, and migration notes.
See `NOTES.md` for Phase 2 wiring details and known follow-ups.
4 changes: 4 additions & 0 deletions Frontiers/Utopia/main/run_utopia
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env bash
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
python3 "$SCRIPT_DIR/server.py" "$@"
Loading