Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "next/core-web-vitals"
}
17 changes: 11 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# Golden CI floor — see dotfiles/templates/ci/README.md.
# solon: npm + Prisma. Floor = verify (typecheck only). `next lint` is not
# configured here (it drops into an interactive setup prompt), so lint is
# DEFERRED until an eslint config is added — a Never-Twice item. The Playwright
# e2e + build are also deferred (need a running app + DB). Prisma has no
# postinstall, so the client is generated before typecheck needs its types.
# solon: npm + Prisma. Floor = verify (lint + typecheck) + build.
# Lint is `next lint` (eslint + eslint-config-next, config in .eslintrc.json).
# `next build` is hermetic: the server components that touch Prisma catch DB
# errors and render demo fallbacks, so no live DB is needed. Prisma has no
# postinstall, so the client is generated before typecheck/build need its types.
# The Playwright e2e smoke tests stay deferred (need a running app).
name: CI

on:
Expand Down Expand Up @@ -37,6 +38,10 @@ jobs:
- name: Prisma generate (types for typecheck)
run: npx prisma generate

# SSOT: typecheck (lint deferred — see header), defined in package.json `verify`.
# SSOT: lint + typecheck, defined in package.json `verify`.
- name: Verify
run: npm run verify

# Build gate — hermetic (Prisma calls fall back without a live DB, see header).
- name: Build
run: npm run build
46 changes: 46 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# AGENTS.md — Solon

Bitcoin-native governance platform (transparent treasury + cryptographic democracy).

## Stack

- **Framework**: Next.js 14 (App Router, `output: 'standalone'` for the Hetzner deploy)
- **Language**: TypeScript 5.5 (strict)
- **Database**: PostgreSQL via Prisma 5
- **Styling**: Tailwind CSS 3
- **Bitcoin**: `@noble/*`, `bs58check` (message signing / signature verification)
- **Tests**: Playwright e2e + Puppeteer smoke scripts (`tests/`)

## Everyday commands

```bash
npm run dev # next dev (localhost:3000)
npm run build # next build (standalone) — run `prisma:generate` first (no postinstall)
npm run lint # next lint (eslint, next/core-web-vitals)
npm run typecheck # tsc --noEmit
npm run verify # lint + typecheck — the CI floor, run before every commit
```

`npm run verify` is the single source of truth for "is this change clean?" CI calls it
verbatim. Green `verify` locally ⇒ green CI.

## Prisma / database

- Schema SSOT: `prisma/schema.prisma`. Types flow from it via `@prisma/client`.
- **`prisma generate` is NOT automatic** — no postinstall hook. Run `npm run prisma:generate`
before `typecheck` or `build` so the client types exist. CI does this explicitly.
- **`db push` / migrations are MANUAL and out of CI's scope.** `npm run prisma:push`
(`prisma db push`) is run by hand against a live database. CI never touches a real DB —
do not add a migration/push step to the workflow.
- Migration history begins at `prisma/migrations/0_init` (versioned baseline).

## CI floor

`.github/workflows/ci.yml` runs `npm ci` → `prisma generate` → `npm run verify`
(lint + typecheck) on every push/PR to `main`. `next build` is not yet gated in CI (see below).

## Notes for agents

- Keep design tokens in the Tailwind/CSS SSOT; theme is Bitcoin-orange + navy.
- Never commit secrets. `.env` holds `DATABASE_URL`, `BTCPAY_*`, `BITCOIN_*`, Clerk keys.
- Amounts are stored in satoshis as BigInt — never floats.
25 changes: 0 additions & 25 deletions eslint.config.mjs

This file was deleted.

Loading
Loading