DELETE /api/paintings/:id removes works and image files with gallery refresh and catalog navigation; Show more opens the search modal on load; documentation updated for migrate schema and debug workflow. Co-authored-by: Cursor <cursoragent@cursor.com>
73 lines
3.5 KiB
Markdown
73 lines
3.5 KiB
Markdown
# Art Gallery
|
|
|
|
Interactive virtual art gallery: zoomable historical timeline with era click-to-zoom, major event markers (vertical guides into the movement flow), branching art-movement streams (click a movement name to enter its **3D movement gallery** — photorealistic period interiors with painted walls, stone, and wood textures; chronological wings with up to ~55 works each, side-wall windows, wing navigator), one 3D hall per artist (parquet floor, movement-tinted walls, black/gold frames by review status, corridor layout for large catalogs, museum-style exit doors, golden influence lamps, canvas placeholders for missing works, influence-linked exits), painting detail with art-history annotations, prev/next catalog browsing and fullscreen lightbox, debug-mode image audit on painting detail and artist bio (**Checked** / **Fix it** / **More** / **Clear** / **Upload**; painting detail also **Remove entry**), optional **Show more** auto-opens the search picker, Checkup page, preserved gallery camera on return, and Wikipedia-sourced artist biographies.
|
|
|
|
## Documentation
|
|
|
|
| Document | Purpose |
|
|
|----------|---------|
|
|
| [Documentation/basics.md](Documentation/basics.md) | Architecture, layout, user flow |
|
|
| [Documentation/setup.md](Documentation/setup.md) | Install, env, npm scripts |
|
|
| [Documentation/DB_structure.md](Documentation/DB_structure.md) | PostgreSQL tables |
|
|
| [Documentation/API.md](Documentation/API.md) | REST endpoints |
|
|
| [Documentation/data-and-images.md](Documentation/data-and-images.md) | Catalog, bios, seeding, image pipeline |
|
|
|
|
## Stack
|
|
|
|
- **Backend:** Node.js, Express, PostgreSQL
|
|
- **Frontend:** React, Vite, Three.js (`@react-three/fiber`, `@react-three/drei`)
|
|
|
|
## Setup
|
|
|
|
1. Copy `.env.example` to `.env` and set database credentials.
|
|
2. Install dependencies:
|
|
|
|
```bash
|
|
npm install
|
|
cd client && npm install && cd ..
|
|
```
|
|
|
|
3. Apply database schema (requires PostgreSQL superuser for first-time setup):
|
|
|
|
```bash
|
|
npm run migrate
|
|
npm run seed
|
|
```
|
|
|
|
4. Enrich the catalog (recommended after seed):
|
|
|
|
```bash
|
|
npm run fetch-artist-bios # Wikipedia biographies for all artists
|
|
npm run expand-catalog # add famous works for artists with thin catalogs
|
|
npm run update-influences # art-history lineage links between paintings
|
|
npm run migrate:artist-palette # optional: JSONB column for PainterPalette enrichment
|
|
npm run import-painter-palette # optional: metadata + influence links from Inputs/PainterPalette.csv
|
|
npm run migrate:checkup-flags # review/fixed flags for Checkup + debug mode (paintings)
|
|
npm run migrate:artist-checkup-flags # same flags for artist portraits (bio debug)
|
|
npm run migrate:painting-annotations # art-history notes on painting detail
|
|
npm run update-painting-annotations # load curated notes (+ optional --wikipedia)
|
|
npm run fetch-images -- --limit=50 # random batch of missing images (10s per work)
|
|
npm run fetch-images -- --artist="Claude Monet" # one artist in catalog order
|
|
```
|
|
|
|
5. Build the client and start the server:
|
|
|
|
```bash
|
|
npm run start:prod
|
|
```
|
|
|
|
**Production URLs:**
|
|
- Public: http://gallery.mysuperlab.netcraze.pro (via reverse proxy)
|
|
- LAN: http://192.168.10.70:3520
|
|
|
|
See [Documentation/setup.md](Documentation/setup.md#production-deployment) for nginx/systemd configs in `deploy/`.
|
|
|
|
## Development
|
|
|
|
Run API and Vite dev server separately:
|
|
|
|
```bash
|
|
npm run dev:server # API — PORT from .env (3520 or 3001)
|
|
npm run dev:client # http://localhost:5173 (proxies /api and /images)
|
|
```
|