Commit Graph

5 Commits

Author SHA1 Message Date
gilesb
287ba0d6b1 Add ipfs_cid to all asset SELECT queries
The ipfs_cid column was being stored but not retrieved in queries,
causing the UI to show "Not on IPFS" even when the data exists.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 23:37:44 +00:00
gilesb
96631e1e4c Add IPFS node to L2 for federated content storage
- Add IPFS container to docker-compose
- Add ipfshttpclient dependency
- Add ipfs_client.py module for IPFS operations
- Add ipfs_cid field to Asset model and database schema
- Pin content on L2 IPFS when assets are published/registered

L2 now stores content on its own IPFS node, enabling
federation - content remains available even if L1 goes down.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 18:21:33 +00:00
gilesb
a4c6efd154 Fix JSONB fields returned as strings from database
Parse JSONB fields (provenance, origin, tags, metadata, object_data, signature)
if they come back as strings instead of dicts.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 00:47:59 +00:00
gilesb
432632aadc Fix asyncpg datetime type error in create_asset and create_activity
asyncpg requires datetime objects, not ISO strings. Added _parse_timestamp
helper to convert string timestamps to datetime objects.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 00:40:37 +00:00
gilesb
a6e83c72bd Migrate to PostgreSQL database, consolidate routes, improve home page
- Add PostgreSQL with asyncpg for persistent storage
- Create db.py module with async database operations
- Create migrate.py script to migrate JSON data to PostgreSQL
- Update docker-compose.yml with PostgreSQL service
- Home page now shows README with styled headings
- Remove /ui prefix routes, use content negotiation on main routes
- Add /activities/{idx} as canonical route (with /activity redirect)
- Update /assets/{name} to support HTML and JSON responses
- Convert auth.py to use async database operations
- RSA keys still stored as files in $ARTDAG_DATA/keys/

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 00:22:21 +00:00