Rogen

Routing Folders

Keep all of a feature's code in one folder

Updated

A folder named after a route key, such as Server/, sends everything inside it to that route's target and leaves no folder of its own. Give each feature a folder, and inside it one routing folder for each side it runs on:

my-game
MY-GAME
  • src
  • Combat
  • Client
  • CombatController.luau
  • Server
  • DamageService.luau
  • Shared
  • Weapons.luau
  • Data
  • Server
  • PlayerData.luau
  • Shop
  • Client
  • ShopUi.luau
  • Shared
  • Prices.luau
Explorer
  • ReplicatedStorage
  • Shared
  • Combat
  • Weapons
  • Shop
  • Prices
  • ServerScriptService
  • Combat
  • DamageService
  • Data
  • PlayerData
  • StarterPlayer
  • StarterPlayerScripts
  • Combat
  • CombatController
  • Shop
  • ShopUi

Each feature shows up under every service it runs in, and code requires its other parts by that path, as in require(ReplicatedStorage.Shared.Combat.Weapons). To set a routing folder apart from a feature with the same name, spell it @Server/.