How redspaxz/captable works
STOCKBASE-X is a PHP MVC application for multi-company OHADA share-capital management. A user request enters through the web front controller and routes to a domain controller; the controller validates and scopes the operation, domain services apply share-register and ownership rules, and the application returns a view or updates persisted state. The graph preserves the documented governance, compliance, documents, portal, and tenant-management branches. Relationships are limited to those shown in excerpts, the source index, or the README; unsampled implementations are represented by their exact tree paths.
Main entry points: Router.php Route dispatch · OwnershipService.php Ownership ledger · Database.php SQL database · ShareService.php Share operations
Components 23
Web and identity
- Web entry
public/index.php - Route dispatch
app/Core/Router.php - Authentication
app/Modules/Security/AuthController.php
Capital operations
- Shareholders
app/Modules/Shareholders/ShareholderController.php - Share operations
app/Modules/Shares/ShareService.php - Issuance and transfer
app/Modules/Shares/TransferController.php - Ownership ledger
app/Modules/CapTable/OwnershipService.php - Cap table views
app/Modules/CapTable/CapTableController.php - Options and vesting
app/Modules/Options/OptionService.php - Convertible modeling
app/Modules/CapTable/ConvertibleService.php - Liquidation waterfall
app/Modules/CapTable/WaterfallController.php
Governance and compliance
- Voting and meetings
app/Modules/CapTable/VotingService.php - Compliance checks
app/Modules/Compliance/ComplianceService.php - Compliance workflows
app/Modules/Compliance/ComplianceController.php - Corporate documents
app/Modules/Documents/DocumentController.php
Company workspace
- Capital dashboard
app/Modules/Dashboard/DashboardController.php - Stakeholder portal
app/Modules/Portals/PortalController.php - Company management
app/Modules/Tenants/TenantController.php - Company settings
app/Modules/Settings/SettingsController.php
Shared infrastructure
- SQL database
app/Core/Database.php - Tenant context
app/Core/Tenancy.php - Server-rendered views
app/Core/View.php
Other components
- Company user
Connections 32
- Company user → Web entry: sends request
- Web entry → Route dispatch: dispatches
- Route dispatch → Authentication: routes to
- Route dispatch → Issuance and transfer: routes to
- Route dispatch → Cap table views: routes to
- Route dispatch → Compliance workflows: routes to
- Route dispatch → Corporate documents: routes to
- Route dispatch → Stakeholder portal: routes to
- Route dispatch → Company management: routes to
- Authentication → SQL database: reads users
- Authentication → Tenant context: sets tenant
app/Modules/Security/AuthController.php - Issuance and transfer → Share operations: records movements
app/Modules/Shares/TransferController.php - Issuance and transfer → Compliance checks: checks restrictions
app/Modules/Shares/TransferController.php - Share operations → Ownership ledger: updates holdings
app/Modules/Shares/ShareService.php - Share operations → SQL database: writes register
app/Modules/Shares/ShareService.php - Ownership ledger → SQL database: reads projection
app/Modules/CapTable/OwnershipService.php - Cap table views → Ownership ledger: calculates ownership
app/Modules/CapTable/CapTableController.php - Options and vesting → Share operations: issues shares
app/Modules/Options/OptionService.php - Convertible modeling → Ownership ledger: models dilution
app/Modules/CapTable/ConvertibleController.php - Compliance workflows → Compliance checks: runs checks
app/Modules/Compliance/ComplianceController.php - Compliance checks → Ownership ledger: uses holdings
app/Modules/Compliance/ComplianceService.php - Compliance workflows → Voting and meetings: requests voting rules
app/Modules/Compliance/ComplianceController.php - Corporate documents → Ownership ledger: checks holdings
app/Modules/Documents/DocumentController.php - Corporate documents → Share operations: issues certificates
app/Modules/Documents/DocumentController.php - Capital dashboard → Ownership ledger: summarizes ownership
app/Modules/Dashboard/DashboardController.php - Stakeholder portal → Ownership ledger: shows holdings
app/Modules/Portals/PortalController.php - Stakeholder portal → Options and vesting: shows vesting
app/Modules/Portals/PortalController.php - Company management → SQL database: creates company
app/Modules/Tenants/TenantController.php - Company management → Tenant context: switches company
app/Modules/Tenants/TenantController.php - Cap table views → SQL database: reads cap data
app/Modules/CapTable/CapTableController.php - Company settings → SQL database: stores settings
app/Modules/Settings/SettingsController.php - Web entry → Server-rendered views: renders responses