{"id":"ulises-aragon/director","name":"director","scope":"ulises-aragon","platform":"roblox","description":"Create registries of identifed records in Roblox.","version":"0.1.1","latest":"0.1.1","versions":["0.1.0","0.1.1"],"license":"MIT","licenseRating":"safe","licenseCaveats":[],"licenseVerified":true,"dependencies":{"lukadev-0/typed-promise":{"version":"^4.0.2","alias":"Promise"}},"integrity":"ec2706b2ff1189c3f993b89d5f9a9463a21e39b5697388105c15dd24a3351a88","likes":0,"downloads":0,"install":"forest install ulises-aragon/director","url":"https://forest.dev/p/roblox/ulises-aragon/director","files":"https://api.forest.dev/ai/package/roblox/ulises-aragon/director/files","readme":"<div align=\"center\">\r\n\t<h1>Director</h1>\r\n</div>\r\n\r\nThe Director module for Roblox provides organized loading and management of data components.\r\n<!--moonwave-hide-before-this-line-->\r\n\r\n\r\n# Director and Registry System\r\n\r\nWhen building data-driven games, you often create many ModuleScripts containing configurations for weapons, skills, NPCs, etc. Normally, you'd need to manually `require()` each one and hope the data structure is correct.\r\n\r\n**Director and Registries solve this by:**\r\n- Automatically discovering and loading all your data modules from folders\r\n- Ensuring type safety so you catch data structure mistakes before runtime\r\n- Organizing everything with simple ID-based lookup\r\n\r\n## How Registries Work\r\n\r\nThink of a Registry as a **typed container** for related data:\r\n\r\n1. **Point it at a folder** containing your ModuleScripts\r\n2. **Registry automatically loads** each ModuleScript and assigns it an ID (the script's name)\r\n3. **Fetch data by ID** with full type safety - your code knows exactly what data structure to expect\r\n\r\n### Example\r\n```lua\r\n-- Create a registry for weapon data\r\nlocal weaponRegistry: Registry<WeaponData> = director.createRegistry(\"Weapons\", weaponsFolder)\r\n\r\n-- Registry loads all ModuleScripts in weaponsFolder automatically\r\nweaponRegistry:load() -- This is a manual load for registry, you wouldn't use this on a normal setup.\r\n\r\n-- Fetch specific weapons with type safety\r\nlocal sword: WeaponData? = weaponRegistry:fetch(\"Sword\")  -- Returns WeaponData or nil\r\nlocal bow: WeaponData? = weaponRegistry:fetch(\"Bow\")\r\n\r\n-- Luau/TypeScript ensures your data matches WeaponData structure\r\n```\r\n\r\n## Benefits\r\n\r\n- **No manual requires** - Just point at folders and let Registry handle loading\r\n- **Type safety** - Catch data structure errors at compile-time, not runtime\r\n- **Clean organization** - ID-based lookup instead of scattered require() calls\r\n- **Factory support** - Transform raw module data into proper class instances","readmeTruncated":false}