How omarzidane0/authix works
This Flask application provides registration, email-OTP verification, login/logout, JWT-backed sessions, and a JWT-protected home page. Registration creates an unverified account; login either starts verification or issues a token, and OTP verification marks the account verified and issues a token. The graph separates application wiring, authentication flows, and account/session concerns. Source excerpts show route-to-helper and initialization relationships; unsampled templates and helper implementations are represented only where the tree or README supports their role.
Main entry points: __init__.py Flask App Factory · otp.py OTP Verification · login.py Login and Logout · model.py Account and OTP Models
Components 14
Application Wiring
- Flask App Factory
app/__init__.py - App Configuration
app/config.py - Flask Extensions
app/extensions.py
Authentication Flows
- Registration
app/routes/auth/register.py - Login and Logout
app/routes/auth/login.py - OTP Verification
app/routes/auth/otp.py - Password and OTP Helpers
app/utils/password_hash.py - OTP Email Sender
app/utils/email_sender.py
Accounts and Sessions
- Account and OTP Models
app/models/model.py - SQLite Database
app/config.py - JWT Error Handlers
app/routes/auth/jwt_f.py - Protected Home
app/routes/home/home_p.py
Other components
- User
- SMTP Email Service
Connections 25
- User → Registration: registers
README.md - User → Login and Logout: logs in
README.md - User → OTP Verification: submits OTP
app/routes/auth/otp.py - User → Protected Home: requests page
app/routes/home/home_p.py - Flask App Factory → App Configuration: loads config
app/__init__.py - Flask App Factory → Flask Extensions: initializes
app/__init__.py - Flask App Factory → Registration: registers route
app/__init__.py - Flask App Factory → Login and Logout: registers route
app/__init__.py - Flask App Factory → OTP Verification: registers route
app/__init__.py - Flask App Factory → Protected Home: registers route
app/__init__.py - Flask App Factory → JWT Error Handlers: registers callbacks
app/__init__.py - Registration → Account and OTP Models: creates account
app/routes/auth/register.py - Registration → Password and OTP Helpers: hashes password
app/routes/auth/register.py - Login and Logout → Account and OTP Models: looks up account
app/routes/auth/login.py - Login and Logout → Password and OTP Helpers: checks password
app/routes/auth/login.py - Login and Logout → OTP Verification: routes unverified user
app/routes/auth/login.py - Login and Logout → Flask Extensions: creates JWT
app/routes/auth/login.py - OTP Verification → Account and OTP Models: checks and updates
app/routes/auth/otp.py - OTP Verification → Password and OTP Helpers: generates OTP
app/routes/auth/otp.py - OTP Verification → OTP Email Sender: sends OTP
app/routes/auth/otp.py - OTP Verification → Flask Extensions: creates JWT
- OTP Email Sender → SMTP Email Service: sends message
- Account and OTP Models → Flask Extensions: uses ORM
app/models/model.py - Account and OTP Models → SQLite Database: persists records
- Protected Home → Flask Extensions: requires JWT
app/routes/home/home_p.py