ERPlora Module SDK — Build modules for ERPlora Hub
Project description
ERPlora SDK
Build modules for ERPlora — the modular POS system.
How It Works
The ERPlora SDK lets you create modules for ERPlora Hub locally on your machine, without needing access to the Hub source code. You develop against the SDK's dev environment (SQLite, built-in templates, PIN login), and your module code runs identically in production.
Install SDK → Create module → Develop locally → Push to GitHub → Available in Marketplace
Getting Started
1. Install the SDK
pip install erplora-sdk
2. Create a new module
erplora startmodule reservations
This generates a complete module scaffold:
reservations/
├── module.py # Metadata: name, icon, navigation, permissions
├── models.py # Django models (extend HubBaseModel)
├── views.py # Views with @htmx_view, @with_module_nav
├── urls.py # URL patterns
├── forms.py # Django forms
├── ai_tools.py # AI assistant tools
├── templates/reservations/
│ ├── pages/ # Full page templates
│ └── partials/ # HTMX partial templates
├── static/reservations/ # CSS, JS, images
├── migrations/
└── tests/
3. Start the dev server
erplora devserver
This automatically:
- Creates a SQLite database (zero configuration)
- Runs migrations for your models
- Creates a dev user with PIN: 1234
- Starts the server at http://localhost:8000
4. Develop your module
Edit your files — models, views, templates, AI tools — and see changes live at http://localhost:8000.
5. Publish when ready
git init
git add .
git commit -m "Initial module"
git remote add origin https://github.com/your-user/module-reservations.git
git push -u origin main
Register your module in the ERPlora Marketplace and it becomes available to all ERPlora Hubs via automatic sync.
What's Included
| Feature | Description |
|---|---|
| Base Models | HubBaseModel with UUID primary key, soft delete, audit trail |
| HTMX Decorators | @htmx_view for SPA navigation without writing JavaScript |
| Auth Decorators | @login_required, @permission_required, @admin_required |
| Navigation | @with_module_nav for automatic tab bar rendering |
| AI Tools | AssistantTool base class — let users interact with your module via AI chat |
| Templates | Base templates with UX CSS library (161 components, dark mode) |
| Events | Signals, hooks (WordPress-style), and UI slots for extensibility |
| Services | CSV/Excel export, image handling, file import parsing |
| Dev Server | SQLite, auto-migrations, PIN auth, module auto-discovery |
Import Compatibility
Your module code uses the exact same import paths as production ERPlora Hubs. The SDK maps them automatically:
# These work identically in the SDK and in production
from apps.core.htmx import htmx_view
from apps.core.models.base import HubBaseModel
from apps.accounts.decorators import login_required, permission_required
from apps.modules_runtime.navigation import with_module_nav
from assistant.tools import AssistantTool, register_tool
Write once, run anywhere — no code changes needed when your module goes to production.
View Pattern
Every module view follows this decorator pattern:
from apps.accounts.decorators import login_required, permission_required
from apps.modules_runtime.navigation import with_module_nav
from apps.core.htmx import htmx_view
@login_required
@permission_required('reservations.view')
@with_module_nav('reservations', 'overview')
@htmx_view('reservations/pages/overview.html', 'reservations/partials/overview.html')
def overview(request):
from .models import Reservation
return {'reservations': Reservation.objects.all()}
- Normal request (direct URL) → renders the full page template
- HTMX request (
hx-get) → renders only the partial (SPA navigation)
AI Tools
Give your module AI capabilities by defining tools in ai_tools.py:
from assistant.tools import AssistantTool, register_tool
from .models import Reservation
@register_tool
class ListReservations(AssistantTool):
name = 'reservations_list'
description = 'List upcoming reservations'
parameters = {
'type': 'object',
'properties': {
'date': {
'type': 'string',
'description': 'Filter by date (YYYY-MM-DD)',
},
},
}
def execute(self, request, date=None):
qs = Reservation.objects.filter(is_active=True)
if date:
qs = qs.filter(date=date)
return {'reservations': list(qs.values('id', 'name', 'date', 'time'))}
Users can then interact with your module through the AI assistant: "Show me today's reservations".
module.py
Every module has a module.py that defines its metadata:
from django.utils.translation import gettext_lazy as _
MODULE_ID = 'reservations'
MODULE_NAME = _('Reservations')
MENU = {
'label': _('Reservations'),
'icon': 'calendar-outline',
'order': 30,
}
NAVIGATION = [
{'label': _('Overview'), 'icon': 'home-outline', 'id': 'overview'},
{'label': _('Calendar'), 'icon': 'calendar-outline', 'id': 'calendar'},
{'label': _('Settings'), 'icon': 'settings-outline', 'id': 'settings'},
]
PERMISSIONS = [
'reservations.view',
'reservations.edit',
'reservations.delete',
]
Publishing to the Marketplace
| Type | Description | Revenue |
|---|---|---|
| Free | Open source, available to all | — |
| Premium | Set your own price | You keep 85% |
- Push your module to GitHub (
your-user/module-name) - Register it in the ERPlora Marketplace
- After review, it's available to all ERPlora Hubs
- The sync pipeline automatically distributes updates when you push
CLI Commands
erplora startmodule <name> # Create a new module scaffold
erplora devserver # Start dev server (SQLite, PIN: 1234)
erplora version # Show SDK version
erplora help # Show help
Requirements
- Python 3.12+
- Django 6.0+
Installed automatically: Django, djicons (icon template tags), Pillow (image handling).
Links
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file erplora_sdk-0.1.0.tar.gz.
File metadata
- Download URL: erplora_sdk-0.1.0.tar.gz
- Upload date:
- Size: 19.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
faa039351cf9064655434f10df286d92996166df45ced8741ac86061fe4e97b9
|
|
| MD5 |
fd2ba1629cbf43cf7846cd10c48aac6d
|
|
| BLAKE2b-256 |
98c5ae63ea176aa87c9e26422fa8fb3563ad245de09640a6ed2e32b614f19f45
|
Provenance
The following attestation bundles were made for erplora_sdk-0.1.0.tar.gz:
Publisher:
publish.yml on ERPlora/erplora-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
erplora_sdk-0.1.0.tar.gz -
Subject digest:
faa039351cf9064655434f10df286d92996166df45ced8741ac86061fe4e97b9 - Sigstore transparency entry: 1167531189
- Sigstore integration time:
-
Permalink:
ERPlora/erplora-sdk@9abd7d499a844cf6369a032743d0656603ce2e63 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/ERPlora
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@9abd7d499a844cf6369a032743d0656603ce2e63 -
Trigger Event:
release
-
Statement type:
File details
Details for the file erplora_sdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: erplora_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 35.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
178ce9b9a27f55b2f3d34ef358590b85a07427d9615c2a3b2988281e62e24821
|
|
| MD5 |
28cc8589a04dcc2f6bdcb9cd0d3d50e3
|
|
| BLAKE2b-256 |
5aa2662e36af9376443e8b1babe8b62f356c00e8b68b35c9f1944f99de623c90
|
Provenance
The following attestation bundles were made for erplora_sdk-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on ERPlora/erplora-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
erplora_sdk-0.1.0-py3-none-any.whl -
Subject digest:
178ce9b9a27f55b2f3d34ef358590b85a07427d9615c2a3b2988281e62e24821 - Sigstore transparency entry: 1167531297
- Sigstore integration time:
-
Permalink:
ERPlora/erplora-sdk@9abd7d499a844cf6369a032743d0656603ce2e63 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/ERPlora
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@9abd7d499a844cf6369a032743d0656603ce2e63 -
Trigger Event:
release
-
Statement type: