Source Tree Analysis
Generated: 2025-11-16
Project Root Structure
flowcode/
├── .bmad/ # BMad Method AI workflow configuration
├── .claude/ # Claude Code configuration
├── .cursor/ # Cursor IDE settings
├── .github/ # GitHub workflows and config
├── .githooks/ # Git hook scripts
├── .husky/ # Husky git hooks (npm)
├── app/ # Laravel application core ⭐ CRITICAL
├── bootstrap/ # Laravel bootstrap files
├── config/ # Laravel configuration files
├── database/ # Migrations, seeders, factories
├── docs/ # Project documentation (96+ files)
├── public/ # Web root (index.php, assets)
├── resources/ # Frontend assets & views ⭐ CRITICAL
├── routes/ # Route definitions ⭐ CRITICAL
├── storage/ # Laravel storage (logs, cache, uploads)
├── tests/ # Test suite (235 files) ⭐ CRITICAL
├── vendor/ # Composer dependencies (gitignored)
├── node_modules/ # NPM dependencies (gitignored)
├── .env # Environment config (gitignored)
├── artisan # Laravel CLI entry point
├── composer.json # PHP dependencies
├── package.json # NPM dependencies
├── vite.config.mjs # Vite build configuration
├── tailwind.config.js # Tailwind CSS configuration
├── tsconfig.json # TypeScript configuration
├── phpunit.xml # PHPUnit test configuration
└── CLAUDE.md # Claude Code instructions
Backend Structure (app/)
app/
├── Actions/ # Single-purpose action classes (20+ files)
│ ├── BuildAdminMenu.php
│ ├── BuildAppMenu.php
│ ├── CheckForSessionClashes.php
│ ├── CreateDefaultComplianceIndicators.php
│ └── SendScheduledNotifications.php
│
├── Auth/ # Authentication strategies
│ ├── AuthInterface.php
│ ├── PasswordAuth.php
│ ├── PasswordlessEmailAuth.php
│ └── SocialGoogleAuth.php
│
├── Checks/ # Health/monitoring checks
│ ├── CustomHorizonCheck.php
│ ├── CustomScheduleCheck.php
│ └── Pingable.php
│
├── Collections/ # Custom Eloquent collections
│ ├── ObjectiveCollection.php
│ └── ProjectCollection.php
│
├── Console/ # CLI commands ⭐ EXTENSIVE
│ ├── Commands/
│ │ ├── Indicators/ # 10+ indicator-specific commands
│ │ └── [100+ migration & maintenance commands]
│ └── Kernel.php # Task scheduler
│
├── Contracts/ # Interface definitions
│ └── RendererInterface.php
│
├── Data/ # Spatie Data Transfer Objects
│ └── [DTOs for API responses]
│
├── Enums/ # PHP 8 enums
│ ├── UserPermissions.php
│ └── [Status enums, type enums]
│
├── Events/ # Domain events
│ └── [Event classes]
│
├── Exceptions/ # Custom exceptions
│ └── Handler.php # Global exception handler
│
├── Exports/ # Excel/PDF exports
│ └── [Export classes]
│
├── Facades/ # Custom facades
│ └── [Service facades]
│
├── Filament/ # Admin panel (Filament 3) ⭐ CRITICAL
│ ├── Admin/ # Super-admin panel
│ │ ├── Pages/
│ │ ├── Resources/ # CRUD resources
│ │ └── Widgets/
│ ├── Creator/ # Creator panel
│ ├── Organisation/ # Org-specific panel
│ ├── Components/ # Custom Filament components
│ ├── Forms/ # Custom form fields
│ ├── Imports/ # Data import handlers
│ ├── Pages/ # Custom pages
│ ├── Resources/ # Shared resources
│ └── Widgets/ # Dashboard widgets
│
├── Gates/ # Authorization gates
│ └── [Policy gates]
│
├── Helpers/ # Global helper functions
│ └── [Utility classes]
│
├── Http/ # HTTP layer ⭐ CRITICAL
│ ├── Controllers/ # 98 controllers
│ │ ├── Admin/ # Admin controllers
│ │ ├── Api/ # API controllers
│ │ ├── Auth/ # Authentication controllers
│ │ └── [Feature controllers]
│ ├── Middleware/ # Request middleware
│ ├── Requests/ # Form request validation
│ └── Kernel.php # HTTP kernel (Laravel 10 structure)
│
├── Imports/ # Data import classes
│ └── [Excel/CSV importers]
│
├── Infolists/ # Filament infolists
│ └── [Read-only data displays]
│
├── Jobs/ # Queue jobs (26 jobs)
│ └── [Async processing]
│
├── Listeners/ # Event listeners
│ └── [Event handlers]
│
├── Models/ # Eloquent models (176 models) ⭐ CRITICAL
│ ├── Organisation.php # Root tenant entity
│ ├── User.php # User model
│ ├── Catalogue.php # Business catalogues
│ ├── Element.php # Catalogue elements
│ ├── Field.php # Element fields
│ └── [170+ domain models]
│
├── Notifications/ # Laravel notifications
│ └── [Email, Slack, In-app]
│
├── Observers/ # Model observers
│ └── [Lifecycle hooks]
│
├── Options/ # Configuration options
│ └── [Option classes]
│
├── Policies/ # Authorization policies
│ └── [Resource policies]
│
└── Providers/ # Service providers (9 providers)
├── AppServiceProvider.php
├── AuthServiceProvider.php
├── EventServiceProvider.php
├── HorizonServiceProvider.php
├── MonitoringServiceProvider.php
├── RouteServiceProvider.php
└── TelescopeServiceProvider.php
Frontend Structure (resources/)
resources/
├── assets/ # Static assets (images, icons)
│ └── [SVGs, PNGs, etc.]
│
├── css/ # Stylesheets
│ ├── filament.css # Filament customizations
│ └── [Additional CSS]
│
├── js/ # Legacy JavaScript (if any)
│
├── lang/ # Localization files
│ └── en/ # English translations
│
├── sass/ # SASS stylesheets
│ └── app.scss # Main SASS entry
│
├── static/ # Static files
│
├── ts/ # TypeScript source ⭐ CRITICAL (719 Vue components)
│ ├── app.ts # Main entry point
│ ├── boot.ts # Application bootstrap
│ ├── presets/ # PrimeVue theme presets
│ │ └── lara/ # Lara preset customization
│ │
│ ├── Components/ # Vue 3 components ⭐ 700+ files
│ │ ├── Admin/ # Admin panel components
│ │ │ ├── Common/ # Shared admin components
│ │ │ │ ├── Fields/ # Form field components
│ │ │ │ └── Icons/ # Icon components
│ │ │ ├── Division/
│ │ │ ├── Department/
│ │ │ ├── Element/ # Element management
│ │ │ │ ├── Graphics/
│ │ │ │ ├── Icon/
│ │ │ │ ├── Information/
│ │ │ │ ├── Notices/
│ │ │ │ ├── Preview/
│ │ │ │ ├── Resources/
│ │ │ │ └── TabOrder/
│ │ │ ├── Field/
│ │ │ ├── Graphic/
│ │ │ ├── Nav/ # Navigation components
│ │ │ ├── Notice/
│ │ │ ├── OrganisationRole/
│ │ │ ├── Resource/
│ │ │ ├── Role/
│ │ │ └── User/
│ │ │
│ │ ├── App/ # Main application components
│ │ │ ├── Common/ # Shared app components
│ │ │ ├── Catalogue/
│ │ │ ├── Element/
│ │ │ ├── Dashboard/
│ │ │ ├── OPTT/ # Objectives, Projects, Tasks, Targets
│ │ │ └── Session/
│ │ │
│ │ └── Common/ # Global shared components
│ │ ├── Forms/
│ │ ├── Charts/
│ │ ├── Tables/
│ │ └── Layout/
│ │
│ └── Pages/ # Inertia.js pages ⭐ ROUTING
│ ├── Admin/ # Admin pages
│ ├── App/ # Main application pages
│ ├── Auth/ # Authentication pages
│ └── Error/ # Error pages
│
└── views/ # Blade templates
├── app.blade.php # Main Inertia layout
├── filament/ # Filament view overrides
└── components/ # Blade components
Database Structure
database/
├── factories/ # Model factories for testing
│ └── [176 factory files]
│
├── migrations/ # Schema migrations (396 files) ⭐
│ ├── 2020_* # Initial schema
│ ├── 2021_* # Evolution
│ ├── 2022_* # Feature additions
│ ├── 2023_* # Refinements
│ ├── 2024_* # Recent changes
│ └── 2025_* # Latest migrations
│
└── seeders/ # Database seeders
├── DatabaseSeeder.php
└── [Feature seeders]
Test Structure
tests/
├── Browser/ # Laravel Dusk browser tests
│ └── [E2E tests]
│
├── Feature/ # Feature tests (majority)
│ ├── Api/ # API endpoint tests
│ ├── Auth/ # Authentication tests
│ ├── Filament/ # Admin panel tests
│ └── [Domain feature tests]
│
├── Unit/ # Unit tests
│ ├── Models/ # Model unit tests
│ ├── Services/ # Service unit tests
│ └── [Isolated unit tests]
│
├── Pest.php # Pest configuration
├── TestCase.php # Base test case
└── CreatesApplication.php # App bootstrap for tests
Route Structure
routes/
├── api.php # API routes (147 lines)
│ ├── Public iCal feeds
│ ├── SPA session management (auth:web)
│ └── SPA core APIs (auth:sanctum)
│
├── web.php # Web routes (604 lines) ⭐
│ ├── Frontend routes (auth required)
│ ├── Organisation routes (tenant-scoped)
│ ├── Admin routes (/app-admin)
│ └── Auth routes (login, signup, SSO)
│
├── channels.php # Broadcasting channels
│
└── console.php # Console routes (artisan)
Configuration
config/
├── app.php # Core application config
├── auth.php # Authentication config
├── broadcasting.php # Real-time broadcasting
├── cache.php # Cache configuration
├── database.php # Database connections
├── filesystems.php # File storage (S3, local)
├── horizon.php # Horizon queue config
├── logging.php # Log channels
├── mail.php # Mail configuration
├── multitenancy.php # Spatie tenant config ⭐
├── pulse.php # Laravel Pulse monitoring
├── queue.php # Queue connections
├── sanctum.php # API authentication
├── services.php # Third-party services
└── telescope.php # Telescope debugging
Key Entry Points
- Web Entry:
public/index.php→ Laravel bootstrap - CLI Entry:
artisan→ Console commands - Frontend Entry:
resources/ts/app.ts→ Vue/Inertia bootstrap - API Entry:
routes/api.php→ SPA and external APIs - Admin Entry:
app/Filament/→ Multiple admin panels
Critical Directories Summary
| Directory | Purpose | File Count | Priority |
|---|---|---|---|
app/Models/ |
Domain models | 176 | ⭐⭐⭐ |
resources/ts/Components/ |
Vue components | 719 | ⭐⭐⭐ |
app/Http/Controllers/ |
Request handlers | 98 | ⭐⭐⭐ |
database/migrations/ |
Schema evolution | 396 | ⭐⭐⭐ |
app/Filament/ |
Admin panels | Multi-panel | ⭐⭐⭐ |
routes/ |
URL definitions | 4 files | ⭐⭐⭐ |
tests/ |
Test suite | 235 | ⭐⭐ |
config/ |
Configuration | 20+ files | ⭐⭐ |
docs/ |
Documentation | 96+ files | ⭐⭐ |
app/Jobs/ |
Async processing | 26 | ⭐⭐ |