Appearance
Coding Styles
Conventions used across the HVC codebase. These are the de-facto rules observed in the projects — follow them when contributing.
.NET (all backend projects)
- C# / .NET conventions — PascalCase types, camelCase methods & locals,
file-scoped classes where useful, records for DTOs. - Folders mirror feature boundaries —
Features/<Area>/with Commands/Handlers/ Mutations/Queries next to each other (hvc-api, hvc-admin-api). - Mediator pattern — business logic goes through
IMessageBus/MediatR commands (Wolverine in hvc-api & hvc-admin-api). - Typed HTTP clients via Refit — one interface per external API (
IPexipApi,IMailgunApi,IKeycloakApi...), config section per integration. - Serilog —
Log.Information(...)at startup/shutdown, request logging enabled, Seq sink in every service. - Async everywhere —
async Taskendpoints/services; no sync-over-async.
Svelte (hvc-web, hvc-admin-web)
- Components — PascalCase filenames (
Dashboard.svelte); smaller reusable pieces inatoms/,cmps/,forms/(web) orcomponents/atoms/,components/myForms/(admin). - Props — explicit
export let, defaults in place;$$restPropsspread for pass-through. - Styling — Tailwind utility classes; scoped
<style>blocks only for overrides. - Stores — Svelte stores for shared state (
stores/shared.ts,stores/data.tsin web). - Forms — custom
Form+ input components wrapping Felte (web) / Felte + yup (admin).
Flutter (hvcmobile, hvc-xr)
- GetX — controllers per feature (
AuthController,ContactsController...),Get.find()for DI; routes viaGetMaterialApp. - Naming — snake_case files (
home_page.dart), PascalCase classes, camelCase methods. - Widgets — small focused widgets in
lib/widgets/; pages inlib/views/. - Local persistence — ObjectBox entities in
lib/data/(regenerate withbuild_runner build). - Constants — endpoints/permission names centralized in
lib/shared/constants.dart.
Git & PRs
- Conventional branch names (
feature/,bugfix/,hotfix/). - Meaningful commit messages; update documentation when adding features.
Related
- Design Decisions — rationale behind some of these choices.