Skip to content

Rewrite README into comprehensive developer/researcher/deployment guide#14

Open
Spbd1 wants to merge 1 commit into
codex/prepare-docker-deployment-for-vpsfrom
codex/rewrite-readme.md-into-professional-guide
Open

Rewrite README into comprehensive developer/researcher/deployment guide#14
Spbd1 wants to merge 1 commit into
codex/prepare-docker-deployment-for-vpsfrom
codex/rewrite-readme.md-into-professional-guide

Conversation

@Spbd1

@Spbd1 Spbd1 commented May 8, 2026

Copy link
Copy Markdown
Owner

Motivation

  • Provide a professional, complete README so developers, researchers, and deployers can run the local demo, follow the research flow, deploy a pilot server, collect data, and export results.
  • Make operational details explicit (routes, server submission flags, env variables, Docker and native deployment) to reduce setup errors and clarify privacy/ethics implications.
  • Consolidate implemented behaviour (localStorage-first exports, optional server submission, admin endpoints, CSV/JSON export, computed metrics) into a single authoritative reference.

Description

  • Rewrote README.md into a structured guide that documents the study purpose, the full participant route sequence (/, /consent, /background, /game, /visible-results, /pre-reveal-survey, /hidden-rule-reveal, /post-reveal-survey, /individual-results, /export, /admin) and the research rationale (invisible inequality, attribution, fairness, protest legitimacy, redistribution, pre/post reveal design).
  • Added implementation and run instructions including stack details (Next.js 14, TypeScript, Tailwind), quick-start commands (npm install, npm run dev), local production checks (npm run typecheck, npm run lint, npm run build, npm run start), and PM2 example for process supervision.
  • Documented server pilot deployment with Docker and without Docker (commands such as cp .env.example .env, docker compose up --build -d, docker compose exec app npm run db:migrate, and native steps including npm run db:generate and npm run db:migrate).
  • Added operational docs for data collection and admin exports, including the local-first flow (localStorage → optional POST /api/submissions → PostgreSQL → /admin), environment variables table (notably DATABASE_URL, APP_BASE_URL, ENABLE_SERVER_SUBMISSION, NEXT_PUBLIC_ENABLE_SERVER_SUBMISSION, ADMIN_EXPORT_TOKEN, SUBMISSION_RATE_LIMIT_*, MAX_SUBMISSION_BODY_BYTES, CONSENT_VERSION, SCHEMA_VERSION), curl examples for JSON and CSV exports, description of admin endpoints (/api/admin/submissions, /api/admin/submissions.csv, /api/admin/stats), the export:submissions script, data schema, survey measures, computed metrics, privacy/ethics guidance, security notes, troubleshooting, and a development scripts table.

Testing

  • Ran git diff --check and repository checks; no whitespace errors were reported.
  • Attempted build-time checks (npm run typecheck, npm run lint, npm run build), but these could not complete prior to installing dependencies.
  • npm install failed in this environment because the registry returned 403 Forbidden for @prisma/client, so dependency installation and the subsequent TypeScript/Eslint/build checks remain blocked until dependencies can be installed successfully.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant