{"id":"satixxgg/vela","name":"vela","scope":"satixxgg","platform":"roblox","description":"A lightweight and modular framework for Roblox.","version":"0.1.0","latest":"0.1.0","versions":["0.1.0"],"license":"MIT","licenseRating":"safe","licenseCaveats":["The package archive does not include its license text; the license is declared in its manifest metadata."],"licenseVerified":false,"dependencies":{"sleitnick/trove":{"version":"^1.8.0","alias":"trove"}},"integrity":"8a30b5b27eeb6ecfe292df4c670ecdb7ad376e8bb5e7836cfbb8a9d67a8cca3d","likes":0,"downloads":0,"install":"forest install satixxgg/vela","url":"https://forest.dev/p/roblox/satixxgg/vela","files":"https://api.forest.dev/ai/package/roblox/satixxgg/vela/files","readme":"# Vela\n\n> A lightweight, modular framework for Roblox built with Luau.\n\nVela provides a structured architecture for building scalable Roblox experiences through dependency injection, lifecycle management, and automatic registration of framework objects.\n\n## Features\n\n- 🧩 Modular architecture\n- ⚙️ Automatic dependency resolution\n- 📦 Registry-based object management\n- 🔄 Lifecycle management\n- 🏗️ Generic infrastructure for Services and Controllers\n- 📝 Declarative object definitions\n- 🎯 Type-friendly Luau API\n\n---\n\n# Architecture\n\nVela is built around three primary object types:\n\n```\n           +----------------------+\n           |      Component       |\n           |   Data & Metadata    |\n           +----------+-----------+\n                      |\n                      |\n      +---------------+---------------+\n      |                               |\n+-------------+               +---------------+\n|   Service   |               |  Controller   |\n| Backend API |               | Game Logic    |\n+-------------+               +---------------+\n```\n\nThese objects are managed by the Vela Core Engine, which is responsible for:\n\n- Dependency Resolution\n- Lifecycle Management\n- Object Registration\n- Load Ordering\n- Automatic Initialization\n\n---\n\n# Core Engine\n\nThe framework internally manages every registered object through specialized systems.\n\n## Dependency Resolution\n\nAutomatically resolves object dependencies before initialization.\n\n```lua\ndependencies = {\n    \"DataService\",\n    \"InventoryService\"\n}\n```\n\nObjects are initialized only after all dependencies have been successfully created.\n\n---\n\n## Lifecycle Management\n\nThe framework automatically executes lifecycle callbacks in the correct order.\n\nExample lifecycle:\n\n```\nRegister\n    ↓\nResolve Dependencies\n    ↓\nCreate Instance\n    ↓\nOnInit\n    ↓\nOnStart\n```\n\n---\n\n## Registry System\n\nEvery Service and Controller is automatically registered into an internal registry.\n\nThis registry is responsible for:\n\n- Object lookup\n- Load ordering\n- Dependency graph creation\n- Instance retrieval\n\n---\n\n## Generic Infrastructure\n\nServices and Controllers both use the same generic implementation located in:\n\n```\nsrc/API/ComponentGeneric\n```\n\nThis infrastructure handles:\n\n- Registration\n- Dependency management\n- Instance creation\n- Load order sorting\n- Lifecycle execution\n\n---\n\n# Object Types\n\n## Component\n\nComponents are lightweight data objects used to represent entities with attributes and metadata.\n\n### Features\n\n- Custom tags\n- Arbitrary attributes\n- Automatic attribute synchronization\n- Extendable class structure\n\n### Creating a Component\n\n```lua\nlocal Object = require(script.Parent.API.Object)\n\nlocal Item = Object.extend({\n    tag = \"Item\",\n\n    attributes = {\n        Weight = 10,\n        IsEquipped = false,\n    },\n\n    autoUpdateAttributes = true\n})\n```\n\n---\n\n## Service\n\nServices represent backend systems responsible for infrastructure and game-wide logic.\n\nExamples:\n\n- DataService\n- InventoryService\n- MatchmakingService\n- EconomyService\n\n### Features\n\n- Automatic registration\n- Dependency injection\n- Configurable load order\n- Lifecycle support\n\n### Creating a Service\n\n```lua\nlocal Service = require(script.Parent.API.Service)\n\nlocal DataService = Service.new({\n    name = \"DataService\",\n    loadOrder = 10,\n    dependencies = {}\n})\n```\n\n---\n\n## Controller\n\nControllers contain gameplay logic or workflow processing.\n\nExamples:\n\n- PurchaseController\n- CombatController\n- UIController\n- InventoryController\n\nControllers follow the same lifecycle as Services while remaining focused on gameplay logic.\n\n### Creating a Controller\n\n```lua\nlocal Controller = require(script.Parent.API.Controller)\n\nlocal PurchaseController = Controller.new({\n    name = \"PurchaseController\",\n    loadOrder = 20,\n    dependencies = {\n        \"DataService\"\n    }\n})\n```\n\n---\n\n# Load Order\n\nObjects can define a custom loading priority.\n\n```lua\nloadOrder = 100\n```\n\nLower values initialize first.\n\nExample:\n\n```\n10  DataService\n20  InventoryService\n30  PurchaseController\n40  UIController\n```\n\n---\n\n# Dependencies\n\nDependencies are declared using the object names.\n\n```lua\ndependencies = {\n    \"DataService\",\n    \"InventoryService\"\n}\n```\n\nThe framework guarantees:\n\n- Correct initialization order\n- Circular dependency detection\n- Automatic dependency resolution\n\n---\n\n# Project Structure\n\n```\nsrc\n│\n├── API\n│   ├── Object.luau\n│   ├── Service.luau\n│   ├── Controller.luau\n│   └── ComponentGeneric\n│\n└── Core\n    ├── Registry\n    ├── DependencyResolver\n    ├── Lifecycle\n    └── Bootstrap\n```\n\n---\n\n# Example\n\n```lua\nlocal Object = require(API.Object)\nlocal Service = require(API.Service)\nlocal Controller = require(API.Controller)\n\nlocal Item = Object.extend({\n    tag = \"Item\",\n    attributes = {\n        Weight = 10,\n        IsEquipped = false,\n    },\n    autoUpdateAttributes = true\n})\n\nlocal DataService = Service.new({\n    name = \"DataService\",\n    loadOrder = 10,\n    dependencies = {}\n})\n\nlocal PurchaseController = Controller.new({\n    name = \"PurchaseController\",\n    loadOrder = 20,\n    dependencies = {\n        \"DataService\"\n    }\n})\n```\n\n---\n\n# Philosophy\n\nVela aims to provide a simple yet powerful foundation for Roblox development by encouraging:\n\n- Separation of concerns\n- Modular systems\n- Explicit dependencies\n- Predictable initialization\n- Maintainable architecture\n\nInstead of manually orchestrating startup logic, developers declare their objects and let the framework manage execution.\n\n---\n\n## License\n\nMIT License\n","readmeTruncated":false}