PolyBuys is a cross-platform marketplace app (Expo React Native) for Cal Poly students, with a Convex cloud serverless backend. The monorepo has three workspaces: frontend, backend, packages/shared.
- Frontend (web):
npx expo start --web --port 8081fromfrontend/dir (ornpm run devfrom root). Opens at http://localhost:8081. The frontend connects to the remote Convex backend viaEXPO_PUBLIC_CONVEX_URL— no local database needed. - Backend sync:
npm run dev:backendrunsconvex devwhich syncs functions/schema to the Convex cloud deployment. RequiresCONVEX_DEPLOYMENTandCONVEX_URLinbackend/.env.local.
See QUICK_START.md and README.md for full reference. Summary:
- Lint:
npm run lint - Format:
npm run format - Typecheck:
npm run typecheck - Test:
npm test(Jest + convex-test, 8 suites / 125 tests) - Dev frontend:
npm run dev(Expo, presswfor web) - Dev backend:
npm run dev:backend(Convex dev sync)
frontend/.env.localneedsEXPO_PUBLIC_CONVEX_URL(the Convex backend URL, injected via Cursor secrets)backend/.env.localneedsCONVEX_DEPLOYMENT,CONVEX_URL, andCONVEX_SITE_URL(injected via Cursor secrets). Optional:AUTH_RESEND_KEY,OPENAI_API_KEY.
- The frontend entry point is
expo-router/entry(set infrontend/package.json"main"). Always runexpo startfrom thefrontend/directory, not the repo root. frontend/.npmrchaslegacy-peer-deps=true— required for Expo peer dependency resolution.- Husky pre-commit hook runs
npx lint-staged(ESLint + Prettier on staged files). - The backend is entirely remote (Convex cloud). There is no local database or Docker dependency.
- Tests run without backend credentials —
convex-testmocks the Convex runtime. TheOPENAI_API_KEYwarning in test output is harmless (moderation is skipped). convex dev(backend sync) requires interactive Convex login (npx convex login). In cloud agent environments, the user must complete the login flow via the Desktop pane beforeconvex devcan run.- You can seed test data via
npx convex runfrom thebackend/directory, e.g.npx convex run listings:internalCreateListing '{"title":"...", ...}'.