Rebuilt Collection Archive with FastAPI, SQLite, and React - #2
Open
Hgaines88 wants to merge 57 commits into
Open
Rebuilt Collection Archive with FastAPI, SQLite, and React#2Hgaines88 wants to merge 57 commits into
Hgaines88 wants to merge 57 commits into
Conversation
Hgaines88
commented
Aug 15, 2026
- Rebuilt the designers → collections one-to-many relationship
- Added complete CRUD API endpoints and validation
- Added safe database migrations
- Added React and Vanilla JavaScript interfaces
- Added API and migration tests
- Added curated collection media and nationality flags
- Added a collection_media table linked to collections by a foreign key, with cascading deletion and unique media-type constraints.
- designers → collections: one-to-many
- collections → collection_media: one-to-many at the database level, currently limited to one source link and one YouTube video per collection through a unique constraint
There was a problem hiding this comment.
Pull request overview
This PR rebuilds the “Collection Archive” as a small 3‑tier app: a FastAPI + SQLite backend (with migrations), plus two frontends (Vanilla and React) that consume the same CRUD API for the designers → collections one‑to‑many model and curated collection media.
Changes:
- Added FastAPI CRUD endpoints, request validation, and a SQLite migration runner with tests.
- Introduced a normalized
collection_mediatable and migrations for curated sources/videos. - Added two UIs (Vanilla
web/and React/Vitereact-ui/) plus supporting docs.
Reviewed changes
Copilot reviewed 45 out of 54 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| web/styles.css | Styling for Vanilla UI |
| web/index.html | Vanilla designers index page |
| web/app.js | Vanilla designers list logic |
| web/designer.html | Vanilla designer detail page |
| web/designer.js | Vanilla designer detail logic |
| web/designer-form.html | Vanilla designer create/edit page |
| web/designer-form.js | Vanilla designer form logic |
| web/collection.html | Vanilla collection detail page |
| web/collection.js | Vanilla collection detail logic |
| web/collection-form.html | Vanilla collection create/edit page |
| web/collection-form.js | Vanilla collection form logic |
| tests/test_migrations.py | Migration behavior + rollback tests |
| tests/test_api.py | FastAPI CRUD + media normalization tests |
| sql/seed.sql | Initial seed data |
| sql/schema.sql | SQLite schema + constraints |
| sql/migrations/001_sync_archive_records.sql | Legacy data corrections + inserts |
| sql/migrations/002_create_collection_media.sql | Adds collection_media table |
| sql/migrations/003_add_curated_runway_videos.sql | Curated YouTube media inserts |
| scripts/init_db.py | One-time DB init + seed script |
| requirements.txt | Python dependencies |
| README.md | Project overview + run instructions |
| PRODUCT.md | Product requirements + stories |
| DATA_MODEL.md | Data model documentation |
| app/schemas.py | Pydantic request schemas + validation |
| app/main.py | FastAPI app + routes + static mount |
| app/database.py | DB connection + migration runner |
| app/list_designers.py | Utility script to list designers |
| .gitignore | Ignore venv/db/cache files |
| react-ui/vite.config.js | Vite dev proxy config |
| react-ui/src/pages/NotFound.jsx | React 404 page |
| react-ui/src/pages/DesignerList.jsx | React designers index page |
| react-ui/src/pages/DesignerForm.jsx | React designer create/edit form |
| react-ui/src/pages/DesignerDetail.jsx | React designer detail + collections |
| react-ui/src/pages/CollectionForm.jsx | React collection create/edit form |
| react-ui/src/pages/CollectionDetail.jsx | React collection detail page |
| react-ui/src/nationalityFlags.js | React nationality → flag mapping |
| react-ui/src/main.jsx | React entrypoint |
| react-ui/src/index.css | React global styles |
| react-ui/src/components/StatusMessage.jsx | React status/error component |
| react-ui/src/components/Layout.jsx | React shared layout |
| react-ui/src/App.jsx | React router map |
| react-ui/src/App.css | React app styling |
| react-ui/src/api.js | React API helper wrapper |
| react-ui/README.md | React UI run instructions |
| react-ui/index.html | Vite HTML entry |
| react-ui/package.json | React dependencies + scripts |
| react-ui/package-lock.json | Dependency lockfile |
| react-ui/.oxlintrc.json | Oxlint configuration |
| react-ui/.gitignore | React UI ignores |
| react-ui/public/icons.svg | SVG sprite assets |
| react-ui/public/favicon.svg | React UI favicon |
| react-ui/src/assets/vite.svg | Vite asset |
| react-ui/src/assets/react.svg | React asset |
Files not reviewed (2)
- react-ui/package-lock.json: Generated file
- react-ui/src/App.css: Generated file
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Demna Gvasalia >> Demna Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Author
|
Collection Archive v0.1.0 |
Preserve archive data and demo evidence
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.