Skip to content

NU-001 Scaffold: compose stack, Postgres schema, env template #16

Closed

Description

@BasuruK

Part of #30.

Stand up the six-container stack and the Postgres schema everything else depends on.

Dev runtime is OrbStack, not Docker Desktop. docker/docker compose CLI and the compose file
format are unaffected — OrbStack is a drop-in Docker-compatible engine, so nothing in this issue's
Build or Definition of Done changes. Noted so no one installs Docker Desktop or assumes its
file-sharing/networking quirks when something doesn't behave like it would there.

Build

  • docker-compose.yml: Postgres 18, Neo4j 5 community (5.13+ for native vector indexes), RustFS.
  • schema.sql: two schemas (nuron_ai, nuron_api), two login roles, no cross-schema grants.
    Enums pipeline_state (must include failed as a terminal value, not just the happy-path
    chain), author_source, entry_point. Tables documents (needs claimed_by, lease_until,
    lease_token — monotonic, incremented on every claim, required on every subsequent write so
    a worker whose lease was reclaimed can't overwrite newer work — plus attempt_count,
    next_attempt_at), reviewed_sources, entity_aliases, node_provenance.
  • .env.example covering Postgres/Neo4j/RustFS creds, OPENAI_*, embedding model + dimensions,
    LlamaParse (disabled), scan interval, mtime window, upload cap (default 25 MB), source_owner.

Why schema isolation is a role, not a convention

nuron-api must not be able to SELECT from nuron_ai tables. If it can, it eventually will —
it is right there and faster than an HTTP hop — and the one-way web → api → ai layering becomes
a comment rather than a constraint, with nuron-ai unable to migrate a table without breaking
nuron-api. Enforce with separate DB roles.

Role passwords come from env via psql \getenv so no secret is committed.

Definition of done

  • docker compose config validates.
  • docker compose up -d postgres neo4j rustfs brings all three healthy.
  • Schema applies cleanly on a fresh volume.
  • nuron_api_svc cannot read nuron_ai.documents — verify explicitly, don't assume the grant.

Status

Not started. An earlier draft was written outside the tracker and has been deleted — the schema was never accepted by a live Postgres, so nothing was verified.

Activity

  1. added
    wayfinder:taskWayfinding child ticket: implementation task
    ready-for-agentFully specified, ready for an AFK agent
    on Aug 17, 2026
  2. changed the title [-]Scaffold: compose stack, Postgres schema, env template[/-] [+]NU-001 Scaffold: compose stack, Postgres schema, env template[/+] on Aug 17, 2026
  3. self-assigned this
    on Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

ready-for-agentFully specified, ready for an AFK agentwayfinder:taskWayfinding child ticket: implementation task

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions