diff --git a/CLAUDE.md b/CLAUDE.md index 265d2b9..b660519 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -37,3 +37,18 @@ PID=$(netstat -ano 2>/dev/null | grep ':5173.*LISTENING' | awk '{print $5}' | he - **frontend**: SvelteKit 2 + Svelte 5 + Tailwind CSS v4. Static adapter with SPA fallback. Dev proxy to :8420. - **Environment vars**: `NOTIFY_BRIDGE_DATA_DIR`, `NOTIFY_BRIDGE_SECRET_KEY`, `NOTIFY_BRIDGE_DATABASE_URL` - Core package includes `jinja2` dependency (template rendering lives in core, not server). + +## Entity Relationships (Phase 6) + +``` +ServiceProvider → type: "immich", config: JSON (url, api_key, external_domain) +Tracker → provider_id, tracking_config_id, target_ids: JSON list, collection_ids: JSON list +TrackingConfig → provider_type (must match provider), event flags, scheduling +TemplateConfig → provider_type (must match provider), Jinja2 slots per event type +NotificationTarget → template_config_id, type: "telegram"/"webhook", config: JSON +``` + +- TrackingConfig owned by Tracker (what to watch), TemplateConfig owned by Target (how to format) +- `user_id=0` on TemplateConfig = system default (EN/RU seeded on first startup) +- DB: SQLite + async SQLAlchemy via sqlmodel, auto-created on startup +- API: All CRUD routes under `/api/`, auth via JWT Bearer, `NOTIFY_BRIDGE_` env prefix diff --git a/frontend/src/routes/+layout.svelte b/frontend/src/routes/+layout.svelte index dcb1eb4..b3c305b 100644 --- a/frontend/src/routes/+layout.svelte +++ b/frontend/src/routes/+layout.svelte @@ -1,7 +1,10 @@ {@render children()} diff --git a/frontend/src/routes/+page.svelte b/frontend/src/routes/+page.svelte index 97c4f7d..6a4cd9a 100644 --- a/frontend/src/routes/+page.svelte +++ b/frontend/src/routes/+page.svelte @@ -1,9 +1,18 @@
-
-

Notify Bridge

-

Service-to-notification bridge

+
+

{t('app.name')}

+

{t('app.tagline')}

+
diff --git a/frontend/src/routes/login/+page.svelte b/frontend/src/routes/login/+page.svelte new file mode 100644 index 0000000..e6a8a8a --- /dev/null +++ b/frontend/src/routes/login/+page.svelte @@ -0,0 +1,47 @@ + + +
+
+

{t('app.name')}

+ +
{ e.preventDefault(); handleLogin(); }} class="space-y-4"> +
+ + +
+
+ + +
+ + {#if error} +

{error}

+ {/if} + + +
+
+
diff --git a/frontend/src/routes/providers/+page.svelte b/frontend/src/routes/providers/+page.svelte new file mode 100644 index 0000000..ba8c5ee --- /dev/null +++ b/frontend/src/routes/providers/+page.svelte @@ -0,0 +1,49 @@ + + +
+
+

{t('nav.providers')}

+ + {t('provider.addProvider')} + +
+ + {#if loading} +

{t('common.loading')}

+ {:else if providers.length === 0} +
+

{t('common.noData')}

+

Add your first service provider to get started.

+
+ {:else} +
+ {#each providers as provider} +
+
+
+ {provider.type[0].toUpperCase()} +
+
+

{provider.name}

+

{provider.type}

+
+
+
+ {/each} +
+ {/if} +
diff --git a/frontend/src/routes/setup/+page.svelte b/frontend/src/routes/setup/+page.svelte new file mode 100644 index 0000000..1fc86a1 --- /dev/null +++ b/frontend/src/routes/setup/+page.svelte @@ -0,0 +1,48 @@ + + +
+
+

{t('app.name')}

+

Create your admin account

+ +
{ e.preventDefault(); handleSetup(); }} class="space-y-4"> +
+ + +
+
+ + +
+ + {#if error} +

{error}

+ {/if} + + +
+
+
diff --git a/frontend/src/routes/targets/+page.svelte b/frontend/src/routes/targets/+page.svelte new file mode 100644 index 0000000..3c857b6 --- /dev/null +++ b/frontend/src/routes/targets/+page.svelte @@ -0,0 +1,34 @@ + + +
+
+

{t('nav.targets')}

+
+ + {#if loading} +

{t('common.loading')}

+ {:else if targets.length === 0} +

{t('common.noData')}

+ {:else} +
+ {#each targets as target} +
+

{target.name}

+

{target.type}

+
+ {/each} +
+ {/if} +
diff --git a/frontend/src/routes/telegram-bots/+page.svelte b/frontend/src/routes/telegram-bots/+page.svelte new file mode 100644 index 0000000..6f935ba --- /dev/null +++ b/frontend/src/routes/telegram-bots/+page.svelte @@ -0,0 +1,8 @@ + + +
+

{t('nav.telegramBots')}

+

Telegram bot management — coming soon.

+
diff --git a/frontend/src/routes/template-configs/+page.svelte b/frontend/src/routes/template-configs/+page.svelte new file mode 100644 index 0000000..311c914 --- /dev/null +++ b/frontend/src/routes/template-configs/+page.svelte @@ -0,0 +1,8 @@ + + +
+

{t('nav.templateConfigs')}

+

Template configuration management — coming soon.

+
diff --git a/frontend/src/routes/trackers/+page.svelte b/frontend/src/routes/trackers/+page.svelte new file mode 100644 index 0000000..42a8624 --- /dev/null +++ b/frontend/src/routes/trackers/+page.svelte @@ -0,0 +1,34 @@ + + +
+
+

{t('nav.trackers')}

+
+ + {#if loading} +

{t('common.loading')}

+ {:else if trackers.length === 0} +

{t('common.noData')}

+ {:else} +
+ {#each trackers as tracker} +
+

{tracker.name}

+

{tracker.collection_ids?.length || 0} collections

+
+ {/each} +
+ {/if} +
diff --git a/frontend/src/routes/tracking-configs/+page.svelte b/frontend/src/routes/tracking-configs/+page.svelte new file mode 100644 index 0000000..7f0ad42 --- /dev/null +++ b/frontend/src/routes/tracking-configs/+page.svelte @@ -0,0 +1,8 @@ + + +
+

{t('nav.trackingConfigs')}

+

Tracking configuration management — coming soon.

+
diff --git a/frontend/src/routes/users/+page.svelte b/frontend/src/routes/users/+page.svelte new file mode 100644 index 0000000..942466a --- /dev/null +++ b/frontend/src/routes/users/+page.svelte @@ -0,0 +1,8 @@ + + +
+

{t('nav.users')}

+

User management — coming soon.

+