Metadata-Version: 2.4
Name: simple_module_dashboard
Version: 0.0.19
Summary: Admin landing page and sidebar menu host for authenticated users of a simple_module app
Project-URL: Homepage, https://github.com/antosubash/simple_module_python
Project-URL: Repository, https://github.com/antosubash/simple_module_python
Project-URL: Issues, https://github.com/antosubash/simple_module_python/issues
Project-URL: Changelog, https://github.com/antosubash/simple_module_python/blob/main/CHANGELOG.md
Author-email: Anto Subash <antosubash@live.com>
License-Expression: MIT
License-File: LICENSE
Keywords: admin,dashboard,inertia,simple-module
Classifier: Development Status :: 3 - Alpha
Classifier: Framework :: FastAPI
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
Classifier: Typing :: Typed
Requires-Python: >=3.12
Requires-Dist: simple-module-core==0.0.19
Requires-Dist: simple-module-db==0.0.19
Requires-Dist: simple-module-hosting==0.0.19
Requires-Dist: simple-module-users==0.0.19
Description-Content-Type: text/markdown

# simple_module_dashboard

Admin landing page + sidebar menu host for authenticated users of a [simple_module](https://github.com/antosubash/simple_module_python) app. Renders `/dashboard`, collects menu entries registered by every other installed module, and provides the primary Inertia layout.

Pre-wired into any app scaffolded with `smpy new`.

## Install

```bash
pip install simple_module_dashboard
```

## What it provides

- `/dashboard` Inertia view, a single entry point for logged-in users.
- Global sidebar renderer — aggregates `register_menu_items()` calls from all modules into one tree.
- Breadcrumb + page-title provider used by downstream module pages.

## Usage

Install the module in a host, and any other module can register a menu entry:

```python
# modules/orders/orders/module.py
from simple_module_core import ModuleBase, ModuleMeta
from simple_module_core.menu import MenuItem, MenuRegistry


class OrdersModule(ModuleBase):
    meta = ModuleMeta(name="orders")

    def register_menu_items(self, registry: MenuRegistry) -> None:
        registry.add(MenuItem(label="Orders", url="/orders", icon="shopping-bag"))
```

The dashboard sidebar picks it up automatically.

## Depends on

- `simple_module_core`, `simple_module_db`, `simple_module_hosting`
- `simple_module_users` (user counts shown on the default layout)

## License

MIT — see [LICENSE](https://github.com/antosubash/simple_module_python/blob/main/LICENSE).
