feat(notify-bridge): phase 1 - project scaffolding
Set up the Notify Bridge project structure: - packages/core (notify_bridge_core) with provider, model, notification, template packages - packages/server (notify_bridge_server) with FastAPI skeleton and health endpoint - frontend with SvelteKit 2, Svelte 5, Tailwind CSS v4, static adapter - Root configs: .gitignore, README.md, CLAUDE.md Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
[build-system]
|
||||
requires = ["hatchling"]
|
||||
build-backend = "hatchling.build"
|
||||
|
||||
[project]
|
||||
name = "notify-bridge-core"
|
||||
version = "0.1.0"
|
||||
description = "Core library for Notify Bridge — service provider abstractions, models, notifications, and templates"
|
||||
requires-python = ">=3.12"
|
||||
dependencies = [
|
||||
"aiohttp>=3.9",
|
||||
"jinja2>=3.1",
|
||||
]
|
||||
|
||||
[project.optional-dependencies]
|
||||
dev = [
|
||||
"pytest>=8.0",
|
||||
"pytest-asyncio>=0.23",
|
||||
"aioresponses>=0.7",
|
||||
]
|
||||
|
||||
[tool.hatch.build.targets.wheel]
|
||||
packages = ["src/notify_bridge_core"]
|
||||
|
||||
[tool.pytest.ini_options]
|
||||
asyncio_mode = "auto"
|
||||
testpaths = ["tests"]
|
||||
@@ -0,0 +1 @@
|
||||
"""Notify Bridge Core — service provider abstractions, models, notifications, and templates."""
|
||||
@@ -0,0 +1 @@
|
||||
"""Core data models — events, media assets, collections."""
|
||||
@@ -0,0 +1 @@
|
||||
"""Notification dispatch — Telegram, webhooks, queue."""
|
||||
@@ -0,0 +1 @@
|
||||
"""Telegram notification client."""
|
||||
@@ -0,0 +1 @@
|
||||
"""Webhook notification client."""
|
||||
@@ -0,0 +1 @@
|
||||
"""Service provider abstractions and implementations."""
|
||||
@@ -0,0 +1 @@
|
||||
"""Immich service provider implementation."""
|
||||
@@ -0,0 +1 @@
|
||||
"""Template system — rendering, variables, validation."""
|
||||
@@ -0,0 +1,34 @@
|
||||
[build-system]
|
||||
requires = ["hatchling"]
|
||||
build-backend = "hatchling.build"
|
||||
|
||||
[project]
|
||||
name = "notify-bridge-server"
|
||||
version = "0.1.0"
|
||||
description = "Standalone Notify Bridge server — FastAPI REST API with SQLite database"
|
||||
requires-python = ">=3.12"
|
||||
dependencies = [
|
||||
"notify-bridge-core==0.1.0",
|
||||
"fastapi>=0.115",
|
||||
"uvicorn[standard]>=0.32",
|
||||
"sqlmodel>=0.0.22",
|
||||
"aiosqlite>=0.20",
|
||||
"pyjwt>=2.9",
|
||||
"bcrypt>=4.2",
|
||||
"apscheduler>=3.10,<4",
|
||||
"aiohttp>=3.9",
|
||||
"anthropic>=0.42",
|
||||
]
|
||||
|
||||
[project.optional-dependencies]
|
||||
dev = [
|
||||
"pytest>=8.0",
|
||||
"pytest-asyncio>=0.23",
|
||||
"httpx>=0.27",
|
||||
]
|
||||
|
||||
[project.scripts]
|
||||
notify-bridge = "notify_bridge_server.main:run"
|
||||
|
||||
[tool.hatch.build.targets.wheel]
|
||||
packages = ["src/notify_bridge_server"]
|
||||
@@ -0,0 +1 @@
|
||||
"""Notify Bridge Server — FastAPI REST API with SQLite database."""
|
||||
@@ -0,0 +1 @@
|
||||
"""API route modules."""
|
||||
@@ -0,0 +1 @@
|
||||
"""Authentication — JWT, login, user management."""
|
||||
@@ -0,0 +1,12 @@
|
||||
"""Server configuration — settings, data directory, secrets."""
|
||||
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
DATA_DIR = Path(os.environ.get("NOTIFY_BRIDGE_DATA_DIR", "./data"))
|
||||
SECRET_KEY = os.environ.get("NOTIFY_BRIDGE_SECRET_KEY", "")
|
||||
DATABASE_URL = os.environ.get(
|
||||
"NOTIFY_BRIDGE_DATABASE_URL",
|
||||
f"sqlite+aiosqlite:///{DATA_DIR / 'notify_bridge.db'}",
|
||||
)
|
||||
@@ -0,0 +1 @@
|
||||
"""Database engine and models."""
|
||||
@@ -0,0 +1,15 @@
|
||||
"""Notify Bridge Server — FastAPI application entry point."""
|
||||
|
||||
from fastapi import FastAPI
|
||||
|
||||
app = FastAPI(title="Notify Bridge", version="0.1.0")
|
||||
|
||||
|
||||
@app.get("/api/health")
|
||||
async def health():
|
||||
return {"status": "ok"}
|
||||
|
||||
|
||||
def run():
|
||||
import uvicorn
|
||||
uvicorn.run(app, host="0.0.0.0", port=8420)
|
||||
@@ -0,0 +1 @@
|
||||
"""Business logic services — scheduler, watcher, notifier."""
|
||||
Reference in New Issue
Block a user