Skip to main content

Project Structure

Numa.sln is organized into components, models, services, and interfaces. The project root contains:
  • Components/ - Contains reusable Razor components
    • Layout/ - Contains layout components for page structures
      • MainLayout.razor - Defines the main layout of the application
    • Pages/ - Contains Razor pages for routing
      • SermonSearch.razor - Defines a page or component for SermonSearch
      • SermonSearch.razor.cs - Code-behind logic for SermonSearch.razor
    • Routes.razor - Configures application routes and navigation
    • App.razor - The root component of the application
  • Models/ - Contains data models representing entities
    • User.cs - Represents the User data model
  • Services/ - Contains services that handle business logic
    • UserService.cs - Handles user-related operations and logic
  • Interfaces/ - Defines contracts for services and components
    • IUserService.cs - Interface for user service functionality
  • wwwroot/ - Contains static files like CSS, JS, and images
  • .env - Stores environment variables for configuration
  • Program.cs - Entry point for application initialization
  • Numa.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:

Dependency Injection

Numa’s services are registered in Program.cs, available to be injected into any component.
Injection occurs in the Razor components’ code-behind file (i.e., 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.
In 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.