Skip to content

keegreil/common-ground

Repository files navigation

Common Ground (v1 Scaffold)

Common Ground is a collaborative reasoning workspace for building logic trees with structured claims, evidence, rebuttals, and mutable consensus states.

Implemented in this scaffold

  • 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

Consensus display logic

Node display state is conservative:

  1. contested if any participant set Disagree
  2. strong_concur if concur ratio among reviewed votes is >= 0.67
  3. otherwise exploring
  4. unreviewed if no reviewed votes

Local setup

  1. Copy env template:
cp .env.example .env
  1. Start infrastructure:
docker compose up -d
  1. Install dependencies:
npm install
  1. Generate prisma client and run migrations:
npm run prisma:generate
npm run prisma:migrate
  1. Start app:
npm run dev

Notes

  • 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.

About

Common-ground

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors