M1: notes model + migration 0002 + notes API (CRUD, trash/restore)
CI & Build / Python lint (push) Successful in 3s
CI & Build / TypeScript typecheck (push) Successful in 5s
CI & Build / Python tests (push) Successful in 11s
CI & Build / Build & push image (push) Successful in 36s

- Note model (owner_id, title, body, color-key, pinned, archived, deleted_at
  soft-delete, timestamps) + board index; NOTE_COLORS palette keys.
- Migration 0002 (notes table + ix_notes_owner_board).
- /api/notes blueprint (login_required): list (?filter=active|archived|trash,
  pinned-then-updated, read via visible_to_user ACL), create, get, patch
  (title/body/color/pinned/archived), trash, restore, permanent delete
  (trash-only). Mutations owner-scoped; empty note rejected (400).
- DB-free unit tests: is_empty_note, normalize_color, palette, serialize,
  auth-guard on list/create.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FRgehjoz7Yv8LkUfADxACm
This commit is contained in:
2026-07-19 15:59:43 -04:00
co-authored by Claude Opus 4.8
parent 05d5249e20
commit df59a30cca
6 changed files with 317 additions and 1 deletions
+2
View File
@@ -7,6 +7,7 @@ from quart import Quart, jsonify, send_from_directory
from . import __version__
from .auth import bp as auth_bp
from .config import Config
from .notes import bp as notes_bp
STATIC_DIR = os.path.join(os.path.dirname(__file__), "static")
@@ -19,6 +20,7 @@ def create_app() -> Quart:
app.config["APP_VERSION"] = os.environ.get("APP_VERSION", __version__)
app.register_blueprint(auth_bp)
app.register_blueprint(notes_bp)
@app.get("/api/health")
async def health():