How gyildiz21/hayem-sistemi works
Purpose and Entry Points
This is a React/Vite single-page operations platform centered on trainings, tasks, workflow automation, documents, auditability, integrations, and administrative controls. The browser bootstraps at src/main.jsx, composes application state/UI in src/App.jsx, and maps protected feature routes through src/routes/AppRoutes.jsx.
Application Shell and Access Boundary
Authentication and application-wide data are provided through React contexts, while layout and route protection separate authenticated operational views from login flows. Core paths: src/contexts/AuthContext.jsx, src/contexts/DataContext.jsx, src/components/auth/ProtectedRoute.jsx. The UI shell is src/components/layout/MainLayout.jsx; individual pages aggregate feature panels rather than embedding persistence logic.
Firebase Data and Server Boundary
Firebase is the primary backend boundary, configured client-side in src/services/firebase.js, governed by firestore.rules, and indexed via firestore.indexes.json. Firebase Cloud Functions provide trusted integration/webhook endpoints in functions/index.js, with specialized handlers for OAuth and WhatsApp at functions/oauthHandler.js and functions/whatsappWebhook.js. The deployment configuration is firebase.json.
Core Work Management Flow
Training and task records appear to be the central operational domain: training views feed task workspaces, Kanban planning, dependencies, workloads, timelines, comments, and calendars. Service-layer operations isolate these flows from React components: src/services/trainingService.js, src/services/taskService.js, and src/services/kanbanService.js. Primary user surfaces include src/pages/TrainingsPage.jsx, src/pages/TaskWorkspace.jsx, and src/pages/KanbanBoard.jsx.
Workflow, Rules, and Automation
The platform supports both predefined business workflows and configurable automation. Domain workflow definitions are React modules under src/workflows/CertificateWorkflow.jsx, src/workflows/FinanceWorkflow.jsx, and src/workflows/EBYSWorkflow.jsx. Configured workflows, intake forms, templates, permissions, and policy rules are managed through src/services/workflowBuilderService.js, src/services/automationService.js, and src/services/policyRuleService.js, surfaced at src/pages/WorkflowBuilderCenter.jsx and src/pages/AutomationCenter.jsx.
Documents, AI, and External Integrations
Documents are uploaded/queryable artifacts with classification and AI-related processing boundaries. Key services are src/services/documentService.js, src/services/classificationService.js, and src/services/ai.js; the user entry surface is src/pages/DocumentsPage.jsx. Integration features include OAuth token handling, Gmail/OneDrive imports, API keys, and WhatsApp message processing via src/services/oauthTokenService.js, src/services/gmailImportService.js, src/services/onedriveImportService.js, and src/services/whatsappWebhookService.js. External-provider callback handling is represented by src/pages/OAuthCallback.jsx.
Governance, Reliability, and Observability
Audit logging, lineage/replay, security checks, backups/restores, release rollback, SLA tracking, performance monitoring, reporting, and code-health analysis are first-class platform capabilities rather than incidental utilities. Representative boundaries are src/services/auditService.js, src/services/backupService.js, src/services/restoreService.js, src/services/slaService.js, and src/services/releaseService.js. Related control centers include src/pages/SecurityCenter.jsx, src/pages/BackupCenter.jsx, and src/pages/TraceCenter.jsx.
Runtime and Operational Shape
The frontend runs as a Vite-built React application (package.json, vite.config.js); backend functions run in the Firebase Functions runtime (functions/package.json). Firebase Authentication, Firestore, and Cloud Functions are the material infrastructure indicated by repository configuration and code. Emulator/seed/migration scripts under tests/ and seed.js support local data setup and operational maintenance.
Main entry points: MainLayout.jsx Operational shell · firebase.js Firebase client boundary · App.jsx Application composition · AppRoutes.jsx Protected feature routes
Components 20
React SPA
Vite browser application.
- Browser bootstrap
src/main.jsx - Application composition
src/App.jsx - Protected feature routes
src/routes/AppRoutes.jsx - Authentication state
src/contexts/AuthContext.jsx - Shared application data
src/contexts/DataContext.jsx - Route access guard
src/components/auth/ProtectedRoute.jsx - Operational shell
src/components/layout/MainLayout.jsx - OAuth callback
src/pages/OAuthCallback.jsx
Operations domains
- Training and task work · Training, task, and Kanban operations.
src/services/taskService.js - Work planning surfaces · Training, task workspace, and Kanban views.
src/pages/TaskWorkspace.jsx - Workflow and automation · Configurable workflows, automation, and policy rules.
src/services/workflowBuilderService.js - Workflow control centers · Workflow Builder and Automation centers.
src/pages/WorkflowBuilderCenter.jsx - Documents and AI · Document storage, classification, and AI processing.
src/services/documentService.js - Document workspace
src/pages/DocumentsPage.jsx - Governance and reliability · Audit, backup/restore, SLA, release, and trace controls.
src/services/auditService.js - Operational control centers · Security, backup, and trace views.
src/pages/TraceCenter.jsx
Trusted backend
Firebase Functions endpoints.
- Integration and webhook API · Trusted OAuth and WhatsApp handlers.
functions/index.js - External provider integrations · OAuth tokens, Gmail/OneDrive imports, and WhatsApp processing.
src/services/oauthTokenService.js
Firebase platform
- Firebase client boundary
src/services/firebase.js - Firebase services · Rules and indexes govern persisted operational data.
firestore.rules
Connections 23
- Browser bootstrap → Application composition: mounts
- Application composition → Authentication state: provides
- Application composition → Shared application data: provides
- Application composition → Protected feature routes: renders
- Protected feature routes → Route access guard: guards
- Route access guard → Authentication state: checks session
- Protected feature routes → Operational shell: wraps authenticated views
- Operational shell → Work planning surfaces: hosts
- Operational shell → Workflow control centers: hosts
- Operational shell → Document workspace: hosts
- Operational shell → Operational control centers: hosts
- Work planning surfaces → Training and task work: operates
- Workflow control centers → Workflow and automation: configures
- Document workspace → Documents and AI: manages
- Operational control centers → Governance and reliability: controls
- Training and task work → Firebase client boundary: persists through
- Workflow and automation → Firebase client boundary: persists through
- Documents and AI → Firebase client boundary: stores through
- Governance and reliability → Firebase client boundary: records through
- Firebase client boundary → Firebase services: uses
- External provider integrations → Integration and webhook API: invokes trusted endpoints
- Integration and webhook API → Firebase services: uses trusted access
- OAuth callback → External provider integrations: completes provider authorization