Project Structure
Numa.sln is organized into components, models, services, and interfaces. The project root contains:
Components/- Contains reusable Razor componentsLayout/- Contains layout components for page structuresMainLayout.razor- Defines the main layout of the application
Pages/- Contains Razor pages for routingSermonSearch.razor- Defines a page or component for SermonSearchSermonSearch.razor.cs- Code-behind logic forSermonSearch.razor
Routes.razor- Configures application routes and navigationApp.razor- The root component of the application
Models/- Contains data models representing entitiesUser.cs- Represents theUserdata model
Services/- Contains services that handle business logicUserService.cs- Handles user-related operations and logic
Interfaces/- Defines contracts for services and componentsIUserService.cs- Interface for user service functionality
wwwroot/- Contains static files like CSS, JS, and images.env- Stores environment variables for configurationProgram.cs- Entry point for application initializationNuma.sln- Solution file that organizes the project
Implementing SDKs
As a best practice, Numa wraps all external SDKs in custom services to ensure scalability and easy future integration with additional SDKs.Examples:
| SDK | Wrapped by Numa Service |
|---|---|
| Azure OpenAI | ChatService.cs |
| Azure Storage | DocumentStorageService.cs |
| Markdig | MarkdownService.cs |
Dependency Injection
Numa’s services are registered inProgram.cs, available to be injected into any component.
SermonSearch.razor.cs).
Handling Secrets
A.env file is used to store TENANT_ID, APP_CLIENT_ID, APP_CLIENT_SECRET, KV_URL, and ASPNETCORE_ENVIRONMENT.
Program.cs, the credentials from .env are used to authenticate with Azure Key Vault, which securely stores the secrets required to access Azure cloud resources.
