A smorgasbord of modern .NET tech written with functional and asynchronous patterns
Sample HRIS application where a list of employees and their payroll information would be available in report format.
This project was created to explore a variety of technologies, patterns, and frameworks in a sandbox style environment. The fictional domain of the application is designed be restrictive enough to mimic a real world application while also allowing creative and technical freedom for the developers involved.
Areas of interest:
Thanks goes to these wonderful people (emoji key):
Kyle McMaster 🎨 💻 ⚠️ |
Sean G. Wright 🎨 💻 👀 |
Justin Conklin 👀 💻 |
This project follows the all-contributors specification. Contributions of any kind welcome!
api/ - .NET API and Azure Functions backend
client/ - Main view of the application built with Angular and Boostrap
vue-client/ - Alternate view of the Admin page built with Vue3 and Tailwind CSS
This project uses VS Code Multi-root Workspaces.
For the best developer experience, open the workspace directly with VS Code (code payroll-processor.code-workspace
)
or open the root of the repository in VS Code (code .
) and when prompted, open the workspace.
The API solution (PayrollProcessor.sln
) is set up as the default solution
for Omnisharp, and is loaded as soon as the
VS Code workspace is opened.
All of the backend .NET code is found in the /api
folder.
This solution contains 2 applications PayrollProcessor.Functions.Api
and PayrollProcess.Web.Api
This solution also contains multiple shared libraries and test projects.
There are VS Code tasks (Clean, Build, Test) at the solution and the individual application project level.
Currently there are no application secrets or app settings to customize for the Web API.
However, settings for the application can be found in appsettings.Development.json
and appsettings.json
.
To run the Web API run the following launch configuration (Debug: Select and Start Debugging)
The application will start and listen for requests on http://localhost:5000.
Ensure the Azure Functions VS Code extension is installed.
Run "Azure Functions: Install or Update Azure Functions Core Tools" from the command palette.
Start the Azure Storage Emulator and Azure Cosmos Db Emulator (see: Data Storage below)
Copy
api/PayrollProcessor.Functions.Api/local.settings.json.sample
to
api/PayrollProcessor.Functions.Api/local.settings.json
F5 or run from the VS Code Debug drop down "Function: Run & Attach (Debug)"
Optional: Run any of the following tasks (Task: Run Task)
Optional: Run any of the following launch configurations (Debug: Select and Start Debugging)
The application will listen for requests on http://localhost:7071.
Copy
client/src/environments/environment.local.sample.ts
to
client/src/environments/environment.local.ts
Run the "Client: Serve" VS Code task (this will install packages and start serving the app)
The project currently stores data in Azure Table Storage, which can be simulated locally using the Azurite.
The locally stored data can be viewed using the Azure Storage Explorer.
This project also uses the Azure Cosmos Db Emulator which can be downloaded at https://aka.ms/cosmosdb-emulator
Note: There is a Linux/MacOS emulator available as well
For performing any of the following operations ensure the following:
PayrollProcessor.Functions.Api
above) is runningTo initialize the data storage structure (a few tables and a queue):
http://localhost:7071/api/resources/
Create Resources
request in /docs/PayrollProcessor.postman_collection.json
Postman collectionThe creation process will skip any resources that already exist.
There is also an endpoint to initialize randomly generated data in the data storage:
http://localhost:7071/api/resources/data
employeesCount
: Sets the number of employees created by the requestpayrollsMaxCount
: Sets the maximum number of payrolls created for each employee (random value 1-max)Create Seed Data
request in /docs/PayrollProcessor.postman_collection.json
Postman collectionFinally, there's an endpoint to clear/reset all the data currently in the app. This can be useful if you are changing schemas and don't want to write migrations.
http://localhost:7071/api/resources
Delete Resources
request in /docs/PayrollProcessor.postman_collection.json
Postman collection