Skip to content

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 check must 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/shared helpers 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 (Raze blue) ​

  • Every screen lives in raze_ui and uses the tokens in resources/raze_ui/web/src/styles.css.
  • Deep navy panels.
  • One primary action per screen: a bright blue gradient button.
  • Color only for meaning, through the --success, --danger, --warning and --info tokens. No other accent colors. Job screens like the MDT may use their job's color inside. The phone app icons are colored on purpose; leave them.
  • Type, through the --font-display and --font tokens:
    • Unbounded Bold for headlines and section titles. Every h1 and h2 gets it automatically.
    • Archivo Semibold for subheadings (h3), navigation and buttons.
    • Archivo Regular for paragraphs and general content.
    • Archivo stands in for the brand's Acumin Pro, a paid Adobe font. If we get licensed Acumin files, swap the font files, --font, the loadscreen's style.css and this site's theme.
    • The logo is custom geometric lettering, not a font. Until we have it as an image, the RAZE wordmark is set in Unbounded.
  • Never use backdrop-filter blur. FiveM renders it as black boxes, so use rgba backgrounds instead.

Private. Do not share outside the team.