Skip to content

sidx007/Alfred

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

50 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ¦‡ Alfred

Your AI-Powered Knowledge Butler

Capture everything. Forget nothing. Let Alfred handle the rest.

React Native Expo Appwrite Gemini Qdrant

Demo (Mobile) Β· Demo (Web)


✨ What is Alfred?

Alfred is an AI-powered personal knowledge management and learning assistant, themed after Alfred Pennyworth β€” Batman's ever-reliable butler. It captures your daily insights from text, audio, and images, automatically organizes them into a searchable knowledge base, generates spaced-repetition revision reports, and provides a conversational AI chat interface.

"I trust you'll find everything in order, sir. Your memories, neatly catalogued and ready for review."


🎯 Features

Feature Description
πŸ“ Multi-Modal Capture Type notes, record/upload audio, snap/upload images β€” all from a gesture-driven mobile app
🧠 AI Processing Pipeline Transcription, OCR, semantic clustering, topic classification, web research enrichment, and vector embedding β€” fully automated
πŸ” Spaced Repetition Reports Daily pipeline retrieves chunks from 1, 3, 5, and 7 days ago, grouped by topic, written in Alfred's signature tone
πŸƒ Flashcards Anki-style cards with Again / Good / Easy grading, generated from your captured knowledge
πŸ’¬ RAG Chat Ask Alfred anything β€” semantic search retrieves relevant memories and knowledge for context-aware answers
πŸŽ™οΈ Voice & Live Chat Multimodal audio input and real-time bidirectional voice streaming via Gemini
🌐 Web Dashboard Browse topics, view revision summaries, generate custom reports, and chat with your knowledge base
πŸ”„ Resilient Uploads Exponential backoff, per-step progress tracking, and resumable pipelines β€” no upload is ever lost

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                        USER INTERFACE                           β”‚
β”‚                                                                 β”‚
β”‚   πŸ“± Mobile App                    🌐 Web Dashboard             β”‚
β”‚   React Native / Expo              Vanilla JS + Express + Vite  β”‚
β”‚   β€’ Text / Audio / Image capture   β€’ RAG Chat & Voice Chat      β”‚
β”‚   β€’ Flashcards & Checklist         β€’ Topic Browser & Reports    β”‚
β”‚   β€’ Upload Queue with retry        β€’ Live Voice (WebSocket)     β”‚
β”‚                                                                 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                       β”‚                      β”‚
                       β–Ό                      β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                   APPWRITE CLOUD FUNCTIONS                      β”‚
β”‚                        (Python)                                 β”‚
β”‚                                                                 β”‚
β”‚   audioFunction ──► clusteringFunction ──► processSegmentFunctionβ”‚
β”‚   imageFunction β”€β”˜                         β”‚                    β”‚
β”‚                                            β”œβ”€β–Ί vectorEmbedFunction
β”‚                                            └─► reportGeneratorFunction
β”‚                                                                 β”‚
β”‚   dailyReportPipelineFunction  Β·  customReportFunction          β”‚
β”‚   revisionChunksFunction       Β·  vectorRetrieveFunction        β”‚
β”‚                                                                 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                               β”‚
                               β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                      QDRANT CLOUD                               β”‚
β”‚                  Vector Database (3072-dim)                      β”‚
β”‚                                                                 β”‚
β”‚   memory Β· knowledge_base Β· topics Β· daily report               β”‚
β”‚   previous reports Β· flashcards                                 β”‚
β”‚                                                                 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ€– Multi-LLM Architecture

Alfred uses the right model for each task:

Task Model Why
Speech-to-Text Deepgram Nova-3 Industry-leading ASR accuracy and speed
Image OCR OCR.space Reliable OCR with progressive compression fallback
Semantic Clustering Groq / Llama 3.3 70B Fast inference for chunking long-form text
Topic Classification Groq / Llama 3.1 8B Lightweight, low-latency labeling
Report Generation Google Gemini 2.5 Flash High-quality long-form writing with personality
Web Research Gemini 2.5 Flash + Google Search Grounded answers with real-time web data
Voice Input Gemini 2.5 Flash Native multimodal audio understanding
Live Voice Streaming Gemini 2.0 Flash Real-time bidirectional WebSocket streaming
Vector Embeddings Gemini Embedding 001 3072-dim embeddings for semantic search

πŸš€ Getting Started

Prerequisites

  • Node.js (v18+)
  • Expo CLI
  • Python 3.x (for Appwrite functions)
  • API keys for: Deepgram, OCR.space, Google Gemini, Groq, Qdrant Cloud

Mobile App

# Install dependencies
npm install

# Start the Expo development server
npx expo start

Open on a development build, Android emulator, iOS simulator, or Expo Go.

Web Dashboard

cd website
npm install
node server.js

Appwrite Functions

Each function in the appwrite/ directory has its own requirements.txt. Deploy them to Appwrite Cloud or a self-hosted Appwrite instance.


πŸ“ Project Structure

alfred/
β”œβ”€β”€ app/                          # Expo Router screens
β”‚   β”œβ”€β”€ index.tsx                 # Home β€” card carousel + upload
β”‚   β”œβ”€β”€ checklist.tsx             # Daily task checklist
β”‚   └── _layout.tsx               # Root layout + gesture navigation
β”œβ”€β”€ components/                   # Reusable UI components
β”‚   β”œβ”€β”€ AudioPickerSheet.tsx      # Audio record/upload bottom sheet
β”‚   β”œβ”€β”€ ImagePickerSheet.tsx      # Camera/gallery bottom sheet
β”‚   β”œβ”€β”€ TextInputModal.tsx        # Text note input modal
β”‚   β”œβ”€β”€ FlashcardsPanel.tsx       # Anki-style flashcard viewer
β”‚   β”œβ”€β”€ ChecklistPanel.tsx        # Daily revision checklist
β”‚   β”œβ”€β”€ UploadStatusButton.tsx    # Floating upload progress pill
β”‚   └── UploadDetailModal.tsx     # Per-step upload progress modal
β”œβ”€β”€ services/                     # API & upload logic
β”‚   β”œβ”€β”€ api.ts                    # Processing pipeline orchestration
β”‚   β”œβ”€β”€ alfredApi.ts              # Alfred API client
β”‚   β”œβ”€β”€ appwrite.ts               # Appwrite SDK config
β”‚   └── uploadQueue.ts            # Resilient job queue with retry
β”œβ”€β”€ context/
β”‚   └── UploadContext.tsx          # Global upload state management
β”œβ”€β”€ constants/                    # Theme, layout, item configs
β”œβ”€β”€ website/                      # Web dashboard
β”‚   β”œβ”€β”€ server.js                 # Express + WebSocket server
β”‚   └── src/                      # Frontend (Vite + vanilla JS)
β”œβ”€β”€ appwrite/                     # Serverless cloud functions
β”‚   β”œβ”€β”€ audioFunction/            # Deepgram transcription
β”‚   β”œβ”€β”€ imageFunction/            # OCR.space processing
β”‚   β”œβ”€β”€ clusteringFunction/       # Semantic text chunking
β”‚   β”œβ”€β”€ processSegmentFunction/   # Topic + research + embedding
β”‚   β”œβ”€β”€ vectorEmbedFunction/      # Qdrant vector storage
β”‚   β”œβ”€β”€ vectorRetrieveFunction/   # Semantic search
β”‚   β”œβ”€β”€ reportGeneratorFunction/  # Alfred-persona reports
β”‚   β”œβ”€β”€ dailyReportPipelineFunction/ # Spaced-repetition orchestrator
β”‚   β”œβ”€β”€ customReportFunction/     # On-demand topic briefings
β”‚   └── revisionChunksFunction/   # Historical chunk retrieval
└── assets/                       # Fonts & images

πŸ§ͺ How It Works

  User captures text / audio / image
           β”‚
           β–Ό
  Upload enters resilient job queue
  (exponential backoff, resumable state)
           β”‚
           β–Ό
  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”
  β”‚ Audio?           β”‚ Image?
  β”‚ Deepgram Nova-3  β”‚ OCR.space
  β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
           β”‚
           β–Ό
  Semantic clustering (Llama 3.3 70B)
  Text β†’ coherent segments
           β”‚
           β–Ό
  Per-segment processing:
  β”œβ”€ Topic classification (Llama 3.1 8B)
  β”œβ”€ Deduplication (deterministic UUID5)
  β”œβ”€ Web research (Gemini + Google Search)
  β”œβ”€ Embedding (Gemini Embedding 001)
  └─ Store in Qdrant (memory + knowledge_base + topics)
           β”‚
           β–Ό
  Daily spaced-repetition pipeline:
  Chunks from 1 / 3 / 5 / 7 days ago
  β†’ Grouped by topic β†’ Alfred-persona reports
           β”‚
           β–Ό
  Flashcards, checklist, RAG chat, voice chat
  All powered by semantic search over Qdrant

🎩 The Alfred Touch

Report generation randomly selects from 8 distinct Alfred Pennyworth personality tones β€” from "witty and eloquent" to "crisp and commanding" β€” ensuring your daily revision never feels stale.

"Shall I remind you, sir, that you studied distributed systems three days ago and appear to have retained absolutely none of it? Allow me to refresh your memory."


πŸ“„ License

This project was built for the DEV Weekend Challenge: Community.


Built with πŸ¦‡ by sidx007

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages