Technology Stack
Technology Stack
Section titled “Technology Stack”Stack choices optimize legal data integrity first
Section titled “Stack choices optimize legal data integrity first”The selected stack emphasizes reliable schema evolution, explicit typing, and compatibility with both human-facing and AI-agent-facing layers.
Runtime and language stack
Section titled “Runtime and language stack”Core runtime components:
- Node.js
>=20.0.0 - npm
>=10.0.0 - TypeScript (strict mode)
- Next.js 16 + React 19
Primary dependencies and roles
Section titled “Primary dependencies and roles”| Dependency | Role in project |
|---|---|
next | Web runtime and routing shell |
react, react-dom | UI rendering |
drizzle-orm | Type-safe schema modeling |
pg | PostgreSQL client for scripts/runtime integration |
drizzle-kit | Schema/migration tooling support |
tsx | TypeScript script execution (migrations and tooling) |
eslint, eslint-config-next | Linting baseline |
tailwindcss, @tailwindcss/postcss | Styling pipeline |
Database and indexing stack
Section titled “Database and indexing stack”Database layer uses PostgreSQL with pgvector enabled. Search and retrieval foundations include:
- generated
tsvectorindex for Portuguese full-text search; - IVFFlat vector index for embedding similarity workflows.
Build and quality toolchain
Section titled “Build and quality toolchain”Key commands from package.json:
npm run devnpm run buildnpm run startnpm run lintnpm test
External services currently referenced
Section titled “External services currently referenced”- Railway PostgreSQL (connection through
DATABASE_URL) - GitHub Actions workflow using
DISCORD_PR_REVIEW_WEBHOOK
Upgrade posture
Section titled “Upgrade posture”Dependency updates should be staged by risk:
- patch upgrades for low-risk runtime/tooling;
- minor upgrades after lint/build/test validation;
- major upgrades only with explicit compatibility testing.