How bohdan778/taskflow works
TaskFlow is a FastAPI backend for account access, task tracking, habit logging, scheduling, and a combined statistics overview. The main flow is a client request routed through the application to a domain router, which authenticates where required, uses request schemas and SQLAlchemy models, and accesses persisted data through the async session. Habit and overview statistics also use shared streak calculations. The README is empty; the graph follows the sampled source and SOURCE INDEX, so it does not infer additional product capabilities or integrations.
Main entry points: stats.py Stats routes · security.py Token security · database.py Async sessions · main.py FastAPI app
Components 20
API entry
- FastAPI app
app/main.py
Identity
- Account routes
app/routers/auth.py - Token security
app/security.py
User features
- Task routes
app/routers/tasks.py - Habit routes
app/routers/habits.py - Schedule routes
app/routers/schedule.py - Stats routes
app/routers/stats.py
Persistence
- Async sessions
app/database.py - User model
app/models/user.py - Task model
app/models/task.py - Habit models
app/models/habit.py - Schedule model
app/models/schedule.py
Schemas and metrics
- User schemas
app/schemas/user.py - Task schemas
app/schemas/task.py - Habit schemas
app/schemas/habit.py - Schedule schemas
app/schemas/schedule.py - Stats schema
app/schemas/stats.py - Streak calculation
app/services/habit_stats.py
Other components
- API client
- SQL database
Connections 33
- API client → FastAPI app: sends requests
app/main.py - FastAPI app → Account routes: registers router
app/main.py - FastAPI app → Habit routes: registers router
app/main.py - FastAPI app → Task routes: registers router
app/main.py - FastAPI app → Schedule routes: registers router
app/main.py - FastAPI app → Stats routes: registers router
app/main.py - Account routes → Async sessions: uses session
app/routers/auth.py - Account routes → User model: queries and stores
app/routers/auth.py - Account routes → User schemas: validates and returns
app/routers/auth.py - Account routes → Token security: creates token
app/routers/auth.py - Token security → Async sessions: gets session
app/security.py - Token security → User model: loads user
app/security.py - Task routes → Async sessions: uses session
app/routers/tasks.py - Task routes → Task model: queries and mutates
app/routers/tasks.py - Task routes → Task schemas: validates and returns
app/routers/tasks.py - Task routes → Token security: requires user
app/routers/tasks.py - Habit routes → Async sessions: uses session
app/routers/habits.py - Habit routes → Habit models: queries and mutates
app/routers/habits.py - Habit routes → Habit schemas: validates and returns
app/routers/habits.py - Habit routes → Token security: requires user
app/routers/habits.py - Habit routes → Streak calculation: calculates streaks
app/routers/habits.py - Schedule routes → Async sessions: uses session
app/routers/schedule.py - Schedule routes → Schedule model: queries and mutates
app/routers/schedule.py - Schedule routes → Schedule schemas: validates and returns
app/routers/schedule.py - Schedule routes → Token security: requires user
app/routers/schedule.py - Stats routes → Async sessions: uses session
app/routers/stats.py - Stats routes → Task model: aggregates tasks
app/routers/stats.py - Stats routes → Habit models: reads habits and logs
app/routers/stats.py - Stats routes → Schedule model: counts upcoming events
app/routers/stats.py - Stats routes → Stats schema: returns overview
app/routers/stats.py - Stats routes → Token security: requires user
app/routers/stats.py - Stats routes → Streak calculation: calculates streaks
app/routers/stats.py - Async sessions → SQL database: connects via URL
app/database.py