mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 21:41:09 +02:00
The workbench-registry app id 'inventar' did not match its @mana/shared-branding MANA_APPS counterpart 'inventory', so the tier- gating join in apps/web/src/lib/app-registry/registry.ts silently failed for the inventory module — it fell into the "no MANA_APPS entry, default visible" fallback and was effectively un-gated. The codebase had also voted overwhelmingly for 'inventar' (53 files) vs 'inventory' (3 files in shared-branding), so the long-standing mismatch was just bookkeeping debt waiting to bite. Pre-release, no live data, so the cleanest fix is to align everything on the English 'inventory': - Workbench-registry id, module.config.ts appId, module folder, route folder and i18n locale folder all renamed via git mv - Standalone apps/inventar/ workspace package renamed - All imports, store identifiers (InventarEvents → InventoryEvents, INVENTAR_GUEST_SEED, inventarModuleConfig), i18n keys and href/goto paths follow the rename - The German display label "Inventar" is preserved everywhere it is a user-visible string (page titles, i18n values, toast labels) - Dexie table prefixes (invCollections, invItems, …) are unchanged - Drive-by fix: ListView.svelte was querying non-existent inventarCollections/inventarItems tables — corrected to the actual invCollections/invItems names from module.config - The "inventar ↔ inventory id mismatch" workaround comment in registry.ts is removed since the mismatch no longer exists module-registry.ts also picks up the user's parallel newsModuleConfig addition because both edits land in the same import block — keeping them split would have left the build in an inconsistent state. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
59 lines
2.1 KiB
Markdown
59 lines
2.1 KiB
Markdown
# Inventory
|
|
|
|
Configurable inventory management app - track anything with custom schemas.
|
|
|
|
**Web App Port:** 5190
|
|
|
|
## Project Overview
|
|
|
|
Inventory is a schema-less inventory management system built with SvelteKit. Users can create collections with custom field definitions, organize items by location and category, and view them in list/grid/table views.
|
|
|
|
### Tech Stack
|
|
|
|
| Layer | Technology |
|
|
|-------|------------|
|
|
| Frontend | SvelteKit 2, Svelte 5 (runes), Tailwind CSS 4 |
|
|
| State | Svelte 5 runes ($state, $derived) with localStorage persistence |
|
|
| Icons | @mana/shared-icons (Phosphor) |
|
|
| PWA | @vite-pwa/sveltekit + Workbox |
|
|
| i18n | svelte-i18n (de, en) |
|
|
|
|
## Key Concepts
|
|
|
|
- **Collections**: Groups of items with a shared schema (custom field definitions)
|
|
- **Templates**: Predefined schemas for common item types (electronics, books, etc.)
|
|
- **Items**: Individual inventory entries with custom field values
|
|
- **Locations**: Hierarchical places (House > Room > Cabinet > Shelf)
|
|
- **Categories**: Flexible categorization with hierarchy
|
|
- **Views**: List, Grid, Table views with saved filters
|
|
|
|
## Development
|
|
|
|
```bash
|
|
# From monorepo root
|
|
pnpm dev:inventory:web # Start web app on port 5190
|
|
```
|
|
|
|
## Project Structure
|
|
|
|
```
|
|
apps/inventory/
|
|
├── apps/
|
|
│ └── web/ # SvelteKit web client
|
|
│ ├── src/
|
|
│ │ ├── routes/
|
|
│ │ │ ├── (auth)/ # Login flow
|
|
│ │ │ └── (app)/ # Authenticated app
|
|
│ │ │ ├── collections/
|
|
│ │ │ ├── items/
|
|
│ │ │ ├── locations/
|
|
│ │ │ └── categories/
|
|
│ │ └── lib/
|
|
│ │ ├── stores/ # Svelte 5 rune stores
|
|
│ │ ├── components/ # UI components
|
|
│ │ ├── i18n/ # Translations
|
|
│ │ └── data/ # Templates, defaults
|
|
│ └── static/
|
|
└── packages/
|
|
└── shared/ # Shared types & constants
|
|
```
|