Skip to content

Set up dev environment + fix corrupted math-algebra B1 seed#2

Draft
EnglandTong wants to merge 2 commits into
mainfrom
cursor/setup-dev-environment-f72a
Draft

Set up dev environment + fix corrupted math-algebra B1 seed#2
EnglandTong wants to merge 2 commits into
mainfrom
cursor/setup-dev-environment-f72a

Conversation

@EnglandTong

Copy link
Copy Markdown
Owner

Summary

Sets up the EduCore development environment for Cursor Cloud agents and fixes a blocking data-corruption bug discovered during setup.

  • fix(modules): modules/math-algebra/seeds/B1.json contained a truncated partial duplicate of questions 001–019 spliced in before the complete 25-question array, breaking a string literal with a raw control character. This made JSON.parse fail inside loadModules() — which runs at API startup and in the db:seed* scripts — so the API could not boot at all. Restored the file to the intended valid 25-question array.
  • docs: Added AGENTS.md with a ## Cursor Cloud specific instructions section covering services (MongoDB/Redis), how to run the apps, and non-obvious gotchas.

Environment

  • Node 22 / pnpm 9.15 (pnpm install).
  • MongoDB (mongod binary reused from mongodb-memory-server, installed to /usr/local/bin) and Redis (apt) run as local services; seeded demo accounts via db:seed*.
  • Update script: pnpm install (services + system binaries persist in the VM snapshot; AGENTS.md documents how to start them).

Testing

  • pnpm lint
  • pnpm test (after a clean build — see AGENTS.md *.tsbuildinfo gotcha)
  • pnpm build
  • ✅ API GET /healthstatus: ok (mongodb connected, redis ready, 6 modules)
  • ✅ API register → login → authenticated /modules
  • ✅ Web UI: new student sign-up → authenticated dashboard

educore_register_student_dashboard.mp4

Student dashboard after successful registration

To show artifacts inline, enable in settings.

Open in Web Open in Cursor 

cursoragent and others added 2 commits June 27, 2026 06:49
The file had a truncated partial duplicate of questions 001-019 spliced
in before the complete 25-question array, breaking a string literal with
a raw control character. This made JSON.parse fail in loadModules(), which
runs at API startup and in the db:seed scripts, preventing the API from
booting. Restored the file to the intended valid 25-question array.

Co-authored-by: EnglandTong <EnglandTong@users.noreply.github.com>
Co-authored-by: EnglandTong <EnglandTong@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants