Overview
Loopar’s module system provides a way to organize and extend functionality through installable applications. Modules group related documents, controllers, and components into cohesive units that can be independently developed, installed, and managed.Module Structure
A module organizes functionality within an app:Apps
Apps are the top-level organizational unit in Loopar:Core App
Framework’s built-in system modules
Custom Apps
Your business logic and extensions
App Configuration
Apps are defined in the database as documents:Core Apps Structure
Module System
Modules are organizational units within apps that group related functionality:Creating a Module
- Define the Module Document
- Create Module Directory
Module Groups
Module groups organize modules in the sidebar:Building Module Navigation
The framework automatically builds navigation:packages/loopar/core/loopar/builder.js
Installing Apps
Loopar supports installing apps from Git repositories:Installation Process
App Management Methods
packages/loopar/core/loopar.js
Document Organization
Modules contain different types of documents:Forms
Data entry and management interfaces:Pages
Public-facing or custom views:Controllers
Business logic for documents:Building References
The framework builds a reference registry for all documents:packages/loopar/core/loopar/builder.js
Module Context
Documents automatically determine their module and app:packages/loopar/core/document/core-document.js
Multi-App Support
Loopar supports running multiple apps simultaneously:App Isolation
- Each app has its own directory in
apps/ - Modules are scoped to their parent app
- Documents reference their source app
- File uploads are organized by app
Cross-App References
Documents from different apps can reference each other:Asset Management
Apps can have their own public assets:packages/loopar/core/server/server.js
Module Development Workflow
Example: Creating a Complete Module
1. Define Module
2. Create Entities
3. Create Controller
4. Rebuild
Best Practices
Next Steps
Documents
Learn about creating documents in modules
Controllers
Implement module controllers