Goal: Organize the project for better maintainability, discoverability, and professional structure.
Main Changes:
- Move 12+ documentation files from root →
docs/(organized by category) - Move 3 example scripts from root →
examples/basic/ - Keep existing good structure (
src/,pages/,scripts/) - Clean root level to only essential files
Impact:
- ✅ Cleaner root directory
- ✅ Better documentation organization
- ✅ Clear separation of examples vs production code
- ✅ Easier for new contributors to navigate
- Documentation scattered at root - 12+ markdown files at root level
- Example/test scripts at root -
createProfile.ts,read_example.ts,write_example.ts - No clear documentation organization - Mix of guides, reports, and specs
- Some files may be outdated - Example scripts might be superseded by actual implementation
mentor-graph/
├── Root level (cluttered)
│ ├── 12+ .md files (documentation)
│ ├── 3 example .ts files
│ ├── package.json, tsconfig.json, etc.
│
├── src/ (well organized)
│ ├── arkiv/ (entity helpers)
│ ├── hooks/ (React hooks)
│ ├── lib/ (utilities like jitsi)
│ ├── styles/ (responsive design tokens)
│ ├── utils/ (touch targets)
│ ├── config.ts
│ └── wallet.ts
│
├── pages/ (Next.js structure)
│ ├── api/ (API routes)
│ ├── _app.tsx, _document.tsx
│ └── index.tsx, me.tsx, network.tsx, profiles.tsx
│
├── scripts/ (seed scripts)
│ ├── seedDummyData.ts
│ └── seedSimple.ts
│
└── tutorial-source-code/ (ignored, reference only)
mentor-graph/
├── README.md # Main project documentation
├── package.json
├── package-lock.json
├── tsconfig.json
├── next.config.js
├── .gitignore
├── .env.example # Template for environment variables
│
├── docs/ # All documentation organized
│ ├── README.md # Documentation index
│ │
│ ├── guides/ # How-to guides
│ │ ├── deployment.md # Vercel deployment guide
│ │ ├── jitsi-integration.md # Jitsi setup and usage
│ │ └── mobile-optimization.md # Mobile optimization details
│ │
│ ├── architecture/ # Technical documentation
│ │ ├── design.md # Design philosophy
│ │ ├── spec-compliance.md # Spec compliance report
│ │ └── arkiv-operations.md # Arkiv operations documentation
│ │
│ ├── development/ # Development docs
│ │ ├── runbook.md # Developer experience notes
│ │ ├── rate-limits.md # Rate limit information
│ │ └── troubleshooting.md # Deployment troubleshooting
│ │
│ └── reference/ # Reference materials
│ ├── dummy-data.md # Dummy data for testing
│ └── api-examples.md # API usage examples
│
├── examples/ # Example scripts and tutorials
│ ├── README.md # Examples index
│ ├── basic/ # Basic Arkiv examples
│ │ ├── create-profile.ts
│ │ ├── read-entity.ts
│ │ └── write-entity.ts
│ └── advanced/ # Advanced examples (if needed)
│
├── scripts/ # Build and utility scripts
│ ├── seed-dummy-data.ts # Full dummy data seeding
│ └── seed-simple.ts # Simple asks/offers seeding
│
├── src/ # Source code (keep as is)
│ ├── arkiv/ # Arkiv entity helpers
│ │ ├── asks.ts
│ │ ├── offers.ts
│ │ ├── profiles.ts
│ │ ├── sessions.ts
│ │ ├── feedback.ts
│ │ ├── trustEdges.ts
│ │ ├── subscriptions.ts
│ │ └── client.ts
│ │
│ ├── hooks/ # React hooks
│ │ └── useTouchFeedback.ts
│ │
│ ├── lib/ # Library utilities
│ │ └── jitsi.ts
│ │
│ ├── styles/ # Styling utilities
│ │ └── responsive.ts
│ │
│ ├── utils/ # General utilities
│ │ └── touchTargets.ts
│ │
│ ├── config.ts # Configuration
│ └── wallet.ts # Wallet utilities
│
├── pages/ # Next.js pages (keep as is)
│ ├── api/ # API routes
│ │ ├── asks.ts
│ │ ├── offers.ts
│ │ ├── me.ts
│ │ ├── network.ts
│ │ ├── profiles.ts
│ │ ├── subscribe.ts
│ │ └── wallet.ts
│ │
│ ├── _app.tsx
│ ├── _document.tsx
│ ├── index.tsx
│ ├── me.tsx
│ ├── network.tsx
│ └── profiles.tsx
│
└── public/ # Static assets (if needed)
└── (images, fonts, etc.)
Root → docs/guides/:
VERCEL_DEPLOY.md→docs/guides/deployment.mdVERCEL_TROUBLESHOOTING.md→docs/development/troubleshooting.mdjitsi.md→docs/guides/jitsi-integration.mdMOBILE_OPTIMIZATION_PLAN.md→docs/guides/mobile-optimization.md
Root → docs/architecture/:
design.md→docs/architecture/design.mdSPEC_COMPLIANCE_REPORT.md→docs/architecture/spec-compliance.mdARKIV_OPERATIONS.md→docs/architecture/arkiv-operations.md
Root → docs/development/:
runbook.md→docs/development/runbook.mdRATE_LIMIT_INFO.md→docs/development/rate-limits.mdDEPLOYMENT_FIX.md→docs/development/troubleshooting.md(merge or append)
Root → docs/reference/:
DUMMY_DATA.md→docs/reference/dummy-data.md
Root → Keep:
README.md(main project README, stays at root)
Root → examples/basic/:
createProfile.ts→examples/basic/create-profile.tsread_example.ts→examples/basic/read-entity.tswrite_example.ts→examples/basic/write-entity.ts
Keep in scripts/ but rename:
seedDummyData.ts→seed-dummy-data.ts(kebab-case consistency)seedSimple.ts→seed-simple.ts(already correct)
- Documentation is organized by purpose (guides, architecture, development)
- Examples are separate from production code
- Scripts are clearly utility/build tools
- New developers can find docs in
docs/ - Examples are clearly marked in
examples/ - All related files are grouped logically
- Easy to add new documentation categories
- Examples can grow without cluttering root
- Scripts can be organized by purpose if needed
- Follows Next.js and TypeScript best practices
- Aligns with common open-source project patterns
- Makes the project more approachable for contributors
- Clear where to add new documentation
- Easy to find and update related files
- Reduces root-level clutter
mkdir -p docs/{guides,architecture,development,reference}
mkdir -p examples/basic# Guides
mv VERCEL_DEPLOY.md docs/guides/deployment.md
mv jitsi.md docs/guides/jitsi-integration.md
mv MOBILE_OPTIMIZATION_PLAN.md docs/guides/mobile-optimization.md
# Architecture
mv design.md docs/architecture/design.md
mv SPEC_COMPLIANCE_REPORT.md docs/architecture/spec-compliance.md
mv ARKIV_OPERATIONS.md docs/architecture/arkiv-operations.md
# Development
mv runbook.md docs/development/runbook.md
mv RATE_LIMIT_INFO.md docs/development/rate-limits.md
mv VERCEL_TROUBLESHOOTING.md docs/development/troubleshooting.md
# Optionally merge DEPLOYMENT_FIX.md into troubleshooting.md
# Reference
mv DUMMY_DATA.md docs/reference/dummy-data.mdmv createProfile.ts examples/basic/create-profile.ts
mv read_example.ts examples/basic/read-entity.ts
mv write_example.ts examples/basic/write-entity.ts- Update
README.md:- Line 4:
./docs/runbook.md→./docs/development/runbook.md - Line 129:
VERCEL_TROUBLESHOOTING.md→docs/development/troubleshooting.md
- Line 4:
- Update
package.jsonscripts (if renaming):scripts/seedDummyData.ts→scripts/seed-dummy-data.ts
- Update any internal documentation links
- Update
.gitignoreif needed (PROGRESS.md location)
docs/README.md- Documentation index with navigationexamples/README.md- Examples index with descriptions
- Create
.env.exampletemplate - Add
CHANGELOG.mdif desired - Review and potentially remove outdated example scripts
- All imports still work
- Documentation links are updated
- No broken references
- Scripts in
package.jsonstill work - Test that documentation is accessible
- tutorial-source-code/: Already in
.gitignore, can stay as reference - Example scripts: Review if they're still needed or if they're superseded by actual implementation
- Documentation: Some files might be merged (e.g., deployment troubleshooting)
- Naming: Use kebab-case for files, camelCase for TypeScript modules
-
README.md already references
./docs/runbook.md(line 4), but file is at root- This suggests the move was planned but not completed
- Moving to
docs/development/runbook.mdwill fix this
-
README.md references
VERCEL_TROUBLESHOOTING.md(line 129)- Update to
docs/development/troubleshooting.md
- Update to
-
package.json scripts reference:
scripts/seedDummyData.ts→ Update toscripts/seed-dummy-data.tsif renamingscripts/seedSimple.ts→ Already correct
-
Internal documentation links may need updating after moves
-
Example scripts (
createProfile.ts,read_example.ts,write_example.ts):- Check if they're still useful for learning
- May be superseded by actual implementation in
src/arkiv/ - Consider if they should be kept as learning examples or removed
-
PROGRESS.md:
- Currently in
.gitignore - Development tracking file
- Consider: Keep in
docs/development/or remove if no longer needed
- Currently in
-
DEPLOYMENT_FIX.md:
- One-time fix documentation
- Consider merging into
docs/development/troubleshooting.md
- Are the example scripts (
createProfile.ts, etc.) still useful, or are they superseded by the actual implementation? - Should
MOBILE_OPTIMIZATION_PLAN.mdbe kept as a detailed plan, or condensed into the main docs? - Do we want to keep
PROGRESS.mdor is it just for development tracking? - Should we create a
CHANGELOG.mdfor version tracking? - Should we rename scripts to kebab-case (requires updating
package.json)? - Do we want to create an
.env.examplefile as a template?