Skip to content

Repository files navigation

Employee Roster

Employee Roster is a .NET 10 Blazor Server application for managing client employee rosters with an Excel-based workflow.

Overview

The primary workflow is:

  1. Select a client and download the current roster.
  2. Edit roster data in Excel (.xlsx).
  3. Upload the workbook for validation.
  4. Review warnings/errors and proposed changes.
  5. Submit validated changes.

The app currently applies adds and updates from validated uploads. It does not perform roster deactivation through upload apply.

Tech stack

  • Framework: .NET 10 (net10.0)
  • UI: Blazor Server + MudBlazor
  • Application pattern: request/handler dispatching (CQRS-style dispatcher)
  • Data access:
    • EF Core SQL Server persistence (EmployeeRoster.Persistence)
    • Optional Snowflake-backed persistence (EmployeeRoster.Persistence.Snowflake)
  • Employee directory integration: Snowflake provider with a local development stub option
  • Auth: Windows Negotiate authentication + policy-based authorization
  • Logging: Serilog (console + SQL Server sink for error events)

Solution structure

Production projects (src)

  • EmployeeRoster.WebApp - host app, Blazor components/pages, startup pipeline, API endpoints
  • EmployeeRoster.Application - use cases, contracts, dispatcher, validation orchestration, mapping
  • EmployeeRoster.Domain - domain model, entities, enums, business behavior
  • EmployeeRoster.Excel - Excel import/export services
  • EmployeeRoster.Persistence - EF Core persistence and repository/unit-of-work implementation
  • EmployeeRoster.Persistence.Snowflake - Snowflake persistence implementation
  • EmployeeRoster.Snowflake - Snowflake employee directory integration + stub implementation

Test projects (tests)

  • EmployeeRoster.WebApp.Tests
  • EmployeeRoster.Application.Tests
  • EmployeeRoster.Domain.Tests
  • EmployeeRoster.Excel.Tests
  • EmployeeRoster.Persistence.Tests
  • EmployeeRoster.Persistence.Snowflake.Tests
  • EmployeeRoster.Snowflake.Tests

Current behavior

Blazor UI

  • / - roster page (client selection, roster grid, download, upload)
  • /admin - client and identifier type administration
  • /status/{code} - status page for errors like 403/404

API

  • GET /api/roster/{clientId:int}/download - downloads roster export for a client

Upload rules and staging

Default upload settings (from appsettings.json):

  • MaxUploadBytes: 5242880 (5 MB)
  • AllowedContentTypes: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
  • AllowedExtensions: .xlsx

Upload processing includes validation results, duplicate detection (SHA-256 hash), and token-based staging. Staged upload data is stored in memory with a 30-minute TTL.

Configuration

Required

  • ConnectionStrings:EmployeeRoster

Optional / environment-specific

  • EmployeeDirectory:Provider
    • Set to Stub in development to avoid Snowflake dependency for directory lookups.
  • ConnectionStrings:Snowflake
    • Required when EmployeeDirectory:Provider is not Stub.
  • Persistence:Provider
    • Default path uses SQL Server persistence.
    • Set to Snowflake to use Snowflake persistence.
  • ConnectionStrings:EmployeeRosterSnowflake
    • Required when Persistence:Provider=Snowflake.

Local secrets recommendation

Use user-secrets for local credentials (do not commit credentials to source control):

dotnet user-secrets --project src/EmployeeRoster.WebApp init
dotnet user-secrets --project src/EmployeeRoster.WebApp set "ConnectionStrings:EmployeeRoster" "<your-sql-connection-string>"
dotnet user-secrets --project src/EmployeeRoster.WebApp set "EmployeeDirectory:Provider" "Stub"

If using Snowflake integrations locally:

dotnet user-secrets --project src/EmployeeRoster.WebApp set "ConnectionStrings:Snowflake" "<your-snowflake-connection-string>"
# only if Snowflake persistence is enabled
dotnet user-secrets --project src/EmployeeRoster.WebApp set "ConnectionStrings:EmployeeRosterSnowflake" "<your-snowflake-persistence-connection-string>"

Build, test, run

dotnet restore EmployeeRoster.slnx
dotnet build EmployeeRoster.slnx -c Release
dotnet test EmployeeRoster.slnx -c Release

Run the app:

dotnet run --project src/EmployeeRoster.WebApp

Hot reload:

dotnet watch --project src/EmployeeRoster.WebApp run

Public repo readiness (secrets)

This repository should only contain placeholder and non-sensitive configuration. Before publishing:

  1. Keep all real credentials in user-secrets, environment variables, or a secure secret manager.
  2. Verify no publish profiles with credentials are committed.
  3. Run a full secret scan on current files and Git history (history scanning is required separately).
  4. Rotate any credential that may ever have been committed.

License

No license file is currently defined in this repository. Add one before public release if needed.

About

Enterprise employee roster management application built with .NET 10, Blazor Server, Excel integration, SQL Server, Snowflake, and policy-based authorization.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Used by

Contributors

Languages