Code and UI conventions
Write code that looks like the code around it: same structure, same naming, about the same number of comments.
Code
- TypeScript everywhere, strict, and
bun run checkmust pass. - Settings go in each resource's JSON config files, not convars. Server-only settings stay in files that are never listed in
files{}. - Use
@raze/sharedhelpers before writing your own:db, the ready system,provideExports/resourceExports, progress bars (@raze/shared/server/bar) and the animation presets. - Every world interaction goes through
raze_interact. No third-eye targeting and no plain "Press E" text. - New resources come from
bun run new raze_<name>, and only when no existing resource fits. - Never rename a command players already use.
- US spelling in code, comments and UI text.
UI (Mono style)
- Every screen lives in
raze_uiand uses the tokens inresources/raze_ui/web/src/styles.css. - Graphite panels with a soft sheen, a hairline border and about a 16px radius.
- One primary action per screen: a white pill with near-black text. Secondary buttons are graphite.
- Color only for meaning: green success, red danger, amber warning, blue info. No brand accent color. Job screens like the MDT may use their job's color inside.
- Inter everywhere, with tight bold headings.
- Never use
backdrop-filterblur. FiveM renders it as black boxes, so use rgba backgrounds instead. - Include screenshots (
bun run shot) with any UI change.