Skip to main content
The frontend uses a service-oriented architecture for API integration, authentication, and utility functions.

Services

portalService

File: services/portalService.ts Portal dashboard API integration:

Functions

fetchUpdates() Fetches portal updates from the API.
fetchGoals() Fetches project goals.
fetchToolLinks() Fetches quick-access tool links.
searchPortal() Searches portal content.
fetchStatus() Fetches portal status.
fetchLinearTasks() Fetches Linear tasks.
fetchNotionPages() Fetches Notion pages.
fetchOrgMatrix() Fetches organization matrix.
startSso() Initiates SSO authentication.

Mock Data

The service includes fallback mock data when the API is unreachable (e.g., local development).

authService

File: services/authService.ts Authentication service:
  • Login handling: Session management
  • Token storage: Secure token storage
  • GitHub OAuth: OAuth flow integration
  • Steganographic auth: Image-based authentication

pdfGenerator

File: services/pdfGenerator.ts PDF generation service:
  • Document generation: Create PDFs from data
  • Formatting: Structured PDF layout
  • Export: Download functionality
Uses jsPDF library for PDF generation.

API Integration

Base URL

Portal API base URL configuration:

Error Handling

Services include error handling with fallbacks:

Type Definitions

Services use TypeScript types defined in types.ts:
  • PortalUpdate - Update entries
  • PortalGoal - Goal entries
  • UserRole - User role types
  • SearchResult - Search results
  • StatusResponse - Status information