Summary
Reorganize the root directory structure to follow monorepo best practices and improve maintainability.
Current Issues
- Configuration files scattered across root directory
- Development scripts mixed with business logic
- Documentation files cluttering root level
- Generated/temporary files in version control
- Shared utilities buried in package-specific folders
Proposed Structure
/
├── README.md # Project overview
├── CLAUDE.md # Development guidance
├── LICENSE # License file
├── package.json # Root package config
├── pnpm-lock.yaml # Lock file
├── pnpm-workspace.yaml # Workspace config
├── tsconfig.json # TypeScript config
├── .nycrc.json # Coverage config (stays at root)
├── .eslintrc.cjs # ESLint config (stays at root)
├── apps/ # Applications
├── packages/ # Shared packages
├── coverage/ # Test coverage reports
├── docs/ # 📁 NEW: All documentation
├── config/ # 📁 NEW: Configuration files
└── scripts/ # 📁 NEW: Shared development scripts
Changes Included
Move to /docs/
ROADMAP.md → docs/ROADMAP.md
SPRINT_1_IMPLEMENTATION.md → docs/SPRINT_1_IMPLEMENTATION.md
SPRINT_PLAN.md → docs/SPRINT_PLAN.md
Move to /config/
firebase.json → config/firebase.json
.firebaserc → config/.firebaserc
firestore.indexes.json → config/firestore.indexes.json
firestore.rules → config/firestore.rules
tsconfig.dev.json → config/tsconfig.dev.json
ngrok.yml.template → config/ngrok.yml.template
Move to /scripts/
dev-start.js → scripts/dev-start.js
packages/backend/scripts/generateKey.ts → scripts/generateKey.ts
packages/backend/scripts/signMessage.ts → scripts/signMessage.ts
Package.json Updates
- Update Firebase commands to use
--config-dir ./config
- Update dev script to use
scripts/dev-start.js
- Update backend scripts to reference
../../scripts/
Security Improvements
- Add development keys to
.gitignore
- Remove generated files from tracking
- Clean up temporary files
Benefits
✅ Professional Structure - Follows industry monorepo best practices
✅ Clear Separation - Configuration, documentation, and scripts organized
✅ Shared Utilities - Development tools accessible across all packages
✅ Cleaner Root - Only essential files at root level
✅ Better Security - Proper gitignore for sensitive files
✅ Easier Maintenance - Logical grouping makes navigation intuitive
Testing Checklist
Summary
Reorganize the root directory structure to follow monorepo best practices and improve maintainability.
Current Issues
Proposed Structure
Changes Included
Move to
/docs/ROADMAP.md→docs/ROADMAP.mdSPRINT_1_IMPLEMENTATION.md→docs/SPRINT_1_IMPLEMENTATION.mdSPRINT_PLAN.md→docs/SPRINT_PLAN.mdMove to
/config/firebase.json→config/firebase.json.firebaserc→config/.firebasercfirestore.indexes.json→config/firestore.indexes.jsonfirestore.rules→config/firestore.rulestsconfig.dev.json→config/tsconfig.dev.jsonngrok.yml.template→config/ngrok.yml.templateMove to
/scripts/dev-start.js→scripts/dev-start.jspackages/backend/scripts/generateKey.ts→scripts/generateKey.tspackages/backend/scripts/signMessage.ts→scripts/signMessage.tsPackage.json Updates
--config-dir ./configscripts/dev-start.js../../scripts/Security Improvements
.gitignoreBenefits
✅ Professional Structure - Follows industry monorepo best practices
✅ Clear Separation - Configuration, documentation, and scripts organized
✅ Shared Utilities - Development tools accessible across all packages
✅ Cleaner Root - Only essential files at root level
✅ Better Security - Proper gitignore for sensitive files
✅ Easier Maintenance - Logical grouping makes navigation intuitive
Testing Checklist
pnpm devstarts development environment correctlygenerateKeyandsignMessagescripts function