1. System Map#
StudentHub is a multi-application platform centered on a single PHP/Yii2 backend and four Ionic frontends, each serving a distinct user role. The backend manages all core domain models (such as candidates, companies, assignments, timesheets, and transfers), enforces business rules for trainee programs, exposes REST-style HTTP APIs, runs background/cron jobs, and maintains environment-specific configurations under the environments/ directory. The backend is deployed and managed using Docker, with multiple docker-compose configurations for different environments (development, production, etc.) reference.
The four main frontends are:
studenthub-candidate: Trainee/candidate appstudenthub-company: Company/employer appstudenthub-staff: Staff operations appstudenthub-admin: Admin/finance/reporting app
Each frontend communicates with the backend exclusively over HTTP using JSON APIs. Every app is responsible for its own user experience and local storage, but all share the same core domain and business rules reference.
The platform supports three major flows: program setup and onboarding (staff/admin create programs, onboard candidates, and connect them to companies), work and time tracking (candidates log hours, companies verify, staff/admin review), and payment and compliance (monthly transfer requests, approvals, payments, receipts, and optional inspections/compliance) reference.
2. Component Diagram#
Additional Details#
- The backend exposes separate API endpoints for each role (admin, candidate, company, staff, inspector, verification), each typically served on a distinct port or subdomain in development and production reference.
- Background jobs and cron tasks are managed via Yii console commands and scheduled for tasks such as updating statistics, sending notifications, and running daily checks reference.
- Environment-specific configuration is handled under the
environments/directory, with separate writable directories and cookie validation keys for each frontend app and environment reference. - The backend supports optional integrations with external services such as search engines (e.g., Algolia or Meilisearch), cache/queue systems (e.g., Redis), and notification providers (email/SMS) reference.
- User roles and permissions are clearly defined and mapped to the frontend apps, with additional roles such as Inspector and Manager supported by the backend reference.
Areas for Further Clarification or Expansion#
- The diagram and overview focus on core flows and infrastructure but do not detail security (authentication, authorization), error handling, monitoring/logging, or deployment specifics. These could be addressed in future documentation.
- Optional/pluggable services are shown as generic; documentation should specify which integrations are supported in production (e.g., Algolia for search, Xero for payments).
- Inspector and Verification roles are present in the backend and API endpoints but not shown in the main frontend list; clarify if these have dedicated apps or are managed through the admin/staff apps.
For more details, see the StudentHub backend README, setup guide, API endpoints, user roles, and cron jobs.