Skip to content

About

A searchable archive of wearable art: makers, materials, techniques and the hours behind each piece. Next.js, PostgreSQL full-text search, The Met Open Access.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Wearable Art Archive

A searchable archive of wearable art (garments, jewellery, headwear and accessories) that records who made each piece, what it is made of, which techniques were used, and how many hours went into it.

It started as a database course project at TalTech (ICA0005, designed in Oracle) and now runs as a Next.js app on PostgreSQL.

What it does

  • A home page laid out like a museum visit: a full-screen entrance, then rooms that slide over each other (the archive, a horizontally scrolling contemporary room, materials and sustainability, studios), each piece with a museum-style wall label.
  • Search everything at once. Titles, makers, types, materials, techniques and descriptions are combined into one weighted full-text document per piece. Search uses both a plain and an English dictionary, so "dresses" finds "dress", and falls back to trigram similarity, so typos still match.
  • Filter by category, type, material, technique, or "sustainable materials only".
  • Artwork pages show materials with their origin and a sustainability flag, techniques in order, creation stages with hours, exhibitions, reviews, and the image credit.
  • Artists: commissionable demo studios with endorsements, reviews and a trust score, contemporary designers, and the historic makers from the museum archive.
  • Types: a fixed set of standard types, plus types added by artists that always sit under a standard type so filters keep working. Visitors can suggest a new type.
  • Commissions: a request form on studio profiles, built around the idea of ordering one lasting piece from a person rather than a factory.

Public forms only write to a submission review queue (honeypot, 5 per hour per visitor, IP stored only as a salted hash). Nothing a visitor sends is published automatically.

Data

Three collections, each credited on every piece:

  • Museum archive (48 pieces, 1750–1910 plus three pre-Columbian ornaments): The Metropolitan Museum of Art Open Access, CC0. Collected with scripts/harvest-met.mjs, one request a second.
  • Contemporary designers (31 pieces by 16 designers, among them Iris van Herpen, Guo Pei, Alexander McQueen, Rei Kawakubo, Issey Miyake and Hussein Chalayan): museum and exhibition photographs from Wikimedia Commons under CC BY, CC BY-SA or CC0, hand-picked from data/commons-candidates.json. Facts come from the file descriptions and the exhibiting museums (data/contemporary.json).
  • Studios (6 fictional studios, 19 pieces): demo profiles that show the commissioning and trust features, with illustrative Unsplash photography credited to the photographer (data/studios.json). Their commissions, transactions, reviews and trust scores are the course project's example data, moved onto the new studios.

Images are resized to WebP (max 1400 px) and served from public/images.

The schema

21 tables from the course project plus a review queue, in db/schema.sql. The original design used Estonian names:

Course project (Oracle) PostgreSQL Holds
KUNSTNIK artist Artists and studios
TEOS artwork The wearable pieces
TEOSE_TYYP artwork_type Standard types (dress, brooch…)
UUS_TEOSE_TYYP custom_artwork_type Types added by artists
MATERJAL material Materials, origin, sustainability
TEHNIKA technique Techniques
TEOSE_MATERJAL artwork_material Which materials, how much
TEOSE_TEHNIKA artwork_technique Which techniques, in what order
LOOMISE_ETAPP creation_stage Making stages and hours
MEEDIA media Photos and their credits
SUNDMUS event Exhibitions, galleries, runway shows
TEOSE_SUNDMUS artwork_event Where a piece was shown
KOLLEKTSIONAAR collector Buyers and collectors
TELLIMUS commission Commission requests
PAKKUMINE offer The artist's offers
TEHING transaction Payments; traces ownership
TEHINGU_TYYP transaction_type Deposit, sale, fee
KINNITUS endorsement Professional endorsements
KINNITUSE_TYYP endorsement_type Education, exhibition, curator
HINNANG review Community reviews
USALDUSSKOOR trust_score Trust score over time

Entity–relationship diagram

What changed in the port

  • The original scripts didn't run as written: inserts referenced columns that didn't exist and put NULL into required foreign keys. Every constraint now holds.
  • A review is about an artist or an artwork (a CHECK constraint) instead of requiring both.
  • Join tables use the (artwork, material) pair as the primary key instead of a surrogate id plus a composite key.
  • Countries are ISO codes; statuses and event types are checked against fixed lists; date ranges can't end before they start.
  • Ownership history is traced through commissions and transactions, as the course project concluded, so the early OMANDILUGU table is gone.
  • Search is a materialized view (artwork_search) with GIN indexes on a weighted tsvector and on trigrams.

Stack

Next.js 16 (App Router, Server Components, Server Actions) · TypeScript · PostgreSQL 18 on Neon (free tier; scales to zero and wakes on the next request) · @neondatabase/serverless HTTP driver · deployed on Vercel.

Run it

npm install
# .env.local: DATABASE_URL=postgresql://…
node scripts/db.mjs db/schema.sql db/seed-reference.sql db/seed-archive.sql db/seed-contemporary.sql db/seed-studios.sql db/seed-records.sql
npm run dev

To rebuild the data: node scripts/harvest-met.mjs then node scripts/build-archive-seed.mjs for the museum archive, and node scripts/build-modern-seed.mjs for the contemporary designers and studios (both download and resize their images).

About

A searchable archive of wearable art: makers, materials, techniques and the hours behind each piece. Next.js, PostgreSQL full-text search, The Met Open Access.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages