chore: svuota il cestino e allinea CLAUDE.md alla nuova struttura
Verificato prima di cancellare: le 10 cartelle di fasi in planning-fasi-duplicate/ erano byte-per-byte identiche alle copie in .planning/milestones/ (diff -rq su ognuna), i 13 script one-off erano gia eseguiti su fasi chiuse, e CLAUDE-SECURITY-*/ conteneva solo i metadati di una run interrotta. Tutto resta comunque in git fino a 94b3b2f^. CLAUDE.md citava ancora gli scripts/push-*.ts come vecchio metodo per le migrazioni: quei file non esistono piu, quindi il riferimento puntava a fantasmi. Ora la procedura SSH+docker exec e l'unica indicata. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -24,9 +24,6 @@
|
||||
.DS_Store
|
||||
*.pem
|
||||
|
||||
# staging per la cancellazione — vedi cestino/LEGGIMI.md
|
||||
/cestino/
|
||||
|
||||
# cache del plugin impeccable (globale), si rigenera
|
||||
.impeccable/
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ Next.js 16 App Router · Neon Postgres · Drizzle ORM · Auth.js v4 · Tailwind
|
||||
## Commands
|
||||
- `npm run dev` · `npm run build` · `npm run lint` (lint script is bare `eslint`, not `next lint`)
|
||||
- **There is no test suite** — no vitest/jest/playwright, no `test` script. Don't go looking for one and don't invent test commands. `npm run build` is the verification of record (it typechecks).
|
||||
- One-off scripts: `npx tsx scripts/<name>.ts` with `DATABASE_URL` in the env (`tsx` is not a devDependency — it must go through `npx`). `scripts/` holds historical import/seed/verify utilities; nothing there is part of the runtime.
|
||||
- One-off scripts: `npx tsx scripts/<name>.ts` with `DATABASE_URL` in the env (`tsx` is not a devDependency — it must go through `npx`). `scripts/` holds three reusable utilities — `seed.ts` and the two Notion importers — and nothing there is part of the runtime.
|
||||
|
||||
## Architecture
|
||||
- **`src/proxy.ts` is the middleware.** Next 16 names it `proxy`, not `middleware` — searching for `middleware.ts` finds nothing. Matcher: `/admin/*`, `/client/*`, `/quote/*`.
|
||||
@@ -34,7 +34,7 @@ Next.js 16 App Router · Neon Postgres · Drizzle ORM · Auth.js v4 · Tailwind
|
||||
|
||||
## Conventions
|
||||
- **Mutations are Server Actions**, colocated as `actions.ts` (or `*-actions.ts`) inside the route folder. There is no REST API for admin: `src/app/api/` holds only NextAuth, the two internal validation routes, and two client endpoints.
|
||||
- **Migrations** are hand-written SQL in `src/db/migrations/NNNN_name.sql`, with gaps in the numbering (0002 doesn't exist — that's expected). `drizzle.config.ts` is present but `drizzle-kit generate` is broken: edit `src/db/schema.ts` **and** write the SQL by hand, keeping the two in sync. The `scripts/push-*.ts` files are the old way of applying migrations — don't use them, the SSH/docker-exec procedure below is authoritative.
|
||||
- **Migrations** are hand-written SQL in `src/db/migrations/NNNN_name.sql`, with gaps in the numbering (0002 doesn't exist — that's expected). `drizzle.config.ts` is present but `drizzle-kit generate` is broken: edit `src/db/schema.ts` **and** write the SQL by hand, keeping the two in sync. Applying a migration goes exclusively through the SSH/docker-exec procedure below — never through a throwaway script.
|
||||
- **Slugs and tokens are bearer credentials.** Never commit their values (migration files included). They're generated with `customAlphabet` (CSPRNG) in `src/app/admin/clients/new/actions.ts` — never `Math.random()`.
|
||||
- **Language:** code and comments mix English and Italian; all user-facing UI and error messages are **Italian**.
|
||||
- **AI-generated HTML:** never `dangerouslySetInnerHTML` on model output — use `src/components/public/proposal/RichText.tsx`, which whitelists bold/emphasis only.
|
||||
|
||||
Reference in New Issue
Block a user