Part II · System Docs
Chapter 1 - System Overview
1. System Overview
- System name: TKAMOL legal-operations SaaS.
- Purpose: unified case/project, task, time, expense, budget, invoice, and client communication platform with automation.
- Core implementation framework: Laravel 12 monolith with server-rendered React (Inertia.js).
- Default application name:
TKAMOL(config/app.phpAPP_NAME). - API-less Inertia bridge: no separate API project; endpoints return Inertia data.
- Major modules observed: see
Part II - System Documentation, Chapter 2 (Functional Modules). - Notable limitations: no automated tests in repository, missing routes to controllers methods, one empty no-op migration, some stub exports.
- Impact on confirmed features: see limitations §
Part II - System Documentation, Chapter 5 (System Limitations).
2. Application Structure
- Root layout:
app-layout.tsx→app-sidebar-layout.tsx(primary). - Navigation gated by permissions via
app-sidebar.tsxNavMain + workspace switcher. - Pages loaded with
resolvePageComponent(128). /dashboardserves as the home base of user-facing UI./welcome.tsxdefault landing route for guest.- Authentication uses
AuthLayoutvariants. - Inertia middleware
HandleInertiaRequestsexposesauth,workspace,roles,permissions, global settings.
3. Verified Features Inventory (quick)
- 18 modules (see module inventory doc).
- 33 gateway payments.
- 4 messaging channels.
- Email inbox automation/AI.
- AI assistant.
4. Design Pattern Summary
- Core data flow: Request → Middleware → Controller → Service → Repository → Model → DB.
- Event/Listener for notifications and webhooks.
- Observers for workspace / user / task / plan lifecycle (4).
- Jobs beyond job queue: monthly reports.
- Spatie Media Library + Spatie Permissions.
5. Data Model (high level)
- 93 migration files, 89
Schema::createstatements + 5 Spatie; ~94 tables. - ER diagram:
Appendix A - Diagrams. - Tenancy roots:
workspacesandusers. - SRS cross-reference: Part I, Chapter 1 (Master SRS), Section 10.
6. External Integrations Summary
- IMAP, Gemini, OpenAI (typed config), WhatsApp, Slack, Telegram, Zoom, payment gateways, S3/local storage, cookie consent reporting.
- Integration status: majority implemented in code; operations unverified except during deploy.
7. Configuration
- 24 config files.
- Env keys are numerous; no
.env/.env.examplein repo (SaaS gap). - SaaS/Non-SaaS determined by
IS_SAASquery. - SaaS customers via Cpanel/AWS; Docker optional (ports 3150/5173).
8. Background Processing
- Queue: Laravel database queue, 1 job class (monthly reports).
- Schedule: sync emails every minute (twice), check task due, process monthly reports; tasks owners must ensure scheduler installed.
- Workspace agent:
ai:build-knowledge {workspaceId?} {--all}cron not scheduled (must run on demand).
9. Monitoring/Logs
- Laravel
logging.phpstack; Pail; possible multi-channel. - Errors reported to viewer based on env; Larabug config present (key placeholder).
- No APM found.
10. Security Overview
See Part III - Technical Documentation, Chapter 7 (Security Review).
11. Limitations
Part II - System Documentation, Chapter 5 (System Limitations).
12. Requirement Mapping
Map through Part I - Software Requirements Specification, Chapter 5 (Requirements Traceability).