How gregersn/whathappened works
Main Components
a) Frontend Layer:
• TypeScript-based frontend (evidenced by frontend/ directory)
• Organized by features: campaign, character sheets, handouts, widgets
• Webpack build system for asset compilation
b) Backend Layer:
• Flask-based Python application
• Modular blueprint structure for different features
• Authentication system
• Database interactions via SQLAlchemy
• Migration system using Alembic
c) Database Layer:
• SQL database (implied by SQLAlchemy usage)
• Multiple related tables for users, campaigns, characters, etc.
Key Architectural Elements
[Client Layer]
• ↕️ HTTP/WebSocket
[Application Layer]
• ↕️ ORM
[Data Layer]
Component Breakdown
Frontend Components (Blue):
• Character Sheet Management
• Campaign Management
• Handout System
• Authentication UI
• Asset Management
Backend Components (Green):
• Auth Module (/auth)
• Campaign Module (/campaign)
• Character Module (/character)
• Content Module (/content)
• User Assets Module (/userassets)
• Sheet Mechanics Engine (/sheets/mechanics)
Database Components (Yellow):
• User Tables
• Campaign Tables
• Character Tables
• Asset Tables
• Content Tables
Interaction Flows
→ Regular data flow
⇢ Authentication flow
⇄ WebSocket connections (future feature)
Additional Elements
• External email service (for password reset)
• Static asset storage
• Migration system
• Template rendering engine
Technical Details to Note
• Flask blueprints architecture
• SQLAlchemy ORM
• Jinja2 templating
• TypeScript/Webpack frontend
• Authentication system
• Database migration system