3.3 KiB
3.3 KiB
01. Project Foundation — Root Config & Directory Cleanup
meta: id: kordant-unified-restructure-01 feature: kordant-unified-restructure priority: P0 depends_on: [] tags: [infrastructure, cleanup, foundation]
objective:
- Establish a clean project root with unified tooling, removing the fragmented packages/ + services/ split and preparing the workspace for a single monolithic web app plus native mobile projects.
deliverables:
- Updated root
package.jsonwith single workspace entryweb/ - Updated
pnpm-workspace.yamlto includeweb/,iOS/Kordant,android/,browser-ext/ - Updated
turbo.jsonwith tasks for web, browser-ext - Remove or archive legacy
packages/,services/,server/directories - Ensure
web/is the primary application workspace - Root-level shared config files (
.nvmrc,.editorconfig,tsconfig.base.jsoncleanup)
steps:
- Backup
packages/,services/,server/to a dated archive branch or tar.gz before removal. - Update root
package.json:- Remove
workspacesfield referencingpackages/*andservices/* - Add
workspaces: ["web", "browser-ext"]or use pnpm workspace syntax - Update scripts to reference
web/directly (e.g.,"dev": "pnpm --filter web dev")
- Remove
- Update
pnpm-workspace.yaml:packages: - "web" - "browser-ext" - Update
turbo.json:- Remove package-specific build outputs that no longer apply
- Ensure
web#build,web#dev,web#testare defined - Add
browser-ext#buildif needed
- Clean root of obsolete files:
check-identity.js,test-classifier.ts,test-maxpayload.ts,test-ws-maxpayload*.js(move to web/ if still needed)docker-compose*.yml,Dockerfile(will be recreated in task 42)infra/,load-tests/,docs/(evaluate if content should move to web/docs or archive)
- Verify
web/has its ownpackage.json,vite.config.ts,tsconfig.json, and can run independently. - Run
pnpm installfrom root to regenerate lockfile and verify workspace resolves correctly. - Run
pnpm devfrom root and confirm web app starts on expected port.
tests:
- Unit: N/A (infrastructure task)
- Integration:
pnpm installcompletes without workspace errors;pnpm devstarts web app;pnpm buildin web/ succeeds - E2E: N/A
acceptance_criteria:
pnpm-workspace.yamlonly referenceswebandbrowser-extpnpm installfrom root resolves dependencies cleanlypnpm devstarts the web app without errorspackages/,services/, andserver/are no longer in the working tree (archived or deleted)- No broken references to removed directories in root config files
validation:
- Run
ls packages/ services/ server/and confirm "No such file or directory" or they are empty placeholders - Run
pnpm devand verifyhttp://localhost:3000responds - Run
pnpm buildinsideweb/and verify output inweb/.output/orweb/dist/
notes:
- Do NOT delete git history. Use
git mvwhere possible, or archive viagit branch archive/legacy-$(date +%Y%m%d)before deleting. - The
web/directory already exists (wasredux/) and contains a SolidStart scaffold. We build from there. iOS/Kordantandandroid/are native projects and do not participate in the pnpm workspace; they are tracked as sibling directories.