infra/api.ts Summary
This file defines the main API Gateway for the application and its authorization mechanisms. It highlights the system's extensive integrations with other services.
Key Components:
- API Gateway: A single
ApiGatewayV2instance namedMyApi.
- Resource Links: The API has access to various internal resources (S3 buckets, database, event bus) and a large number of secrets for third-party services. This indicates a system that acts as a central hub, integrating with many external tools.
- Third-Party Integrations:
- Cloud Services: Azure, Google Generative AI
- Collaboration Tools: Confluence, SharePoint, Slack, GitHub
- AI/ML Platforms: Hugging Face, Langfuse
- Authentication: WorkOS
- Authorization: The API is secured with two JWT authorizers:
UserPoolAuthorizer: For standard user authentication via AWS Cognito.WorkosJwtAuthorizer: A custom Lambda authorizer for enterprise SSO via WorkOS. This points to a dual authentication system, likely for different user segments (e.g., individual users vs. enterprise customers).
infra/frontend.ts Summary
This file configures the web frontend, which is a static single-page application (SPA).
Key Components:
- Framework: It's a Vite-based SPA located in
packages/web.
- Deployment: Deployed as an
sst.aws.StaticSite, with a custom domain for different stages.
- Backend Communication: The frontend is explicitly linked to the backend API via the
VITE_API_URLenvironment variable.
- Authentication: The frontend receives all necessary configuration for handling user authentication, including:
- AWS Cognito User Pool credentials for standard users.
- Client IDs and authentication URLs for several third-party services (Confluence, Hugging Face, GitHub, SharePoint, WorkOS). This indicates that the frontend initiates and handles the OAuth authentication flows with these services directly.
infra/storage.ts Summary
This file defines all the S3 buckets used in the application. All buckets are versioned. The descriptive names of the buckets suggest a data processing pipeline related to "assets".
Buckets:
DocumentLocker: General document storage.
AssetCriteria: Stores criteria for assets.
ArtifactContent: Stores the content of artifacts.
ProcessingAssetSummaries: Stores summaries of processed assets.
ClusteringResult: Stores results from a clustering algorithm.
CriteriaResult: Stores results from applying criteria.
AssetSchema: Stores schemas for assets.
ModelTestingPayload: Stores payloads for testing models.
Seonglae Cho