# MetaBuilder Documentation Index Welcome to the MetaBuilder documentation. This is your central hub for all project information, organized by category for easy navigation. **๏ฟฝ๏ธ [MASTER NAVIGATION](./NAVIGATION.md)** - Complete guide to all documentation **๏ฟฝ๐Ÿ“‹ [View Documentation Organization](./ORGANIZATION.md)** - Understand the doc structure and guidelines ## ๐Ÿ“š Quick Navigation ### ๐Ÿš€ [Getting Started](./getting-started/) Start here if you're new to the project: - **[README](./README.md)** - Project overview - **[PRD.md](./getting-started/PRD.md)** - Product requirements & features - **[QUICK_START.md](./getting-started/QUICK_START.md)** - Set up your development environment ### ๐Ÿ—๏ธ [Architecture](./architecture/) Understand the system design: - **[5-Level System](./architecture/5-level-system.md)** - Core architecture layers - **[Data-Driven Architecture](./architecture/data-driven-architecture.md)** - Declarative design patterns - **[Database Design](./architecture/database.md)** - Database schema and structure - **[Packages System](./architecture/packages.md)** - Package-based components - **[Generic Components](./architecture/generic-page-system.md)** - Rendering architecture - **[CSS as an Abstract System](./architecture/css-as-abstract-system.md)** - Styling as data and GUI mapping ### ๐Ÿงช [Testing](./testing/) Everything about testing the application: - **[Testing Guidelines](./testing/TESTING_GUIDELINES.md)** - Best practices and standards - **[Unit Tests](./testing/UNIT_TESTS_IMPLEMENTATION.md)** - Test implementation guide - **[Quick Reference](./testing/quick-reference.md)** - Common testing patterns ### ๐Ÿ”’ [Security](./security/) Security documentation and standards: - **[Security Guide](./security/SECURITY.md)** - Security best practices - **[Secure Database Layer](./security/SECURE_DATABASE_LAYER.md)** - Database security - **[Database Security](./security/secure-db-implementation.md)** - Implementation details ### ๐Ÿ”ง [API Reference](./api/) API documentation and integration guides: - **[Platform Guide](./api/platform-guide.md)** - Complete API reference - **[Quick Reference](./api/quick-reference.md)** - Common API patterns - **[DBAL Integration](./api/DBAL_INTEGRATION.md)** - Database abstraction layer - **[Packages API](./api/packages.md)** - Package installation and seed data endpoints ### ๐Ÿ“‹ [Implementation Guides](./implementation/) Detailed implementation documentation: - **[Component Map](./implementation/COMPONENT_MAP.md)** - Component structure - **[Multi-Tenant System](./implementation/MULTI_TENANT_SYSTEM.md)** - Multi-tenancy guide - **[Prisma Implementation](./implementation/PRISMA_IMPLEMENTATION_COMPLETE.md)** - ORM setup - **[TypeScript Enhancements](./implementation/TYPESCRIPT_DBAL_ENHANCEMENTS.md)** - Type system improvements - **[Nerd Mode IDE](./implementation/NERD_MODE_IDE.md)** - Package templates and zip exports - **[Permission Levels](./permissions-levels.md)** - Five-tier security and UI guide - **[Codegen Studio Export](./codegen-studio.md)** - Zip generation service for package starters ### ๐Ÿ”„ [Refactoring](./refactoring/) Refactoring guides and tracking: - **[Refactoring Strategy](./refactoring/REFACTORING_STRATEGY.md)** - Overall strategy - **[Quick Reference](./refactoring/REFACTORING_QUICK_REFERENCE.md)** - Common patterns - **[Enforcement Guide](./refactoring/REFACTORING_ENFORCEMENT_GUIDE.md)** - Standards - **[Checklist](./refactoring/REFACTORING_CHECKLIST.md)** - Implementation checklist ### ๐Ÿšจ [Troubleshooting](./troubleshooting/) Solutions to common issues: - Check for known issues and solutions - Database setup problems - Build and deployment issues ### ๐Ÿ“š [Reference Documentation](./reference/) Additional references: - **[Documentation Index](./reference/documentation-index.md)** - Detailed doc structure - Architecture and design patterns - Lua scripting guide - Database migration guides --- ## ๐ŸŽฏ Common Tasks ### I want to... **...get started with development** โ†’ Go to [Getting Started](./getting-started/README.md) **...understand the architecture** โ†’ Read [5-Level System](./architecture/5-level-system.md) **...write tests** โ†’ Check [Testing Guidelines](./testing/TESTING_GUIDELINES.md) **...secure my code** โ†’ Review [Security Guide](./security/SECURITY.md) **...refactor code** โ†’ See [Refactoring Strategy](./refactoring/REFACTORING_STRATEGY.md) **...integrate with the database** โ†’ Learn about [DBAL Integration](./api/DBAL_INTEGRATION.md) **...create a new package** โ†’ Follow [Packages System](./architecture/packages.md) --- ## ๐Ÿ“‚ Documentation Structure ``` docs/ โ”œโ”€โ”€ README.md # Project overview โ”œโ”€โ”€ INDEX.md # This file - documentation map โ”‚ โ”œโ”€โ”€ getting-started/ # For new developers โ”‚ โ”œโ”€โ”€ PRD.md โ”‚ โ””โ”€โ”€ QUICK_START.md โ”‚ โ”œโ”€โ”€ architecture/ # System design โ”‚ โ”œโ”€โ”€ 5-level-system.md โ”‚ โ”œโ”€โ”€ data-driven-architecture.md โ”‚ โ”œโ”€โ”€ database.md โ”‚ โ”œโ”€โ”€ packages.md โ”‚ โ”œโ”€โ”€ generic-page-system.md โ”‚ โ””โ”€โ”€ css-as-abstract-system.md โ”‚ โ”œโ”€โ”€ testing/ # Test documentation โ”‚ โ”œโ”€โ”€ TESTING_GUIDELINES.md โ”‚ โ”œโ”€โ”€ UNIT_TESTS_IMPLEMENTATION.md โ”‚ โ””โ”€โ”€ quick-reference.md โ”‚ โ”œโ”€โ”€ security/ # Security docs โ”‚ โ”œโ”€โ”€ SECURITY.md โ”‚ โ””โ”€โ”€ SECURE_DATABASE_LAYER.md โ”‚ โ”œโ”€โ”€ api/ # API documentation โ”‚ โ”œโ”€โ”€ platform-guide.md โ”‚ โ”œโ”€โ”€ quick-reference.md โ”‚ โ””โ”€โ”€ DBAL_INTEGRATION.md โ”‚ โ”œโ”€โ”€ implementation/ # Detailed guides โ”‚ โ”œโ”€โ”€ COMPONENT_MAP.md โ”‚ โ”œโ”€โ”€ MULTI_TENANT_SYSTEM.md โ”‚ โ”œโ”€โ”€ PRISMA_IMPLEMENTATION_COMPLETE.md โ”‚ โ””โ”€โ”€ TYPESCRIPT_DBAL_ENHANCEMENTS.md โ”‚ โ”œโ”€โ”€ refactoring/ # Refactoring guides โ”‚ โ”œโ”€โ”€ REFACTORING_STRATEGY.md โ”‚ โ”œโ”€โ”€ REFACTORING_QUICK_REFERENCE.md โ”‚ โ”œโ”€โ”€ REFACTORING_ENFORCEMENT_GUIDE.md โ”‚ โ””โ”€โ”€ REFACTORING_CHECKLIST.md โ”‚ โ”œโ”€โ”€ development/ # Development guides โ”‚ โ””โ”€โ”€ typescript-reduction-guide.md โ”‚ โ”œโ”€โ”€ troubleshooting/ # Troubleshooting โ”‚ โ””โ”€โ”€ (Known issues and solutions) โ”‚ โ””โ”€โ”€ reference/ # Additional references โ”œโ”€โ”€ documentation-index.md โ””โ”€โ”€ (Other reference materials) ``` --- ## ๐Ÿ† Key Concepts ### Five-Level Architecture MetaBuilder uses a sophisticated 5-level architecture: 1. **Level 0**: Global system configuration 2. **Level 1**: Tenant-specific features 3. **Level 2**: Module and package definitions 4. **Level 3**: Entity and form configurations 5. **Level 4**: Individual records and data โ†’ Learn more: [5-Level System](./architecture/5-level-system.md) ### Data-Driven Design 95% of functionality is defined through JSON and Lua, not TypeScript. โ†’ Learn more: [Data-Driven Architecture](./architecture/data-driven-architecture.md) ### Package System Components are organized as self-contained packages with seeds, scripts, and assets. โ†’ Learn more: [Packages System](./architecture/packages.md) ### Multi-Tenancy Each tenant has isolated configurations, data, and customizations. โ†’ Learn more: [Multi-Tenant System](./implementation/MULTI_TENANT_SYSTEM.md) --- ## ๐Ÿ“ž Support If you can't find what you're looking for: 1. Use the search feature in your editor (Ctrl+F) 2. Check the [Reference Documentation](./reference/) 3. Look at existing code examples 4. Review the [Troubleshooting](./troubleshooting/) section --- **Last Updated**: December 2025 ### [Migrations](migrations/) Data migrations, code refactoring, and relocation guides. - **[MIGRATION_STATUS.md](migrations/MIGRATION_STATUS.md)** - Migration progress tracking - **[FILE_RELOCATION_GUIDE.md](migrations/FILE_RELOCATION_GUIDE.md)** - File organization - **[RELOCATION_SUMMARY.md](migrations/RELOCATION_SUMMARY.md)** - Relocation completion status ### [Troubleshooting](troubleshooting/) Diagnostics, debugging guides, and common issues. - **[WORKFLOW_FAILURE_DIAGNOSIS.md](troubleshooting/WORKFLOW_FAILURE_DIAGNOSIS.md)** - CI/CD debugging - **[CORS-BYPASS-EXPLANATION.md](troubleshooting/CORS-BYPASS-EXPLANATION.md)** - CORS issues - **[TEST_COVERAGE_SUMMARY.md](troubleshooting/TEST_COVERAGE_SUMMARY.md)** - Test coverage info - **[PACKAGE_TESTS.md](troubleshooting/PACKAGE_TESTS.md)** - Package testing guide ### [Archive](archive/) Completed phases and historical work. - **[PHASE2_SUMMARY.md](archive/PHASE2_SUMMARY.md)** - Phase 2 completion summary ## Code-to-Documentation Mapping ### [Source Code (src/)](src/) Documentation for TypeScript/React source code - **[components/](src/components/)** - React components (atoms, molecules, organisms) - **[lib/](src/lib/)** - Core library modules (auth, database, lua, packages) - **[hooks/](src/hooks/)** - React custom hooks - **[seed-data/](src/seed-data/)** - Database seed data - **[types/](src/types/)** - TypeScript type definitions - **[styles/](src/styles/)** - Styling system and Tailwind configuration - **[tests/](src/tests/)** - Unit and integration tests ### [DBAL (Data Abstraction Layer)](dbal/) Documentation for C++ and TypeScript database layer - **[api/](dbal/api/)** - API schemas and versioning - **[backends/](dbal/backends/)** - Database backend implementations (Prisma, SQLite) - **[common/](dbal/common/)** - Shared DBAL utilities - **[cpp/](dbal/cpp/)** - C++ implementation - **[ts/](dbal/ts/)** - TypeScript implementation - **[tools/](dbal/tools/)** - Development tools - **[scripts/](dbal/scripts/)** - Automation scripts ### [Packages](packages/) Documentation for feature packages - **[admin_dialog.md](packages/admin_dialog.md)** - Admin dialog components - **[dashboard.md](packages/dashboard.md)** - Dashboard components - **[data_table.md](packages/data_table.md)** - Data table component - **[form_builder.md](packages/form_builder.md)** - Form builder system - **[nav_menu.md](packages/nav_menu.md)** - Navigation menu components - **[notification_center.md](packages/notification_center.md)** - Notification system - **[spark-tools.md](packages/spark-tools.md)** - Development tools package ## Additional Topics ### Architecture Fundamental architecture and design patterns. - **[architecture/](architecture/)** - Core architecture documents ### Database Database-specific documentation. - **[database/](database/)** - Database design and setup ### Development Development workflow and best practices. - **[development/](development/)** - Development guides ### Lua Scripting Lua integration and scripting. - **[lua/](lua/)** - Lua documentation and examples ### Reference Quick lookup and API reference. - **[reference/](reference/)** - Technical references ### Security Security policies and guidelines. - **[security/](security/)** - Security documentation ## Navigation Tips 1. **New to MetaBuilder?** Start with [README.md](README.md) and [ATOMIC_QUICKSTART.md](guides/ATOMIC_QUICKSTART.md) 2. **Building a feature?** Check [IMPLEMENTATION_ROADMAP.md](guides/IMPLEMENTATION_ROADMAP.md) and the [implementation/](implementation/) folder 3. **Setting up locally?** See [SASS_QUICK_REFERENCE.md](guides/SASS_QUICK_REFERENCE.md) and [guides/](guides/) 4. **Deploying to production?** Review [NGINX_INTEGRATION.md](deployments/NGINX_INTEGRATION.md) and [deployments/](deployments/) 5. **Debugging issues?** Check [troubleshooting/](troubleshooting/) first 6. **Running CI/CD locally?** See [github-actions-local-testing.md](guides/github-actions-local-testing.md)