You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A full-stack mobile application that helps children learn skills, participate in event-based quizzes, track wellness, and connect with counsellors. Built for NGO use with child-safety at its core.
flowchart TD
LAUNCH([App Launch]) --> SHELL[AppShell\nBottom Navigation Bar]
SHELL --> HOME[Home Dashboard]
SHELL --> LEARN[Learn Screen]
SHELL --> EVENTS[Events Screen]
SHELL --> WELL[Wellness Screen]
SHELL --> PROF[Profile Screen]
HOME --> HC1[Skill Category Cards\nloaded from GET /categories]
HOME --> HC2[Welcome Banner\nDaily Motivation]
HOME --> HC3[Counselling Session Card\nloaded from GET /wellness/counselling]
HOME --> HC4[Daily Challenge Card]
HOME --> HC5[Safety Story\nChoice Scenario]
HOME --> HC6[Parent Preview Panel]
LEARN --> LC1[Search + Filter Chips]
LEARN --> LC2[Course Cards\nloaded from GET /users/id/courses\nshows real progress bars]
LEARN --> LC3[Course Detail Preview\nVideos · Notes · Quiz · Certificate]
EVENTS --> EC1[Event List\nquiz events · daily challenges · drives]
EVENTS --> EC2[Event Detail\nregistration · attached quiz]
EVENTS --> EC3[Admin Event Pipeline\nquiz setup · selection · rewards]
WELL --> WC1[Emergency Help Card\nCall button]
WELL --> WC2[Action Grid\nBook · Mentor · Chat · Video]
WELL --> WC3[Session Booking Flow\nTopic → Counsellor → Slot → Confirm]
WELL --> WC4[Protection Lesson Card]
PROF --> PC1[Profile Hero Card\nloaded from GET /users/id\nname · age · level · XP]
PROF --> PC2[Skill Badges\nloaded from GET /users/id/badges]
PROF --> PC3[Analytics Tiles\nloaded from GET /users/id/stats\nLearning · Growth · Rank]
PROF --> PC4[Counselling History Card]
style LAUNCH fill:#41A7F5,color:#fff
style SHELL fill:#17324D,color:#fff
style HOME fill:#DDF1FF
style LEARN fill:#E0F8E8
style EVENTS fill:#FFE7C8
style WELL fill:#FFDCDC
style PROF fill:#E9E2FF
Loading
Database Schema
erDiagram
USERS {
int id PK
string name
int age
int level
int xp
string parent_email
datetime created_at
}
SKILL_CATEGORIES {
int id PK
string title
string icon_name
string color_hex
}
COURSES {
int id PK
string title
string duration
string level
string icon_name
string color_hex
int category_id FK
}
USER_COURSE_PROGRESS {
int id PK
int user_id FK
int course_id FK
float progress
bool completed
datetime last_accessed
}
COUNSELLING_SESSIONS {
int id PK
int user_id FK
string counsellor_name
string topic
datetime scheduled_at
string status
string notes
datetime created_at
}
BADGES {
int id PK
string icon_name
string label
string category
}
USER_BADGES {
int id PK
int user_id FK
int badge_id FK
datetime earned_at
}
USERS ||--o{ USER_COURSE_PROGRESS : tracks
COURSES ||--o{ USER_COURSE_PROGRESS : tracked_in
SKILL_CATEGORIES ||--o{ COURSES : groups
USERS ||--o{ GAME_SESSIONS : plays
GAMES ||--o{ GAME_SESSIONS : recorded_in
USERS ||--o{ COUNSELLING_SESSIONS : books
USERS ||--o{ MOOD_LOGS : logs
USERS ||--o{ USER_BADGES : earns
BADGES ||--o{ USER_BADGES : awarded_as
Loading
API Request–Response Flow
sequenceDiagram
participant U as User (tap)
participant W as Flutter Widget
participant S as Service Layer
participant A as ApiClient
participant R as FastAPI Router
participant C as CRUD Layer
participant D as SQLite DB
U->>W: opens screen
W->>S: await CourseService.getUserCourses(1)
S->>A: ApiClient.get("/users/1/courses")
A->>R: HTTP GET /users/1/courses
R->>C: course_crud.get_user_course_progress(db, 1)
C->>D: SELECT * FROM user_course_progress WHERE user_id=1
D-->>C: rows
C-->>R: List[UserCourseProgress]
R-->>A: JSON array
A-->>S: parsed Map<String,dynamic>
S-->>W: List[Course] with real progress
W-->>U: renders CourseCard widgets with live progress bars
Loading
Backend Layer Diagram
flowchart LR
subgraph Request
HTTP[HTTP Request\nGET · POST · PUT · PATCH]
end
subgraph FastAPI App
direction TB
RO[Routers\nRoute definitions\nDependency injection]
SC[Pydantic Schemas\nInput validation\nOutput serialisation]
CR[CRUD Functions\nPure DB operations\nNo business logic in routes]
RO --> SC --> CR
end
subgraph Data Layer
direction TB
ORM[SQLAlchemy Models\nUser · Course · Event · Quiz\nCounsellingSession\nBadge · UserBadge]
DB[(SQLite\ncareskill.db)]
ORM --> DB
end
HTTP --> RO
CR --> ORM
style HTTP fill:#41A7F5,color:#fff
style DB fill:#17324D,color:#fff
cd backend
# Create virtual environment with Python 3.11
uv venv .venv --python python3.11
# Install dependencies
uv pip install -r requirements.txt --python .venv/bin/python
# Seed the database with demo data (run once)
.venv/bin/python seed.py
# Start the API server
.venv/bin/uvicorn app.main:app --reload --host 0.0.0.0 --port 8000
The API is now running at http://localhost:8000.
Interactive docs: http://localhost:8000/docs
3 — Flutter setup
# From project root
flutter pub get
flutter run
4 — Android emulator note
When running on an Android emulator, localhost inside the emulator refers to the emulator itself, not your machine. Change the base URL in lib/services/api_client.dart: