Common Ground is a collaborative reasoning workspace for building logic trees with structured claims, evidence, rebuttals, and mutable consensus states.
- Next.js + TypeScript app structure
- Prisma schema for core entities (users, trees, nodes, states, evidence, flags, AI fact-check submissions)
- Google OAuth via NextAuth route scaffold
- Core API routes:
- trees create/list/get/update
- nodes create
- node state updates
- comments create
- evidence create/list
- evidence attachment upload with file-type and quota enforcement
- AI fact-check prompt generation and submission parsing
- edit request create/approve/deny
- moderation flags + admin flag queue
- markdown + zip export
- Basic UI routes:
- landing page
- login page
- create tree page
- tree workspace interactive client (create node, set state, comments, evidence, file upload, AI fact-check submit)
- admin flags shell
- settings shell
- Docker compose for PostgreSQL + MinIO
Node display state is conservative:
contestedif any participant setDisagreestrong_concurif concur ratio among reviewed votes is >= 0.67- otherwise
exploring unreviewedif no reviewed votes
- Copy env template:
cp .env.example .env- Start infrastructure:
docker compose up -d- Install dependencies:
npm install- Generate prisma client and run migrations:
npm run prisma:generate
npm run prisma:migrate- Start app:
npm run dev- Import endpoint is a placeholder in this pass.
- ZIP export currently includes markdown/json/manifest and attachment metadata; attachment binary bundling is a follow-up.
- Access control is enforced on APIs for view/edit paths using tree membership and visibility.