Rogen

Introduction

Feature-based architecture for Roblox

Updated

You're reading the docs for Rogen v1

Rogen v2 is the recommended version. Migrate a project to v2 or read the v2 docs.

A bad folder structure slows you down. You spend your time remembering where the related pieces live, and then hunting for them.

The Problem: Layer-Based Architecture

Most Roblox projects split their code twice:

  1. By environment: server, client and shared folders at the root.
  2. By type: inside those, a folder per technical role, like Controllers, Services or Utils.

It looks tidy at first, but it doesn't scale. The folders keep growing and related files drift further apart, until changing the Inventory system means digging through three big trees just to collect its pieces.

my-game
MY-GAME
  • src
  • client
  • Controllers
  • InventoryController.luau
  • server
  • Services
  • InventoryService.luau
  • shared
  • Types
  • InventoryTypes.luau

The cost: constant context switching. Working on one feature means wading through unrelated systems just to find the right server script.

The Solution: Feature-Based Architecture

Keep all the code for one feature (client, server and shared) together in a single folder, and let Rogen sort out the rest. It reads your folder and file names and sends every file to the Roblox service where it belongs.

my-game
MY-GAME
  • src
  • Inventory
  • client
  • InventoryController.luau
  • server
  • InventoryService.luau
  • shared
  • InventoryTypes.luau
Explorer
  • ReplicatedStorage
  • Inventory
  • InventoryTypes
  • ServerScriptService
  • Inventory
  • InventoryService
  • StarterPlayer
  • StarterPlayerScripts
  • Inventory
  • InventoryController

The result: your repository stays organized by feature, and Studio still gets every script in the right place.

On this page