Replace the design-note docs (p1–p7) with the implemented "make it real" phase docs (p8–p10) and wire production-grade, env-gated real integrations: - p8 Casper Testnet: byte-exact deploys + WASM install via casper-js-sdk; live node reads (node.testnet.casper.network); CRED402_CHAIN=sim|testnet transport. - p9 x402 + data + MCP: real EIP-712 typed-data digests (@casper-ecosystem/ casper-eip-712); casper-x402 facilitator client (x402 V2); live Open-Meteo GHI; official @modelcontextprotocol/sdk server; casper-sidecar SSE event feed. - p10 RealFi + cross-chain: real Stripe test-mode webhooks (HMAC-verified) and Plaid sandbox → privacy-preserving on-chain envelopes; Base Sepolia EVM deploy (Foundry); reachable via /api/realfi/* and /api/x402/facilitator routes. - Sign-in with Casper Wallet: real extension provider + challenge/ed25519/session flow (/v1/auth/wallet/*), console connect + sign-in button. - Branding: Cred402 logo mark, favicon, OG image; Vercel config for the console. All env-gated with sim/free-API fallbacks; full suite green, all toolchains (TS/Rust/Go/Solidity) build. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
58 lines
1.6 KiB
YAML
58 lines
1.6 KiB
YAML
# Cred402 local production-like stack: the API (durable journal) + the Go event
|
|
# indexer projecting that journal. Postgres is included as the projection target
|
|
# the indexer's Sink interface would write to.
|
|
#
|
|
# docker compose -f infra/docker-compose.yml up --build
|
|
|
|
services:
|
|
api:
|
|
build:
|
|
context: ..
|
|
dockerfile: infra/Dockerfile
|
|
ports:
|
|
- "4021:4021"
|
|
environment:
|
|
CRED402_ENV: testnet
|
|
CRED402_AUTH_REQUIRED: "true"
|
|
CRED402_ADMIN_API_KEY: ${CRED402_ADMIN_API_KEY:?set CRED402_ADMIN_API_KEY}
|
|
CRED402_DATA_DIR: /data
|
|
CRED402_CASPER_NODE: ${CRED402_CASPER_NODE:-https://rpc.testnet.casperlabs.io/rpc}
|
|
CRED402_WEBHOOK_SECRET: ${CRED402_WEBHOOK_SECRET:-}
|
|
volumes:
|
|
- journal:/data
|
|
restart: unless-stopped
|
|
|
|
indexer:
|
|
build:
|
|
context: ../services/event-indexer
|
|
dockerfile_inline: |
|
|
FROM golang:1.24-bookworm AS build
|
|
WORKDIR /src
|
|
COPY . .
|
|
RUN go build -o /indexer ./cmd/indexer
|
|
FROM gcr.io/distroless/base-debian12
|
|
COPY --from=build /indexer /indexer
|
|
ENTRYPOINT ["/indexer"]
|
|
command: ["--journal", "/data/events.ndjson", "--out", "/data/projections.json", "--watch", "5s"]
|
|
volumes:
|
|
- journal:/data
|
|
depends_on:
|
|
- api
|
|
restart: unless-stopped
|
|
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
environment:
|
|
POSTGRES_USER: cred402
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-cred402}
|
|
POSTGRES_DB: cred402
|
|
ports:
|
|
- "5432:5432"
|
|
volumes:
|
|
- pgdata:/var/lib/postgresql/data
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
journal:
|
|
pgdata:
|