Forest Logo
search
package_2

vela

By @satixxgg

Roblox

Mirrored from Wally

Vela

A lightweight, modular framework for Roblox built with Luau.

Vela provides a structured architecture for building scalable Roblox experiences through dependency injection, lifecycle management, and automatic registration of framework objects.

Features

  • ๐Ÿงฉ Modular architecture
  • โš™๏ธ Automatic dependency resolution
  • ๐Ÿ“ฆ Registry-based object management
  • ๐Ÿ”„ Lifecycle management
  • ๐Ÿ—๏ธ Generic infrastructure for Services and Controllers
  • ๐Ÿ“ Declarative object definitions
  • ๐ŸŽฏ Type-friendly Luau API

Architecture

Vela is built around three primary object types:

           +----------------------+
           |      Component       |
           |   Data & Metadata    |
           +----------+-----------+
                      |
                      |
      +---------------+---------------+
      |                               |
+-------------+               +---------------+
|   Service   |               |  Controller   |
| Backend API |               | Game Logic    |
+-------------+               +---------------+

These objects are managed by the Vela Core Engine, which is responsible for:

  • Dependency Resolution
  • Lifecycle Management
  • Object Registration
  • Load Ordering
  • Automatic Initialization

Core Engine

The framework internally manages every registered object through specialized systems.

Dependency Resolution

Automatically resolves object dependencies before initialization.

dependencies = {
    "DataService",
    "InventoryService"
}

Objects are initialized only after all dependencies have been successfully created.


Lifecycle Management

The framework automatically executes lifecycle callbacks in the correct order.

Example lifecycle:

Register
    โ†“
Resolve Dependencies
    โ†“
Create Instance
    โ†“
OnInit
    โ†“
OnStart

Registry System

Every Service and Controller is automatically registered into an internal registry.

This registry is responsible for:

  • Object lookup
  • Load ordering
  • Dependency graph creation
  • Instance retrieval

Generic Infrastructure

Services and Controllers both use the same generic implementation located in:

src/API/ComponentGeneric

This infrastructure handles:

  • Registration
  • Dependency management
  • Instance creation
  • Load order sorting
  • Lifecycle execution

Object Types

Component

Components are lightweight data objects used to represent entities with attributes and metadata.

Features

  • Custom tags
  • Arbitrary attributes
  • Automatic attribute synchronization
  • Extendable class structure

Creating a Component

local Object = require(script.Parent.API.Object)

local Item = Object.extend({
    tag = "Item",

    attributes = {
        Weight = 10,
        IsEquipped = false,
    },

    autoUpdateAttributes = true
})

Service

Services represent backend systems responsible for infrastructure and game-wide logic.

Examples:

  • DataService
  • InventoryService
  • MatchmakingService
  • EconomyService

Features

  • Automatic registration
  • Dependency injection
  • Configurable load order
  • Lifecycle support

Creating a Service

local Service = require(script.Parent.API.Service)

local DataService = Service.new({
    name = "DataService",
    loadOrder = 10,
    dependencies = {}
})

Controller

Controllers contain gameplay logic or workflow processing.

Examples:

  • PurchaseController
  • CombatController
  • UIController
  • InventoryController

Controllers follow the same lifecycle as Services while remaining focused on gameplay logic.

Creating a Controller

local Controller = require(script.Parent.API.Controller)

local PurchaseController = Controller.new({
    name = "PurchaseController",
    loadOrder = 20,
    dependencies = {
        "DataService"
    }
})

Load Order

Objects can define a custom loading priority.

loadOrder = 100

Lower values initialize first.

Example:

10  DataService
20  InventoryService
30  PurchaseController
40  UIController

Dependencies

Dependencies are declared using the object names.

dependencies = {
    "DataService",
    "InventoryService"
}

The framework guarantees:

  • Correct initialization order
  • Circular dependency detection
  • Automatic dependency resolution

Project Structure

src
โ”‚
โ”œโ”€โ”€ API
โ”‚   โ”œโ”€โ”€ Object.luau
โ”‚   โ”œโ”€โ”€ Service.luau
โ”‚   โ”œโ”€โ”€ Controller.luau
โ”‚   โ””โ”€โ”€ ComponentGeneric
โ”‚
โ””โ”€โ”€ Core
    โ”œโ”€โ”€ Registry
    โ”œโ”€โ”€ DependencyResolver
    โ”œโ”€โ”€ Lifecycle
    โ””โ”€โ”€ Bootstrap

Example

local Object = require(API.Object)
local Service = require(API.Service)
local Controller = require(API.Controller)

local Item = Object.extend({
    tag = "Item",
    attributes = {
        Weight = 10,
        IsEquipped = false,
    },
    autoUpdateAttributes = true
})

local DataService = Service.new({
    name = "DataService",
    loadOrder = 10,
    dependencies = {}
})

local PurchaseController = Controller.new({
    name = "PurchaseController",
    loadOrder = 20,
    dependencies = {
        "DataService"
    }
})

Philosophy

Vela aims to provide a simple yet powerful foundation for Roblox development by encouraging:

  • Separation of concerns
  • Modular systems
  • Explicit dependencies
  • Predictable initialization
  • Maintainable architecture

Instead of manually orchestrating startup logic, developers declare their objects and let the framework manage execution.


License

MIT License

Package Details

Install command (Click to copy)


Version

0.1.0

License

MIT

check_circle

Safe for commercial use

infoThe package archive does not include its license text; the license is declared in its manifest metadata.

Automated license review โ€” not legal advice.