Skip to content
Spathneja21Public

About

SAARTHI (Smart AI Assistant for Tasks Handling & Information) is your own AI assistant which helps you manage your tasks according to your comfort and conditions.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

79 Commits

Folders and files

Repository files navigation

SAARTHI, with Enzo, Saarthi's assistant

Smart Automated Assistant for Routine Task Handling & Intelligent scheduling

The planner that decides when your work happens, and learns how you work.

Flutter Dart FastAPI PostgreSQL OR-Tools Firebase
Platforms Version Status

The launch animation: Enzo reads the words Saarthi stands for, goes past SAARTHI, does a double take, and SAARTHI lifts out in orange   Today page with the clock and today's progress   Timeline with classes and colour-coded task sessions   Chatting with Enzo, who asks before adding a task


What is Saarthi?

Most to-do apps give you a list and leave the hard part to you: fitting the work into your week. Saarthi does that part.

You tell it what needs doing (how long, how much energy it takes, when it's due) and the weekly things that never move, like classes, work and sleep. A constraint solver then places every task into the gaps, splits long work into sessions with breaks, and puts demanding work at the hours you're sharpest. As you start, finish, move or skip sessions, a learning model picks up when you actually get things done, so the next plan fits you better.

Saarthi (सारथी) means charioteer: the one who steers, so you can focus on the work.

Meet Enzo

Enzo cycling through his faces: idle, happy, surprised, love, a question, and done

Enzo is Saarthi's face and its assistant: an orange screen-head drawn entirely in code, whose expressions come from his pixel screen and the way his head moves. He looks at what you're doing, nods when he talks, celebrates finished work, and looks worried when a plan doesn't fit.

  • Talk to him: type or speak in the chat, or hold him on the Home screen to talk walkie-talkie style. He understands everyday language ("move my gym to tomorrow evening", "how's my week looking?").
  • He always asks first: commands come back as a Yes / No question, and nothing changes until you answer.
  • He's on your home screen: an "Ask Enzo" widget on iOS and Android, with a mic that opens the chat already listening.

Features

🗓️ Planning that fits your life

  • One-tap planning with a CP-SAT solver: deadlines first, then everything else, around your fixed week.
  • Sessions with breaks: long tasks are split into focused chunks.
  • Energy-aware: demanding work lands at your peak hours, light work in the dips.
  • Google Calendar (read only): your events become busy time the planner works around. You choose which calendars count; titles never leave the phone.
  • Sleep-aware: your sleep window stays free.

✅ Staying on track

  • Live timeline: sessions in their category colour, with a "Now" outline and a live line for the current minute.
  • Needs attention: missed sessions, passed deadlines and plans that don't fit, each with a one-tap fix.
  • Missed a session? Only that part is rescheduled; the rest of your plan stays put.
  • Reminders: before sessions, check-ins when they end, deadline warnings, a morning briefing and an evening wrap-up, with quiet hours.

🧠 Learns how you work

  • Slot bandit: Thompson sampling over start hours, rewarded by what you actually finish, move or drop.
  • Energy curves that adjust to when your work actually gets done.
  • XGBoost + LightGBM models that score how likely a task is to get done at a given hour, and its procrastination risk.
  • Insights on how your estimates compare with reality.

✨ Made with care

  • Dark by default, light if you prefer; the choice is remembered.
  • Accessible: Reduce Motion respected everywhere, large text that doesn't break layouts, screen-reader labels.
  • A splash with a story: Enzo reads the words Saarthi stands for, overshoots, does a double take, and lands on SAARTHI.
  • In-app updates on Android: new versions are offered on launch.

Insights in light mode: 90% of tasks finished, this week's progress and the energy curve   Adding a fixed weekly slot, in light mode: a task name, a start time and a duration   The Ask Enzo widget on the iPhone home screen   Settings grouped into Planning, Notifications, Help and About

Insights and adding a fixed slot, in light mode · the Ask Enzo widget · Settings

How it works

flowchart LR
    A["📝 Tasks<br/>chat · voice · form"] --> B["🧩 CP-SAT solver<br/>deadlines first"]
    F["📅 Fixed week<br/>classes · sleep · calendar"] --> B
    B --> C["🗓️ Sessions<br/>on your timeline"]
    C --> D["⏱️ You work<br/>start · done · move · skip"]
    D --> E["🎯 Outcomes<br/>rewards & penalties"]
    E --> G["🧠 Slot bandit<br/>+ energy curves"]
    G -->|better hours next time| B
Loading
  1. Tasks come in through the chat (typed or spoken), the task form, or the API, each with a duration, an energy level, a priority and an optional deadline.
  2. The solver plans deadline work first with OR-Tools CP-SAT, then fills the remaining free time, scoring every candidate hour with energy curves, the learned time-of-day preferences and the ML models.
  3. You work the plan. Starting, finishing, moving, skipping or abandoning a session is recorded on the server.
  4. Outcomes become rewards. A task finished at the planned hour scores higher than one that had to be moved; dropped work scores negatively. The slot bandit and energy curves update, and the next plan leans toward the hours that worked.

Interactive explainers

Three companion pages walk through the backend's logic in depth. Each opens in your browser, and two are interactive.

Explainer What it covers
🗺️ SAARTHI Intent Map A case-by-case reference for how the task endpoints connect: each endpoint's decision tree, the slot bandit's reward for every outcome, and the task lifecycle from draft to completed.
🧭 Saarthi Pipeline Atlas One example day traced through the whole V1.3.0 backend: inputs, the CP-SAT planning run, reminders and outcome tracking, and the learning that adjusts future plans. Includes a file map, the database tables and a "try it" section.
🦉 Night Owl Simulator An interactive simulation of a user who works best at 22:00, showing day by day how the slot bandit, slot scores and energy curve learn where to place their work.

Architecture

flowchart TB
    subgraph Phone["📱 Flutter app (iOS · Android)"]
        UI["Screens · Provider stores"]
        W["Home-screen widget"]
    end
    subgraph Server["☁️ AURA backend (AWS EC2, Docker)"]
        Caddy["Caddy<br/>HTTPS"] --> API["FastAPI"]
        API --> Solver["CP-SAT solver<br/>(OR-Tools)"]
        API --> ML["Slot bandit · energy curves<br/>XGBoost · LightGBM"]
        API --> DB[("PostgreSQL")]
        Worker["Celery worker + beat"] --> DB
        Worker --> Redis[("Redis")]
    end
    FB["🔐 Firebase Auth"]
    LLM["💬 Gemini<br/>(+ fallback model)"]

    UI -- "HTTPS + Firebase ID token" --> Caddy
    W -- "saarthi://chat" --> UI
    UI -- "sign in" --> FB
    API -- "verify token" --> FB
    API -- "understand messages" --> LLM
Loading
  • The app holds no scheduling logic. Every task, commitment and session lives in PostgreSQL, scoped to the signed-in Firebase account; the phone renders and acts.
  • Auth is Firebase end to end. The app signs in with Firebase, and the backend verifies the same ID token with the Firebase Admin SDK on every request.
  • Enzo's understanding runs on the server (/voice/understand → a reply, or a question; /voice/confirm → the answer). Commands never run without a Yes.
  • Background work (reminders, model retraining, nightly rewards) runs on Celery with Redis.

Tech stack

Layer Technology
App Flutter 3.47 · Dart 3.10 · Provider · speech_to_text · flutter_tts · flutter_local_notifications · device_calendar_plus · app_links
Widget SwiftUI WidgetKit extension (iOS) · AppWidgetProvider + RemoteViews (Android)
Backend FastAPI · SQLAlchemy · PostgreSQL · Redis · Celery
Planning Google OR-Tools (CP-SAT)
Learning Thompson-sampling slot bandit · energy curves · XGBoost · LightGBM · scikit-learn
Language Gemini, with a fallback model for unsure commands
Auth & telemetry Firebase Auth · Firebase Analytics · Crashlytics (no task titles or message text are ever sent)
Hosting AWS EC2 · Docker Compose · Caddy (automatic HTTPS) · DuckDNS
Type Bricolage Grotesque (display) · Geist (text), both bundled under the SIL OFL

Repository layout

SAARTHI/
├── SAARTHI V1.3.0/          ← current version
│   ├── app files/           Flutter app (iOS, Android), widget extensions, tests
│   └── backend/             AURA: FastAPI, solver, ML, Celery, deploy/ bundle
├── SAARTHI V1.2.0/          earlier versions, kept for reference
├── SAARTHI V1.1.0/
└── docs/                    README images: brand/ (animated SVGs), screenshots/

Each side has its own detailed guide: app files/README.md and backend/README.md. Design decisions are logged phase by phase in backend/docs/INTEGRATION_LOG.md.

Getting started

Run it locally (backend in Docker, app on a simulator or phone)

1. Backend

cd "SAARTHI V1.3.0/backend"
cp .env.example .env          # fill in the values; see backend/README.md
# put the Firebase Admin key at secrets/firebase-service-account.json (see secrets/README.md)
docker compose up -d          # API, Postgres, Redis, Celery worker and beat
curl http://localhost:8000/   # {"message": "AURA is alive"}

2. App

cd "SAARTHI V1.3.0/app files"
flutter pub get
flutter run                   # iOS Simulator reaches the Mac at localhost:8000

On a physical phone, point the app at your machine (or a server) at build time:

flutter run --release --dart-define=AURA_API_BASE_URL=http://<your-mac>.local:8000

The Android emulator reaches the host at 10.0.2.2:8000 automatically.

Deploy to a server (AWS EC2 + HTTPS)

Everything for production is in backend/deploy/: a production Compose file, a Caddyfile for automatic HTTPS, a one-time bootstrap.sh (swap, Docker, firewall, DuckDNS updater, nightly database backups) and deploy.sh, which copies everything to the box and starts the stack. Step-by-step instructions are in deploy/README.md.

The Android release is built with tool/release_android.sh, which builds a signed APK against the production URL and refreshes the download page. Installed apps offer new versions on their next launch.

Privacy

  • Your data is yours: tasks and plans are tied to your Firebase account and are visible only to you.
  • Calendar stays on the phone: only event times are sent, so the planner can avoid them. Titles, places and guests never leave the device.
  • Telemetry is anonymous: usage events carry outcomes only, never task titles or what you said to Enzo.
  • No secrets in this repository: API keys, the Firebase Admin key and signing keys are kept out of git.

The full privacy policy and terms ship with the app's download page.

Team

Ashmeen · Sahil · Shabd · Shreya · Shubham


Made with ☕ and a lot of re-planning by Team Saarthi.

Fonts: Bricolage Grotesque and Geist, under the SIL Open Font License. The animations in docs/brand/ are drawn from Enzo's real geometry, with text as outlines of the app's own fonts.

About

SAARTHI (Smart AI Assistant for Tasks Handling & Information) is your own AI assistant which helps you manage your tasks according to your comfort and conditions.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages