An AI-powered cognitive load reduction assistant with an animated CSS cat companion
Pebble helps neurodivergent users (ADHD, autism, dyslexia) manage tasks, simplify documents, and stay focused through a calm, supportive interface.
|
|
|
|
|
|
The project has two main components:
| Layer | Stack | Directory |
|---|---|---|
| 🖥️ Frontend | Next.js 16, React 19, TypeScript, Tailwind CSS 4 | pebble/ |
| ⚙️ Backend | FastAPI, Python 3.12+, Microsoft Foundry, Cosmos DB | backend/ |
All agents are orchestrated through Microsoft Foundry using Semantic Kernel and Foundry Models (GPT-4o).
| Agent | Role |
|---|---|
| 🧠 Pebble Orchestrator | Classifies user intent and routes to the right agent |
| 🧩 CalmSense | Task decomposition with time-boxed subtasks |
| 📖 SimplifyCore | Document simplification at target reading levels |
| 💬 PebbleVoice | Personalized encouragement (never generic platitudes) |
| 🔄 AdaptLens | User preference adaptation over time |
| ❓ WhyBot | Explainability generation for every AI decision |
| 🔗 BridgeBot | Third-party integrations (Teams, Outlook, Slack, etc.) |
| Service | Purpose |
|---|---|
| Microsoft Foundry | AI platform — agent orchestration, Foundry Models (GPT-4o), and inference |
| Foundry Tools — Content Safety | Input/output safety filtering (severity ≥ 2 = rejected) |
| Foundry Tools — Document Intelligence | PDF/Word document parsing |
| Foundry Tools — Immersive Reader | Text-to-speech, syllable highlighting, line focus |
| Azure AI Search | Vector indexing and RAG queries |
| Azure Cosmos DB | NoSQL storage for all collections |
| Microsoft Entra ID | JWT authentication |
| Azure Blob Storage | Document file uploads |
| Azure Web PubSub | Real-time WebSocket for focus rooms |
| Azure Monitor — Application Insights | Telemetry and audit logging |
Note: The platform formerly known as Azure AI Services / Azure Cognitive Services is now Foundry Tools under the unified Microsoft Foundry platform. See What is Microsoft Foundry? for details.
| Requirement | Version |
|---|---|
| Node.js | 18+ |
| Python | 3.12+ |
| Conda | Install guide |
| Azure account | With services provisioned (see backend setup) |
cd pebble
npm install
npm run devThe frontend runs at http://localhost:3000. No environment variables or external services needed — all features work standalone with sample data.
| Command | Description |
|---|---|
npm run dev |
Development server with hot reload |
npm run build |
Production build (catches TypeScript errors) |
npm run lint |
ESLint check |
npm start |
Serve production build |
# 1. Create and activate environment
conda create -n focusbuddy python=3.12 -y
conda activate focusbuddy
# 2. Install dependencies
cd backend
pip install -r requirements.txt
# 3. Configure credentials
cp .env.example .env
# Edit .env with your Azure credentials
# 4. Start the server
uvicorn app.main:app --port 8000 --reloadThe API runs at http://localhost:8000. Swagger docs at http://localhost:8000/docs.
The server starts gracefully even without all Azure credentials configured — unconfigured services are skipped.
In two terminals:
# Terminal 1 — Backend
conda activate focusbuddy
cd backend
uvicorn app.main:app --port 8000 --reload
# Terminal 2 — Frontend
cd pebble
npm run dev| URL | |
|---|---|
| Frontend | http://localhost:3000 |
| Backend API | http://localhost:8000 |
| Swagger Docs | http://localhost:8000/docs |
Focusbuddy/
├── 🖥️ pebble/ # Frontend (Next.js)
│ ├── src/
│ │ ├── app/ # App Router pages (/today, /documents, /activity, /focus, /settings)
│ │ ├── components/ # UI components (pebble models, tasks, documents, focus, chat, settings)
│ │ ├── contexts/ # React context providers (preferences, pebble, tasks, activity, toast)
│ │ ├── hooks/ # Custom hooks (localStorage, timeOfDay, reduceMotion, focusOnNav)
│ │ ├── data/ # Sample data (tasks, documents, activity, pebble messages)
│ │ └── lib/ # Types, constants, API client, utilities
│ └── public/ # Static assets (backgrounds, icons)
├── ⚙️ backend/ # Backend API (FastAPI)
│ ├── app/
│ │ ├── main.py # App creation, middleware, router registration
│ │ ├── config.py # Settings from .env
│ │ ├── agents/ # AI agent implementations (orchestrator + specialized agents)
│ │ ├── models/ # Pydantic request/response schemas
│ │ ├── routers/ # API route handlers (/api/*)
│ │ └── services/ # Azure & Foundry service clients
│ ├── requirements.txt
│ └── .env.example
├── 📐 docs/
│ ├── architecture.png # System architecture diagram
│ └── Pebble_Original_English.pptx # Presentation slides
└── README.md
See backend/README.md for full API endpoint documentation.
| Endpoint | Description |
|---|---|
GET/POST /api/tasks |
Task CRUD |
GET/PUT /api/preferences |
User preferences |
GET/POST /api/activity |
Activity log |
POST /api/agents/* |
AI agents — decompose, simplify, motivate, chat |
POST /api/documents/* |
Upload, parse, simplify, extract, RAG search |
GET/POST /api/focus/rooms |
Focus rooms with Pomodoro timer |
GET /api/audit |
Agent decision audit trail |
| Principle | Details |
|---|---|
| 🌙 Dark mode only | Background #0F0D0A, no light theme |
| 🧘 No anxiety-inducing patterns | No streaks, no "days missed", no red badges, no shame language |
| 🤖 Responsible AI | Every AI decision has an explainability card; Content Safety filtering on all agent I/O |
| ♿ Accessibility first | Reduce animations, calm mode, reading level slider, keyboard navigation |
| 🎨 Pure CSS character | All 7 Pebble models use divs with border-radius, no SVGs or images |
See LICENSE for details.
