4.5 KiB
4.5 KiB
Project Mycelium Documentation
Quick Links
🚨 Emergency Troubleshooting
- JSON Parsing Errors - Quick fixes for common data issues
📚 Development Guides
- Data Validation Guide - Comprehensive validation tools and processes
🏗️ Design Documentation
- User Dashboard - User dashboard architecture and design
- Farmer Dashboard - Farmer dashboard specifications
- Marketplace Architecture - Overall system architecture
🚀 Operations
- Deployment Guide - Production deployment procedures
Common Tasks
Fix JSON Parsing Errors
cd projectmycelium
python3 scripts/fix_user_data.py
cargo run
Validate User Data
# Quick validation and fixes with Python
python3 scripts/fix_user_data.py
# Manual validation using Rust tools
# (See data validation guide for detailed usage)
Schema Updates
- Update Rust structs in
src/models/user.rs
- Update validation tools if needed
- Run
python3 scripts/fix_user_data.py
to migrate existing data - Test with
cargo run
Tools Overview
Tool | Location | Purpose | When to Use |
---|---|---|---|
fix_user_data.py |
scripts/ |
Quick automated fixes | JSON parsing errors, routine maintenance |
data_validator.rs |
src/utils/ |
Detailed validation | Development, complex schema analysis |
Troubleshooting guide | dev/guides/ |
Emergency reference | When application won't start |
Data validation guide | dev/guides/ |
Comprehensive reference | Understanding validation process |
Documentation Structure
projectmycelium/docs/
├── README.md # This file - main documentation index
├── dev/ # Development documentation
│ ├── guides/ # How-to guides and procedures
│ │ ├── data-validation-guide.md # Data validation tools and processes
│ │ └── troubleshooting-json-errors.md # Quick JSON error fixes
│ └── design/ # Architecture and design docs
│ ├── USER_DASHBOARD.md # User dashboard design
│ ├── FARMER_DASHBOARD.md # Farmer dashboard design
│ └── MARKETPLACE_ARCHITECTURE.md # System architecture
└── ops/ # Operations documentation
└── deployment.md # Deployment procedures
Related Files
projectmycelium/
├── docs/ # This documentation
├── scripts/
│ └── fix_user_data.py # Python validation script
├── src/utils/
│ ├── data_validator.rs # Rust validation utility
│ └── mod.rs # Utils module integration
├── user_data/ # User JSON files
└── src/models/user.rs # Schema definitions
Getting Started
For Immediate Issues
- JSON parsing errors: Start with troubleshooting-json-errors.md
- Run the fix script:
python3 scripts/fix_user_data.py
For Development
- Understanding data validation: Read data-validation-guide.md
- Dashboard development: Check design docs in
dev/design/
- System architecture: See MARKETPLACE_ARCHITECTURE.md
For Operations
- Deployment: Follow deployment.md
- Maintenance: Use validation tools regularly
Contributing
When adding new features that change data schemas:
- Update the relevant structs in
src/models/
- Update validation tools in
src/utils/
andscripts/
- Test with existing user data using
python3 scripts/fix_user_data.py
- Document changes in the appropriate guide
- Update this README if new documentation is added
Recent Updates
- Data Validation System: Added comprehensive validation tools to handle JSON schema mismatches
- Emergency Troubleshooting: Created quick-reference guide for common JSON parsing errors
- Validation Scripts: Python script in
scripts/
directory for automated data fixes