Velox Web Developer Guide
This guide is for developers joining the velox-web repository. This repository contains the current ASP.NET Core web front end that works from the VxData database.
Repository Layout
velox.web.sln- Visual Studio solution for the web application.velox.web\- ASP.NET Core web application with Razor views, areas, controllers, filters, static assets, and startup invelox.web\Program.cs.velox.data\- EF Core contexts, identity models, data models, repositories, validation, and AutoMapper configuration.velox.service\- service layer over repositories and business workflows.velox.common\- shared models, exceptions, extensions, helpers, enums, repository bases, and context abstractions.velox.external.addressfinder\- AddressFinder integration.velox.external.googleaddress\- Google address integration.velox.web.test\- NUnit test project.velox.web\Areas\Administration\- administration UI and controllers.velox.web\Areas\Transaction\- transaction/user workflow UI and controllers.velox.web\Areas\Api\- API endpoints such as transaction upload/webhook routes.velox.web\wwwroot\- static assets.velox.web\gulpfile.jsandvelox.web\package.json- frontend asset tooling.vendor\- vendor/client assets.zUnneeded Code\- inactive or historical code. Do not treat as production code unless explicitly asked.velox-kb\VeloxPKB\docs\velox-web\- PKB/developer documentation for this repository.
Build Process
Prerequisites inferred from the repository:
- Visual Studio 2022 or .NET SDK capable of building .NET 9 projects.
- NuGet access to
nuget.org. - DevExtreme/DevExpress package source configured by
NuGet.config. - Node.js/npm if modifying frontend assets.
Build the .NET solution:
dotnet restore velox.web.sln
dotnet build velox.web.sln
Run the web app:
dotnet run --project velox.web\velox.web.csproj
The velox.web launch profile uses:
https://localhost:5001http://localhost:5000- launch URL
Transaction/Shipment
Frontend asset workflow:
cd velox.web
npm install
npx gulp build
The older root README.md mentions Node.js, DevExpress, Gulp, npm install, and gulp build. Prefer the actual project files when commands differ.
Debugging
Debug the app from Visual Studio using the velox.web profile, or use dotnet run from the command line.
Important startup behavior:
velox.web\Program.csis the active startup file.- Services are registered through module loading via
AddModules(). DataModuleregistersVxConfigContext,VxDataContext, ASP.NET Identity, repositories, and AutoMapper.- Routes are mapped for areas, API routes, OAuth callbacks, and the default Transaction area route.
AppConfig:HomePageTransactioncontrols the default Transaction-area controller.
Configuration:
- Connection strings are read from
ConnectionStrings:VxConfigandConnectionStrings:VxData. - Local
appsettings.jsonmay contain machine-specific values. Use local overrides or user secrets rather than adding real secrets. - Identity, email, address provider, cache, app, and layout settings are loaded from configuration.
When debugging data issues:
- Confirm whether the issue is in
VxConfigorVxData. - Check EF model mappings in
velox.data\Context. - Check repository/service behavior before changing controllers.
- Check matching SQL/schema in
velox-dataif the database shape is involved.
Coding Standards Inferred From The Project
- Follow existing ASP.NET Core MVC/Razor/Area patterns.
- Keep controllers thin where service/repository layers already exist.
- Use EF Core through the existing
VxConfigContextandVxDataContextpatterns. - Keep database schema changes in
velox-data; do not invent migrations in this repository unless explicitly asked. - Preserve DevExtreme response/update patterns in grid-oriented controllers and repositories.
- Treat client-supplied filenames, paths, headers, and upload bodies as untrusted.
- Avoid
.Resultand.Wait()in request paths; prefer async all the way. - Do not enable EF Core sensitive data logging for production configuration.
- Do not add third-party dependencies without approval.
- Do not use
zUnneeded Codeas a source of production patterns unless the task explicitly targets it.
Typical Workflow
For a UI/controller change:
- Identify the area: Administration, Transaction, API, OAuth, Identity, or shared layout.
- Read the controller, view, service, repository, and model involved.
- Preserve existing route and DevExtreme conventions.
- Make the smallest change that fits the existing pattern.
- Build
velox.web.sln. - Run the affected page or endpoint locally.
- Update user documentation in
velox-kbif user-facing behavior changes.
For a data/repository change:
- Read the entity model and context mapping.
- Read the repository base class and matching concrete repository.
- Check service methods that wrap the repository.
- Confirm whether schema changes are needed in
velox-data. - Add or update tests in
velox.web.testwhere practical.
For frontend assets:
- Work under
velox.web\wwwrootor the existing asset source folders. - Use the existing Gulp/npm toolchain.
- Build assets and verify generated CSS/JS output.
Common Pitfalls
- Root
Program.cs,Startup.cs, andProgram - Copy.csare legacy/inactive relative tovelox.web\Program.cs. zUnneeded Codecontains historical code and should not drive new implementation.appsettings.jsoncan contain local machine values and secrets; do not copy those into new environments.- Request/form limits are currently broad; be careful with upload endpoints and memory pressure.
- Webhook upload handling touches both controller and service code.
- EF context files are large and schema-coupled; changes may need coordination with
velox-data. - The test project targets .NET 6 while the web app targets .NET 9; test compatibility should be checked before assuming all tests run cleanly.
- DevExtreme package resolution depends on the configured local DevExpress package source.
Important Concepts
VxConfig
The configuration database contains Velox setup/configuration data used by services and the web app.
VxData
The data database contains business transaction data that users review, search, and manage through the web app.
Areas
The app uses ASP.NET Core Areas to separate Administration, Transaction, API, OAuth, and Identity workflows.
Repository And Service Layers
Repositories encapsulate EF Core access. Services expose business operations to controllers and components.
DevExtreme
Many list/detail workflows are built around DevExtreme data loading, grid updates, and validation patterns.
Webhook Uploads
API upload endpoints receive external payloads and write files for Velox processing. Treat all caller-provided metadata as unsafe until validated.
Unclear Areas
- The planned replacement path for this web app with Angular or React is not fully described in this repository.
- The intended production secret-management approach is unclear from static review.
- The complete test run status is unclear without executing the solution in a configured development environment.