How michaelatsey/saas-btp works
SaaS BTP is a construction-operations SaaS repository whose README describes field execution and QHSE workflows, but also calls the project a bootstrap skeleton. The visible API code implements slices for founding an organization/workspace and resolving a caller’s site context; Safety contains a constat domain model but no shown capture endpoint or corrective-action workflow. The graph focuses on these evidenced runtime areas and the documented platform boundary. Some infrastructure wiring and unsampled subsystem behavior cannot be confirmed from the excerpts.
Main entry points: FoundCompanySpaceCommandHandler.cs Found company space · ResolveCurrentSiteHandler.cs Resolve site context · CurrentSiteContext.cs Current site context · ResolveContextEndpoint.cs Context endpoint
Components 19
API host
- API host
apps/api/src/Host/SaasBtp.Api/Program.cs
Access and founding
- Found company space
apps/api/src/Modules/Access/src/SaasBtp.Access.Application/Features/FoundCompanySpace/FoundCompanySpaceCommandHandler.cs - Identity provisioner
apps/api/src/Modules/Access/src/SaasBtp.Access.Application/Features/FoundCompanySpace/IIdentityProvisioner.cs - GoTrue adapter
apps/api/src/Modules/Access/src/SaasBtp.Access.Infrastructure/Identity/GoTrueIdentityProvisioner.cs - Founder profile projection
apps/api/src/Modules/Access/src/SaasBtp.Access.Application/Features/FoundCompanySpace/IProfileProjection.cs - Organization aggregate
apps/api/src/Modules/Access/src/SaasBtp.Access.Domain/Organizations/Organization.cs - Workspace aggregate
apps/api/src/Modules/Access/src/SaasBtp.Access.Domain/Workspaces/Workspace.cs - Organization repository
apps/api/src/Modules/Access/src/SaasBtp.Access.Domain/Organizations/IOrganizationRepository.cs - Workspace repository
apps/api/src/Modules/Access/src/SaasBtp.Access.Domain/Workspaces/IWorkspaceRepository.cs - Access persistence
apps/api/src/Modules/Access/src/SaasBtp.Access.Infrastructure/Persistence/AccessDbContext.cs
Site context
- Context endpoint
apps/api/src/Modules/Site/SaasBtp.Site.Infrastructure/Endpoints/ResolveContextEndpoint.cs - Resolve site context
apps/api/src/Modules/Site/SaasBtp.Site.Application/Features/ResolveCurrentSite/ResolveCurrentSiteHandler.cs - Current site context
apps/api/src/Modules/Site/SaasBtp.Site.Infrastructure/Context/CurrentSiteContext.cs - Site scope provider
apps/api/src/Modules/Site/SaasBtp.Site.Infrastructure/Authorization/SiteMembershipScopeProvider.cs - Scope data source
apps/api/src/Modules/Site/SaasBtp.Site.Infrastructure/Authorization/SiteScopeDataSource.cs - Context result
apps/api/src/Modules/Site/SaasBtp.Site.Application/Features/ResolveCurrentSite/CurrentSiteResult.cs
Safety findings
- Safety constat
apps/api/src/Modules/Safety/SaasBtp.Safety.Domain/Constats/Constat.cs - Safety persistence
apps/api/src/Modules/Safety/SaasBtp.Safety.Infrastructure/Persistence/SafetyDbContext.cs
Other components
- API caller
Connections 14
- Found company space → Identity provisioner: provisions identity
apps/api/src/Modules/Access/src/SaasBtp.Access.Application/Features/FoundCompanySpace/FoundCompanySpaceCommandHandler.cs - Found company space → Founder profile projection: adds profile
apps/api/src/Modules/Access/src/SaasBtp.Access.Application/Features/FoundCompanySpace/FoundCompanySpaceCommandHandler.cs - Found company space → Organization aggregate: founds organization
apps/api/src/Modules/Access/src/SaasBtp.Access.Application/Features/FoundCompanySpace/FoundCompanySpaceCommandHandler.cs - Found company space → Workspace aggregate: founds workspace
apps/api/src/Modules/Access/src/SaasBtp.Access.Application/Features/FoundCompanySpace/FoundCompanySpaceCommandHandler.cs - Found company space → Organization repository: stages organization
apps/api/src/Modules/Access/src/SaasBtp.Access.Application/Features/FoundCompanySpace/FoundCompanySpaceCommandHandler.cs - Found company space → Workspace repository: stages workspace
apps/api/src/Modules/Access/src/SaasBtp.Access.Application/Features/FoundCompanySpace/FoundCompanySpaceCommandHandler.cs - Identity provisioner → GoTrue adapter: implemented by
apps/api/src/Modules/Access/src/SaasBtp.Access.Infrastructure/Identity/GoTrueIdentityProvisioner.cs - Context endpoint → Resolve site context: dispatches query
apps/api/src/Modules/Site/SaasBtp.Site.Infrastructure/Endpoints/ResolveContextEndpoint.cs - Context endpoint → Current site context: checks resolution
apps/api/src/Modules/Site/SaasBtp.Site.Infrastructure/Endpoints/ResolveContextEndpoint.cs - Resolve site context → Current site context: reads site scope
apps/api/src/Modules/Site/SaasBtp.Site.Application/Features/ResolveCurrentSite/ResolveCurrentSiteHandler.cs - Resolve site context → Context result: builds response
apps/api/src/Modules/Site/SaasBtp.Site.Application/Features/ResolveCurrentSite/ResolveCurrentSiteHandler.cs - Site scope provider → Scope data source: uses data source
apps/api/src/Modules/Site/SaasBtp.Site.Infrastructure/Authorization/SiteMembershipScopeProvider.cs - Current site context → Site scope provider: populated by
- Safety persistence → Safety constat: maps aggregate
apps/api/src/Modules/Safety/SaasBtp.Safety.Infrastructure/Persistence/SafetyDbContext.cs