How sbalakrishnanbe/multitenant-saas-guidance works
Tailspin Surveys is a multitenant SaaS survey application, with Azure Active Directory identity management as its central sample concern. Users sign in, then use the web UI to manage or answer surveys; the UI services call a bearer-token API, which authorizes requests and accesses survey data. The tree and excerpts support this outline, including survey, question, tenant, and contributor-request capabilities. Some service-to-API and runtime configuration wiring is not shown, so those links are marked unverified rather than inferred as confirmed calls.
Main entry points: SurveyController.cs Survey API · QuestionController.cs Question API · SqlServerSurveyStore.cs Survey store · SurveysTokenService.cs Token service
Components 22
Web experience
- Survey UI
src/Tailspin.Surveys.Web/Controllers/SurveyController.cs - Question UI
src/Tailspin.Surveys.Web/Controllers/QuestionController.cs - Home UI
src/Tailspin.Surveys.Web/Controllers/HomeController.cs - Survey service
src/Tailspin.Surveys.Web/Services/SurveyService.cs - Question service
src/Tailspin.Surveys.Web/Services/QuestionService.cs - API responses
src/Tailspin.Surveys.Web/Models/ApiResult.cs
Identity and authorization
- Sign-in flow
src/Tailspin.Surveys.Web/Controllers/AccountController.cs - Sign-in manager
src/Tailspin.Surveys.Web/Security/SignInManager.cs - Token service
src/Tailspin.Surveys.Web/Security/SurveysTokenService.cs - Token cache
src/Tailspin.Surveys.TokenStorage/DistributedTokenCacheService.cs - Survey policies
src/Tailspin.Surveys.Security/Policy/SurveyAuthorizationHandler.cs
Survey API
- Survey API
src/Tailspin.Surveys.WebAPI/Controllers/SurveyController.cs - Question API
src/Tailspin.Surveys.WebAPI/Controllers/QuestionController.cs
Survey data
- Survey store
src/Tailspin.Surveys.Data/DataStore/SqlServerSurveyStore.cs - Question store
src/Tailspin.Surveys.Data/DataStore/SqlServerQuestionStore.cs - Contributor requests
src/Tailspin.Surveys.Data/DataStore/SqlServerContributorRequestStore.cs - Survey data model
src/Tailspin.Surveys.Data/DataModels/ApplicationDbContext.cs - Survey entities
src/Tailspin.Surveys.Data/DataModels/Survey.cs - Survey DTOs
src/Tailspin.Surveys.Data/DTOs/SurveyDTO.cs
Other components
- User
- Azure AD
- SQL database
Connections 22
- User → Survey UI: manages surveys
src/Tailspin.Surveys.Web/Controllers/SurveyController.cs - User → Question UI: edits questions
src/Tailspin.Surveys.Web/Controllers/QuestionController.cs - User → Sign-in flow: signs in
src/Tailspin.Surveys.Web/Controllers/AccountController.cs - Survey UI → Survey service: calls
src/Tailspin.Surveys.Web/Controllers/SurveyController.cs - Home UI → Survey service: calls
src/Tailspin.Surveys.Web/Controllers/HomeController.cs - Question UI → Question service: calls
src/Tailspin.Surveys.Web/Controllers/QuestionController.cs - Survey service → Survey API: HTTP requests
- Question service → Question API: HTTP requests
- Sign-in flow → Sign-in manager: delegates sign-out
src/Tailspin.Surveys.Web/Controllers/AccountController.cs - Sign-in manager → Token service: uses tokens
src/Tailspin.Surveys.Web/Security/SignInManager.cs - Token service → Token cache: uses cache
src/Tailspin.Surveys.Web/Security/SurveysTokenService.cs - Token service → Azure AD: authenticates with
README.md - Survey API → Survey policies: authorizes
src/Tailspin.Surveys.WebAPI/Controllers/SurveyController.cs - Question API → Survey policies: authorizes
src/Tailspin.Surveys.WebAPI/Controllers/QuestionController.cs - Survey API → Survey store: reads and writes
src/Tailspin.Surveys.WebAPI/Controllers/SurveyController.cs - Survey API → Contributor requests: processes requests
src/Tailspin.Surveys.WebAPI/Controllers/SurveyController.cs - Question API → Question store: reads and writes
src/Tailspin.Surveys.WebAPI/Controllers/QuestionController.cs - Question API → Survey store: loads surveys
src/Tailspin.Surveys.WebAPI/Controllers/QuestionController.cs - Survey store → Survey data model: uses context
src/Tailspin.Surveys.Data/DataStore/SqlServerSurveyStore.cs - Survey store → Survey entities: persists
src/Tailspin.Surveys.Data/DataStore/SqlServerSurveyStore.cs - Survey data model → SQL database: stores entities
- Survey API → Survey DTOs: maps payloads
src/Tailspin.Surveys.WebAPI/Controllers/SurveyController.cs