DillyDally is a next-generation, AI-powered Pomodoro system that doesn't just track how long you worked, but how well you worked. Traditional productivity timers assume that time spent = progress. But in a world of constant interruptions, simply measuring time is no longer enough.
DillyDally passively monitors subtle indicators of attention (like tab switching or gaze drift) and uses an LLM to generate a personalized focus report at the end of every work session.
By adding intelligent reflection and personalized analytics to the Pomodoro method, DillyDally helps you understand your distraction patterns and train deeper focus.
- Smart Pomodoro Timer with customizable durations
- Real-time Face Tracking that detects when you look away
- Screen Montioring with data collection and deeper analytics
- AI-powered data analysis
| Layer | Technology |
|---|---|
| Frontend UI | React 19 + TypeScript + Vite |
| Face Tracking | TensorFlow.js + MediaPipe Face Mesh |
| Backend API | Express.js + Node.js |
| Database / Realtime Backend | Convex (Backend-as-a-Service) |
| Authentication | Convex Auth (Password-based) |
| AI Processing | OpenAI |
| File Upload | Multer |
| Dev Utilities | TSX, Concurrently, Turbo, ESLint |
graph TB
subgraph "Client (React + Vite)"
UI[User Interface]
Timer[Pomodoro Timer]
Webcam[Webcam Feed]
FaceTrack[Face Tracking<br/>TensorFlow.js]
ScreenCap[Screen Capture]
UI --> Timer
UI --> Webcam
Webcam --> FaceTrack
Timer --> ScreenCap
end
subgraph "Express Backend"
API[Express API Server]
Multer[File Upload Handler]
OpenAI[OpenAI Integration]
API --> Multer
API --> OpenAI
end
subgraph "Convex Backend"
Auth[Convex Auth]
DB[(Convex Database)]
Funcs[Convex Functions]
Auth --> DB
Funcs --> DB
end
FaceTrack -->|Attention State| Funcs
ScreenCap -->|Screenshots| API
Multer -->|Process Images| OpenAI
OpenAI -->|AI Analysis| Funcs
UI <-->|Real-time Sync| Funcs
Timer <-->|Session Management| Funcs
style UI fill:#17a2b8,color:#fff
style Timer fill:#17a2b8,color:#fff
style API fill:#28a745,color:#fff
style Funcs fill:#ffc107,color:#000
style DB fill:#ffc107,color:#000
style FaceTrack fill:#dc3545,color:#fff
style OpenAI fill:#6f42c1,color:#fff
DillyDally/
├── convex/ # Shared Convex backend functions
│ ├── schema.ts # Database schema
│ ├── functions.ts # Query/mutation logic
│ ├── auth.ts # Authentication setup
│ └── tsconfig.json
├── dillydally-frontend/ # React + Vite frontend
│ ├── src/
│ │ ├── App.tsx
│ │ ├── components/ # UI Components
│ │ ├── utils/ # Face tracking utilities
│ │ └── main.tsx
│ └── vite.config.ts
├── dillydally-express/ # Express.js backend server
│ ├── src/index.ts
│ ├── package.json
│ └── tsconfig.json
├── package.json # Workspace configuration
└── vercel.json # Deployment config
npm installnpx convex devThis will:
- Prompt GitHub login
- Create
.env.localwithCONVEX_URL - Generate
/convex/_generatedtypes
Root .env.local:
CONVEX_URL=<your-convex-url>
OPENAI_API_KEY=<your-openai-key>dillydally-frontend/.env.local:
VITE_CONVEX_URL=<your-convex-url>
VITE_EXPRESS_URL=http://localhost:3001dillydally-express/.env.local:
CONVEX_URL=<your-convex-url>
OPENAI_API_KEY=<your-openai-key>
PORT=3001npm run dev| Service | URL |
|---|---|
| Frontend | http://localhost:5173 |
| Backend API | http://localhost:3001 |
| Convex dev server | Cloud-hosted |
npx convex dev
npm run dev --workspace=dillydally-frontend
npm run dev --workspace=dillydally-expressUpload a screenshot for AI analysis.
Request:
- Content-Type:
multipart/form-data - Body:
image: Screenshot filets: TimestampsessionId: Session identifier
Response:
{
"success": true,
"message": "Screenshot processed",
"analysis": {
"activity": "Coding",
"isProductive": true,
"summary": "Working on React components"
}
}users // Auth users
sessions // Focus sessions
snapshots // Screenshot analysis results
cameraSnapshots // Face tracking attention states
tasks // Todo itemscurrentUser: Get authenticated userstartSession: Create new focus sessioncreateSnapshot: Save screenshot analysiscreateCameraSnapshot: Save attention stategetSessionActivities: Get unique activities per session
| Task | Work In |
|---|---|
| UI + Interactions | dillydally-frontend/src/ |
| API logic | dillydally-express/src/ |
| Database / backend logic | convex/ |
Convex automatically syncs & regenerates types live.
| Issue | Fix |
|---|---|
CONVEX_URL missing |
Ensure npx convex dev was run once |
| Missing Convex types | Run Convex dev server |
| Express cannot connect | Ensure .env.local exists in repo root |
| Ports in use | Change via Vite config or PORT env var |
| Face tracking not working | Allow webcam permissions in browser |
| Screenshots not uploading | Check Express server is running on port 3001 |
npm run buildThe vercel.json is configured for monorepo deployment.
npm run build --workspace=dillydally-express
npm run start --workspace=dillydally-expressnpx convex deployBuilt with intention, curiosity, and deep work energy! HackPrinceton 2025 :)


