Start typing to search packages!
vela
By @satixxgg
Roblox
Mirrored from WallyVela
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
Safe for commercial use
The package archive does not include its license text; the license is declared in its manifest metadata.
Automated license review โ not legal advice.
