security-environment-standards
Security & Environment Standards
Authentication Model
The app uses passwordless magic-link authentication — no passwords, no flask-login, no WTForms. A time-limited token is emailed; clicking it creates an authenticated session.
# app.py globals
magic_links = {} # {token: {'email': str, 'expires': datetime}}
active_sessions = {} # {email: session_id} — one session per user enforced
MAGIC_LINK_EXPIRY_MINUTES = 15
def send_magic_link_email(email, magic_token, base_url) -> bool:
# Send link via SMTP; falls back to stdout in dev (no SMTP config).
...
The @login_required decorator (defined in app.py) checks session['authenticated'] and active_sessions.
More from findinfinitelabs/chuuk
large-document-processing
Process large documents (200+ pages) with structure preservation, intelligent parsing, and memory-efficient handling. Also covers intelligent text chunking for AI training and RAG systems. Use when working with complex formatted documents, multi-level hierarchies, or when splitting large content for AI pipelines.
28python-venv-management
Automatically manage Python virtual environments (.venv) in terminal commands. Always activate .venv before running Python/pip commands. Supports macOS, Linux, and Windows with shell-aware activation. Use when executing Python scripts, installing packages, or running development servers. Critical for consistent environment management.
14bible-epub-processing
Parse and extract structured content from Bible EPUBs (NWT) for parallel text alignment between Chuukese and English. Use when working with Bible data, verse extraction, parallel corpus building, or generating training data from Scripture.
14intelligent-text-chunking
Split large texts into meaningful, AI-optimized chunks while preserving semantic coherence and document structure. Covered by the large-document-processing skill — see that skill for full details.
13document-ocr-processing
Process scanned documents and images containing Chuukese text using OCR with specialized post-processing for accent characters and traditional formatting. Use when working with scanned books, documents, or images that contain Chuukese text that needs to be digitized.
12react-typescript-frontend
Patterns for the Chuuk Dictionary React + TypeScript frontend — Vite, Mantine v8, React 19, React Router v7, axios with cookie sessions, and permission-gated routing. Use when adding pages, wiring API calls, modifying navigation, or extending the user/auth context.
12