feat: WorkSight MVP integration — runs on @worksight/common, uniform Vercel config, honest docs - #27
Conversation
Stale npm lockfile still described a Fastify API while apps/api is NestJS, so npm ci and CI were dead. Align on pnpm, declare missing web deps, stop Supabase env throws at import during next build, and repair flat ESLint/Turbo. Co-authored-by: Auto (Cursor Agent) <auto@cursor.com> Signed-off-by: kuyacarlo <106532351+kuyacarlo@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com>
Drop conflicting pnpm/action-setup version pins so Corepack uses packageManager (pnpm@10.33.0), and replace remaining npm install/build commands in apps/*/vercel.json. Co-authored-by: Auto (Cursor Agent) <auto@cursor.com> Signed-off-by: kuyacarlo <106532351+kuyacarlo@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Jest specs were included in tsc without @types/jest, failing pnpm --filter @worksight/web type-check. Tests remain runnable via jest scripts; app type-check is unblocked for MVP. Co-authored-by: Cursor <cursoragent@cursor.com>
Populate employees, tasks, and survey admin/dashboard views from common data/utils so the MVP no longer depends on duplicated inline mocks. Co-authored-by: Cursor <cursoragent@cursor.com>
The repo had a single apps/web/vercel.json with hardcoded env plus a legacy builds/routes block on the API, while three Vercel projects (worksight, worksight-api, worksight-docs) each read config from their own Root Directory. Vercel loads exactly one vercel.json per project and never merges a root file with a nested one, so centralization here means uniform per-app configs sharing the same workspace primitives. - apps/web: nextjs preset, pnpm --filter build, telemetry off, no outputDirectory override (preset default is correct) - apps/api: drop legacy builds/routes, which disabled Vercel's install and build steps entirely; output dist - apps/docs: same shape, output .vitepress/dist - remove committed NEXT_PUBLIC_* values incl. the Supabase anon key; env stays dashboard-managed per environment - doc/DEPLOYMENT.md + README: per-project table matching the applied dashboard settings (Root Directory, canary, skip-unaffected), and an honest note that the API still lacks a serverless handler Co-authored-by: Cursor <cursoragent@cursor.com>
Serve users/teams/tasks/activities endpoints from the shared @worksight/common contract instead of placeholder responses, so web and API agree on payload shapes. - users module returns EmployeeProfile/Team fixtures; new tasks module returns Assignment/Activity fixtures, all typed from common - fix api build emitting nothing (inherited noEmit) and switch to CJS emit resolved against the built common dist; add tsconfig.build.json - fix common dist being unloadable ESM (directory imports) via tsc-alias --resolve-full-paths in the build script - fix BaseLookup.filter() constructing subclasses with the wrong argument order, which broke every chained lookup/getById - fix department stats matching against array-valued departments - add jest specs for both services; add node/jest globals to eslint Co-authored-by: Cursor <cursoragent@cursor.com>
Stack E2E demo (#18) on both sibling PRs so web and API share the @worksight/common contract in one worktree.
Align package layout, run instructions, fixture-backed data, and three Vercel projects; drop Next 14 / deploy.yml / invented API myths. Co-authored-by: Cursor <cursoragent@cursor.com>
Add a runnable demo (pnpm demo /docs/mvp/DEMO.md) so Nest and Next agree on the @worksight/common contract: public /demo page, API CORS on :3001, and an optional NEXT_PUBLIC_USE_API toggle for admin/tasks views. Fixture-backed only. Co-authored-by: Cursor <cursoragent@cursor.com>
…into feat/mvp-integration
…integration Co-authored-by: Cursor <cursoragent@cursor.com> # Conflicts: # README.md # doc/DEPLOYMENT.md # docs/mvp/README.md
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
The worksight-api preview deployment failed on the integration branch with four TS2307 errors: nest build could not find @worksight/common. pnpm --filter <pkg> build runs only that package's script; it does not build the package's workspace dependencies first. Turbo's dependsOn: ["^build"] does. Local runs passed only because common/dist already existed from an earlier build, and apps/api/vercel.json previously used a legacy builds block that skipped the build step entirely, so this was never exercised. Switch all three vercel.json buildCommands to Turbo filters and update the Vercel dashboard build commands to match. Verified from a clean slate (dist directories deleted) that each app builds from its own Root Directory: api 2 tasks, web 3 tasks, docs 1 task, with common built first. Co-authored-by: Cursor <cursoragent@cursor.com>
CI caught a real bug — fixed in
|
Summary
Integrates the MVP stack (#15 #16 #17 #18 #19 #20) into one verified branch. Each workstream keeps its own PR (#21–#26) for review; this is the merge-ready result.
WorkSight now actually runs on the shared data classes: Nest serves
@worksight/commonfixtures, and the web app renders them end to end.What made this more than a merge
Wiring the API to
@worksight/common(#17) surfaced three latent defects that a green build had been hiding:nest buildwas emitting an emptydist.apps/apiinheritednoEmit: truefrom the root tsconfig, so the build "succeeded" while producing nothing runnable. Fixed with a propertsconfig.build.json.@worksight/commonwas unloadable by Node. It emitted ESM with directory imports (export * from './data'), which Node cannot resolve. Build now runstsc-alias --resolve-full-paths.BaseLookup.filter()returned garbage. It reconstructed subclasses with the wrong constructor arity, so every chained lookup silently produced wrong data —/users/:id404'd for valid ids and/tasks/stats500'd. Fixed via prototype clone.On the deploy side (#20),
apps/api/vercel.jsonused a legacybuilds/routesblock that disables Vercel's install and build steps entirely, and the Supabase anon key was hardcoded invercel.json. Both fixed; env is dashboard-managed.Verified on this branch
End-to-end smoke, API on :3199 and web on :3198:
Vercel
Three projects, uniform per-app config, matching the applied dashboard settings:
worksightapps/webpnpm --filter @worksight/web buildworksight-apiapps/apipnpm --filter @worksight/api buildworksight-docsapps/docspnpm --filter @worksight/docs buildVercel loads exactly one
vercel.jsonper project — the one at that project's Root Directory — so "centralized" means uniform configs, not one shared file.Not built (deliberately)
No Supabase persistence for the new API routes; attendance/survey/burnout types have no endpoints; the API still has no serverless handler, so Docker remains its working deploy path; some
@worksight/commonfixture ids are not valid UUIDs, so strict zod parsing would reject them even though the TS shapes match.Test plan
/demoMade with Cursor