How mrterrestrial/fastapi-jwtauth works
This is a FastAPI user-authentication API. Clients register accounts, log in with a password to receive a JWT cookie, and use that cookie to access their profile. The API entry point registers the routes; route handlers use a shared SQLAlchemy session and the User model, while database configuration binds sessions and metadata to SQLite. The graph follows the sampled routes and README capabilities; it does not imply unsampled behavior beyond those descriptions.
Main entry points: run.py FastAPI app · profile.py Profile route · login.py Login · register.py Registration
Components 11
API routes
- FastAPI app
run.py - Root route
app/routes/index.py - Profile route
app/routes/profile.py
Identity and tokens
- Registration
app/routes/register.py - Login
app/routes/login.py - JWT validation
app/routes/profile.py
Persistence
- User model
app/models/user_model.py - DB sessions
app/utils/db.py - SQLite config
config/database.py - SQLite store
app.db
Other components
- API client
Connections 19
- API client → FastAPI app: sends requests
README.md - FastAPI app → Root route: registers route
run.py - FastAPI app → Registration: registers route
run.py - FastAPI app → Login: registers route
run.py - FastAPI app → Profile route: registers route
run.py - API client → Registration: posts account
README.md - Registration → DB sessions: gets session
app/routes/register.py - Registration → User model: creates user
app/routes/register.py - API client → Login: posts credentials
README.md - Login → DB sessions: gets session
app/routes/login.py - Login → User model: queries user
app/routes/login.py - Login → API client: sets JWT cookie
README.md - API client → Profile route: requests profile
README.md - Profile route → JWT validation: validates cookie
app/routes/profile.py - Profile route → DB sessions: gets session
app/routes/profile.py - Profile route → User model: queries user
app/routes/profile.py - DB sessions → SQLite config: opens session
app/utils/db.py - User model → SQLite config: uses metadata
app/models/user_model.py - SQLite config → SQLite store: configures store
config/database.py