Skip to content

Latest commit

 

History

History
141 lines (107 loc) · 5.56 KB

File metadata and controls

141 lines (107 loc) · 5.56 KB

Idea Map

A nonprofit, self-hosted live map of concrete apps, tools, automations, and experiments discovered from public links. Extraction and classification use a local Ollama model; the app has no paid AI, analytics, geocoding, or map API.

Local development

Requirements: Node.js 22+, npm, and optionally Docker Desktop.

npm install
cp .env.example .env
npm run dev

The web UI is available at http://localhost:5173; Vite proxies /api to the Node service on port 3000.

The default local config keeps account actions unavailable. Deterministic fixture identity is confined to non-production verification and requires both AUTH_MODE=fixture and IDEA_MAP_FIXTURES=1; set PUBLIC_ORIGIN to the exact browser origin when exercising CSRF-protected account mutations.

Read-only founder corpus audit

Point the local audit at a folder of projects to inventory workspace-level README proposals before any import or publication:

npm run corpus:audit -- /path/to/project-folder --format=summary

An optional idea-map.json beside each root README supplies explicit name, summary, source, link, and responsible fields. The command discovers repository/project roots, does not index their nested support READMEs, follows no symlinks, uses no network or AI, writes nothing, and publishes nothing. Its JSON result keeps the private folder identity separate from the editable public proposal and groups public-source candidates, private drafts, missing sources, and canonical duplicates.

An active local account additionally provides a browser-only folder review. The user can edit and explicitly approve individual proposals, then export a local manifest. Folder contents are not uploaded and the export does not publish. The exact metadata and approval contract is in docs/17-founder-first-acceptance.md.

Docker

Create a strong application secret before any public use:

export CLIENT_HASH_SECRET="$(openssl rand -hex 32)"
export CONTACT_EMAIL="business@moinsen.dev"
docker compose --profile setup run --rm ollama-pull
docker compose up --build -d

Open http://localhost:3000. Inspect health with:

curl --fail http://localhost:3000/api/health

The setup profile downloads the pinned qwen2.5:3b open-weight model once into the ollama-data volume. Normal starts do not redownload it. This is the fully containerized path intended for a Linux server.

Faster macOS development

Docker Desktop on macOS does not pass Metal acceleration into Linux containers. Keep the application and SQLite in Docker, but use the free Ollama Mac app for inference:

ollama pull qwen2.5:3b
export CLIENT_HASH_SECRET="$(openssl rand -hex 32)"
export CONTACT_EMAIL="business@moinsen.dev"
docker compose -f compose.mac.yaml up --build -d

This adapter still has no cloud endpoint or usage cost. Stop it with docker compose -f compose.mac.yaml down; the idea-map-data volume remains.

Data model and backup

Product data lives in the idea-map-data Docker volume. The schema uses checksum-tracked, additive migrations and keeps immutable idea revisions, source provenance, stable internal actors, creator claims, and tester intents. Privacy reports are linked by stable idea ID and cascade safely with their idea. Demo rows are marked separately and are hidden in production.

Create a verified SQLite hot backup without stopping the app:

docker run --rm --volumes-from vibecoder_idea_map-app-1 \
  -v "$PWD/backups:/backup" \
  -e DATABASE_PATH=/data/idea-map.db -e BACKUP_DIR=/backup \
  vibecoder_idea_map-app node dist-server/backup.js

The command produces a standalone mode-0600 database plus a checksum manifest with schema version, row counts, and integrity_check. It contains submissions, published ideas, revisions, pseudonymous account links, rate-limit state, and event history. It never intentionally contains raw IP addresses or full fetched page documents.

Set BACKUP_RETENTION_DAYS=35 in production to prune only verified snapshot files older than the policy after a fresh integrity-checked backup succeeds.

Legal and privacy operations

The public SPA routes /impressum, /datenschutz, and /nutzungsbedingungen are linked from every view. Each idea offers a bounded correction/removal report. Retention, report handling, account deletion, and the processing record are documented in docs/09-privacy-compliance.md; the operator commands are listed in deploy/README.md.

Cloudflare production edge

Production uses the outbound Tunnel for ideamap.moinsen.dev; the origin port binds only to loopback and remains reachable privately over Headscale. Browsing, source opening, stats, events, and public correction/rights reports stay public. New publication and private job status use /api/account/*, protected by Cloudflare Access Email OTP while the origin also validates the Access JWT. An active member, exact current policy records, same-origin CSRF, Turnstile, member limits, and pseudonymous network limits must all pass before a source is queued. See deploy/README.md and compose.production.yaml.

Verification

npm run check
npm run test:e2e
OLLAMA_URL=http://127.0.0.1:11434 OLLAMA_MODEL=qwen2.5:3b npm run ai:eval
CLIENT_HASH_SECRET=test-only-secret-change-me CONTACT_EMAIL=business@moinsen.dev docker compose config
CLIENT_HASH_SECRET=test-only-secret-change-me CONTACT_EMAIL=business@moinsen.dev docker compose -f compose.mac.yaml config
CLIENT_HASH_SECRET=test-only-secret-change-me CONTACT_EMAIL=business@moinsen.dev docker compose --profile verify run --rm ai-eval

The complete evidence contract is in docs/03-acceptance.md.