BYTE ON
Software Company
TKAMOL · Documentation
BYTE ONSOFTWARE COMPANY
TKAMOL · Legal Operations SaaS · Documentation
Part I · SRS

Chapter 1 - Master Software Requirements Specification

1. Document Control

FieldValue
Document titleSoftware Requirements Specification — TKAMOL
System nameTKAMOL Legal Operations SaaS
Document identifierPart I - Software Requirements Specification, Chapter 1 (Master Software Requirements Specification)
Version1.0 (draft derived from source code)
Preparation dateOct 2026
StatusDraft — Pending Stakeholder Validation
Intended audienceProduct owner, technical manager, senior developers, QA engineers, external vendor companies
Primary sourceRepository C:\laragon\www\ts-app inspected Oct 2026 (routes, controllers, models, migrations, services, frontend pages)
Supporting filesPart I - Software Requirements Specification, Chapter 2 (Functional Requirements Register), Part I, Chapter 3 - Non-Functional Requirements Register, Part I, Chapter 4 - Use Cases and Acceptance Criteria, Part I, Chapter 5 - Requirements Traceability

Revision history

RevDateDescription
0.1Oct 2026Initial structuring from inspected code
1.0Oct 2026Consolidated SRS pending stakeholder validation

No sign-off records, author names, or approvals have been invented. Stakeholder approval is explicitly not granted by this document.

2. Executive Summary

TKAMOL is an enterprise-grade, multi-workspace (multi-tenant) legal-operations platform for law firms and professional services teams. It is built on Laravel 12 with a React 19 SPA delivered via Inertia.js. The platform unifies project/case management, task tracking (Kanban boards), time tracking and timesheet approvals, expense management and budgeting, invoice generation and collection via 30+ payment gateways, client/company/contact management, legal-bug tracking, IMAP-based email inbox with AI-driven triage and assignment, AI assistant (Gemini) chat, WhatsApp/Slack/Telegram notifications, Zoom meetings, and SaaS billing (plans, plan orders, coupons, referrals). Frontend is supported in 16 enabled locales (actual configuration — see §7) with full RTL.

3. Business Context and Objectives

  1. Non-SaaS mode removes plan-gating, billing, companies admin, and coupons — config('app.is_saas') (config/app.php).
  2. Demo mode blocks state-changing HTTP verbs via DemoModeMiddleware — config('app.is_demo').
  3. All role permissions are hardcoded in PermissionSeeder and RoleSeeder; 286 permissions across 31 modules.

4. Scope

Confirmed in-scope (implemented & wired in routes + pages + models)

Authentication and registration, multi-workspace tenancy, users/roles/permissions, projects with milestones/notes/attachments, tasks with Kanban stages/comments/checklists/attachments/templates, bugs with statuses/comments/attachments, timesheets/entries/timer/approvals/reports, budgets/revisions/categories, expenses/approvals/dashboards/workflows/receipts/recurring, invoices/items/payments/public checkout through 33 gateways, contacts/companies/newsletters, email templates/notification templates, email inbox (IMAP + rules + AI), AI agent chat (Gemini), WhatsApp/Slack/Telegram/Zoom integrations, dashboards and reports, multi-language/RTL, media library, performance evaluations, landing page / custom pages.

Potential / proposed (only referenced but not wired)

Out of scope

No explicit signed statement of scope was found in the repository. A BUSINESS.md (31 KB) file exists and should be treated as the authoritive business proposal. (Its contents were not quoted in this draft; cross-read recommended.)

5. Stakeholders and User Classes

Source: database/seeders/RoleSeeder.php and PermissionSeeder.php (286 permissions).

RoleDescription / access boundary
super adminSaaS operator. Sees all companies/workspaces, all permissions. Only created when isSaasMode().
companyTenant owner (law firm). Manages users/workspaces/projects/settings/billing.
ownerAlternate label "Owner with read-only access" but receives same grant set as company (RoleSeeder). (Ambiguity — stakeholder confirmation needed: "owner" currently gets full company permissions.)
managerFirm manager: scoped subset (dashboard, projects, tasks, bugs, timesheets, budget, expenses, invoice, media, report).
memberStaff lawyer/worker: explicit allow-list including work hours timer.
clientExternal client view rights (projects, invoices, bug views).

Access enforcement is roles-based (Spatie in SaaS mode, in non-SaaS mode uses the workspace_members.role column without Spatie — see System doc §4). End users can only access their current workspace (users.current_workspace_id).

6. Functional Requirements

Full canonical list: Part I - Software Requirements Specification, Chapter 2 (Functional Requirements Register). Summary modules:

Total: 214 functional requirements, each labelled Implemented & Verified / Partially Implemented / Present but Unverified / Not Found / Stakeholder Confirmation Required.

7. Non-Functional Requirements

Full canonical list: Part I - Software Requirements Specification, Chapter 3 (Non-Functional Requirements Register). Key points:

8. Business Rules

IDRuleEvidenceType
BR-001A user may only operate on the current workspace (users.current_workspace_id).HandleInertiaRequests; User scopes.Verified implementation.
BR-002Demo mode blocks all non-GET requests (and some POSTs).DemoModeMiddleware; config IS_DEMO.Verified.
BR-003Plan limits restrict workspaces/users/clients/managers/projects/file uploads in SaaS mode; superadmin bypasses.PlanLimitService::short-circuit for non-SaaS.Verified.
BR-004Expired/missing plan redirects user to plans.index with plan reset.CheckPlanAccess.Verified.
BR-005Suspended workspace blocks state changes for member/client, allows owner/superadmin GET-only.CheckWorkspaceSuspension.Verified.
BR-006Task stage change emits events and drives task_events (assigned/submitted/returned/approved) based on stage name.TaskObserver (stage name substring matching).Verified — name-matching is fragile.
BR-007Multi-assignee is stored via task_members but Task model $fillable omits allow_multi_assign → cannot be set through mass-assignment.app/Models/Task.php.Inconsistency (gap).
BR-008Plan column added ai_monthly_price_limit renamed; Setting/Plan fillable lists ai_monthly_token_limit instead.migrations 2026-03-04 + Plan.php.Inconsistency (gap).
BR-009Currency/role invoices require manual gateway credentials from UI; only bank and manually are enabled by default.PaymentSettingController defaults.Verified.
BR-010New workspace gets default task stages + bug statuses automatically.WorkspaceObserver::created.Verified.
BR-011AI assignment uses Gemini; falls back to rule-based automation when key absent/token exceeded/AI returns false.EmailAIAssignmentService + EmailAutomationService.Verified.
BR-012Email account password is encrypted at rest by accessor/mutator.EmailAccount mutators.Verified (plaintext fallback in default config is separate).
BR-013Inbound email domain filtering follows filter_type (none/whitelist/blocklist) on account + allowed_email_senders on workspace; wildcards supported.EmailListenerService::processSingleMessage.Verified.
BR-014New project auto-creation only when AUTO settings enabled at account level.EmailAutomationService::processNewMessage.Verified.
BR-015Cost limit on AI agent = ai_monthly_price_limit precedence workspace → plan → global.AiAgentService::getPriceLimitForWorkspace.Verified.
BR-016Rate limit 30 AI chat messages/hr per user (cache key).AiAgentService::chat first guard.Verified.
BR-017Communication messages (task chat) are manager-gated (manager_approved).Communications migration.Verified.
BR-018User is not creatable with a default plan outside SaaS.UserObserver only when isSaasMode; SulkanCompanySeeder sets no password.Verified.

9. Use Cases

Full text: Part I - Software Requirements Specification, Chapter 4 (Use Cases and Acceptance Criteria). Core ones: UC-REG (register/verify), UC-WS-SWITCH, UC-PROJECT-CREATE, UC-TASK-BOARD, UC-TIMESHEET-APPROVE, UC-EXPENSE-APPROVAL, UC-INVOICE-CHECKOUT, UC-EMAIL-INGEST-AI, UC-AI-CHAT, UC-EVAL-FIRM.

10. Data Requirements

11. External Interfaces

SystemModeWhere configuredStatus
Google Gemini (model default gemini-3-pro-preview)Outbound AISetting.geminiKey/geminiModel, AiAgentService/EmailAIAssignmentService.Implemented & verified.
OpenAIOutbound (ChatGptController demo)config/openai.php, OPENAI_API_KEY.Implemented.
IMAP/GmailInbound email sync + pushconfig/imap.php, EmailAccount.Implemented.
WhatsAppOutbound per-numberWhatsAppController, driver ultramsg/twilio.Implemented.
SlackOutbound webhookSlackService, settings.Implemented.
TelegramOutbound webhookTelegramSettingsController.Implemented.
ZoomREST + meetingsZoomService, project/team members.Implemented (OAuth data model strongly indicates it; full scope unverified).
Payment gateways (Stripe, PayPal, … 33)Outbound + inbound callbackInvoicePaymentController + *PaymentController.Implemented; many stubs not individually verified.
Storage S3/Diskobject storageconfig/filesystems.php, DynamicStorageService.Config present; usage verified for media.
Google Calendar syncZoom optionZoomMeeting sync_google_calendar.Claimed in model fillable, no column observed in migration (potential backlog).

12. Constraints, Assumptions, Dependencies

13. Acceptance Criteria

See Part I - Software Requirements Specification, Chapter 4 (Use Cases and Acceptance Criteria). Criteria follow Given/When/Then and are required to be validated by QA; no acceptance claim is made here.

14. Requirements Traceability

See Part I - Software Requirements Specification, Chapter 5 (Requirements Traceability). Includes IDs, module/delivery, source, implementation status.

15. Open Questions and Stakeholder Decisions (must be resolved before SRS becomes contractual)

  1. Scope authority: which is the signed spec — the BUSINESS.md (31 KB) file, or stakeholder verbal requirements?
  2. Roles: is owner read-only or full-access (seed shows full company grants)? (database/seeders/RoleSeeder.php).
  3. Languages: README claims 22 languages; app config enables 16. Which is required?
  4. Tests: no test suite at all. Minimum coverage threshold to be agreed. (Phase 6 NFR-gating.)
  5. Data retention: retention policy & legal records requirements unspecified; required due to multi-tenant legal data.
  6. AI cost basis & pricing: AI charges in USD per token; max token limit configuration ai_monthly_price_limit vs ai_monthly_token_limit mismatch.
  7. Payment/finance gateway enable flags: only web-push/channel list of 33 gateways. Which should be supported out-of-the-box in UAT?
  8. Vocabulary "case" vs "project": domain model calls them projects, UI likely says projects; confirm whether a legal case entity separate from project is needed.
  9. Currency accuracy in consultant's monthly reports / invoice currency.
  10. Production deployment baseline (managed hosting, no CF/infra declared). See Technical doc.
  11. AI model privacy / confidentiality: inbound email body is sent to Gemini — data-sharing acceptance needed by the law firm clients.
  12. Cross-user data isolation audit under SOC-equivalent policies — see Security Review.
← Cover & Contents Functional Requirements Register →