Hallo Stroke

Naming & Conventions

Code conventions across the Go backend and React frontend.

The two codebases follow deliberately different idioms — Go's exported/unexported split on the backend, React's PascalCase components on the frontend. This page lists the conventions actually in use, with the few inconsistencies called out.

Cross-cutting rules

  • Backend = Indonesian domain nouns, English code verbs. Routes and model names use Indonesian (pengingat, faskes); Go method names mix both freely.
  • Frontend = English routes, Indonesian UI copy. Components and routes are English-readable; visible text is Bahasa Indonesia.
  • Both prefer composition over inheritance. Backend wires services with constructor + setter injection; frontend composes Context providers and axios interceptors.
  • Inconsistency is real. JSON tag casing, response suffixes (Response vs DTO), and frontend route casing are not uniform. When extending, match the nearest neighbor, don't introduce a third style.

On this page