Module Development Guide
This guide covers external modules that live as separate git repos under MoLOS/external_modules/.
Quick Start with CLI
The fastest way to create a new module is using the built-in CLI:
# From the MoLOS root directory
npm run module:create my-module --name "My Module" --author "Your Name" --description "My module description"
# Or with all defaults
npm run module:create my-module
This will create a complete module scaffold at external_modules/my-module with all necessary files and folders.
Manual Workflow
If you prefer to start from the sample module manually:
- Create a new git repo.
- Clone the MoLOS main repo.
- Clone
MoLOS-Sample-Moduleor another working module as boilerplate. - Copy the boilerplate into
MoLOS/external_modules/<ModuleId>. - Run
npm run modules:syncto create symlinks and run migrations. - Run
npm run dev. - Start developing your module.
Development Map
- Database Schema: Define tables and migrations.
- TypeScript Models: Create type-safe interfaces and inputs.
- Repository Layer: Implement data access logic.
- API Endpoints: Build SvelteKit server routes.
- UI Development: Create routes, components, and stores.
- Module Configuration: Manifest + navigation config.
- AI Integration: Optional AI tools for the Architect Agent.