← back to Lifestyle Asset Intel
README.md
79 lines
# lifestyle-asset-intel
v0 scaffold for an enterprise Lifestyle Asset Intelligence platform — valuation,
liquidity, and ownership-cost intelligence for luxury secondary-market assets,
starting with Hermès Birkin/Kelly handbags.
The full enterprise design (12-month, 8–12 FTE, ~$2.5–5M build) lives in
[`BLUEPRINT.md`](./BLUEPRINT.md). The phased path from this skeleton to that
endpoint lives in [`ROADMAP.md`](./ROADMAP.md). Read those two before extending
the codebase.
## What v0 actually is
- Express + Postgres skeleton in Steve's canonical NPH pattern
- Canonical schema (sources / brands / model_families / canonical_assets /
raw_observations / transactions / valuation_snapshots / indices / index_points /
portfolio_holdings) — the **public contract** the rest of the platform plugs into
- Stub valuation engine (`lib/valuation.js`) that returns blueprint-shaped
responses from the seeded transactions table — no ML
- Internal market-ops console at `/` with sort, density slider, grid-search,
dark/light toggle, hamburger nav, schema.org JSON-LD (per Steve's standing rules)
- JSON API at `/api/health`, `/api/sources`, `/api/assets`, `/api/valuation/:slug`,
`/api/index/:slug`, `/api/portfolio?owner=`
- Sample data: Birkin 30 Togo Gold GHW (US), with the blueprint's normalized
2022–2025 secondary-market averages plus one Pristine FASHIONPHILE comp at
$28,500
- Smoke tests via `node --test`
- pm2 ecosystem on port **9820**
## What v0 is NOT
No live source connectors, no ML, no auth, no multi-tenant, no Kafka/Iceberg/
OpenSearch/Feast/Temporal/MLflow. All deferred to later phases (see ROADMAP.md).
No domain registered yet — `info@<domain>` provisioning is deferred to v0.1.
## Run it
```bash
cd ~/Projects/lifestyle-asset-intel
cp .env.example .env
npm install
createdb lifestyle_asset_intel
PGDATABASE=lifestyle_asset_intel psql -f db/schema.sql
PGDATABASE=lifestyle_asset_intel psql -f db/seed.sql
npm test
npm run dev # or: npm run pm2:start
```
Then open <http://localhost:9820>.
## Health check
```bash
curl -s http://127.0.0.1:9820/api/health | jq
curl -s http://127.0.0.1:9820/api/valuation/birkin-30-togo-gold-ghw-us | jq
curl -s http://127.0.0.1:9820/api/index/birkin-30-togo-neutral | jq
```
## Layout
```
.
├── server.js Express bootstrap, NPH-style middleware order
├── lib/db.js pg Pool wrapper
├── lib/valuation.js v0 stub — replace contents only when ML lands
├── routes/api.js /api/* JSON
├── routes/console.js /, /asset/:slug, /indices/:slug
├── views/ EJS templates (head/foot partials, index, asset, index_detail, error)
├── public/css/app.css dark/light vars, grid system
├── public/js/app.js sort + density + search + theme toggle (localStorage)
├── db/schema.sql includes all migrations in order
├── db/seed.sql blueprint sample dataset
├── db/migrations/0001_*.sql canonical schema
├── scripts/migrate.js idempotent migration runner
├── tests/smoke.test.js boots server + hits all endpoints
├── BLUEPRINT.md full enterprise design (source of truth)
└── ROADMAP.md phased plan to get from v0 → v2
```