https://github.com/rohitprasad-code/digital.me
An AI agent mirroring my life and work by syncing Strava, LinkedIn, and personal data into a conversational twin.
https://github.com/rohitprasad-code/digital.me
digital-twin nextjs ollama strava-api
Last synced: 4 months ago
JSON representation
An AI agent mirroring my life and work by syncing Strava, LinkedIn, and personal data into a conversational twin.
- Host: GitHub
- URL: https://github.com/rohitprasad-code/digital.me
- Owner: rohitprasad-code
- License: mit
- Created: 2026-02-03T20:43:02.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2026-03-03T19:32:28.000Z (4 months ago)
- Last Synced: 2026-03-03T23:20:52.784Z (4 months ago)
- Topics: digital-twin, nextjs, ollama, strava-api
- Language: TypeScript
- Homepage:
- Size: 1.1 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Digital Me
Digital Me is an AI-powered personal digital twin. It's designed to ingest your personal data (resume, GitHub activity, etc.) and use a local LLM (via Ollama) to answer questions as if it were you.
## Features
| Category | Details |
| ----------------------------- | ---------------------------------------------------------------------------------------------------------------- |
| **RAG Pipeline** | Retrieval-Augmented Generation grounded in your personal data for accurate, contextual answers |
| **Smart Memory Router** | Keyword & LLM-based query classification across Static, Dynamic, and Conversational memory types |
| **Structure-Aware Ingestion** | Two-stage document pipeline โ parses PDFs & text into structured sections, then chunks with configurable overlap |
| **Multi-Source Data** | Resume (PDF), `me.json` identity config, GitHub (profile + repos + commits), Strava (activities) |
| **CLI Interface** | `chat` and `ingest` commands powered by [Commander](https://github.com/tj/commander.js) |
| **Next.js API** | RESTful chat endpoint with full RAG orchestration |
| **100% Local** | Powered by Ollama (Llama 3) โ your data never leaves your machine |
## ๐๏ธ Architecture
```
โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ
โ CLI Chat โโโโโโถโ Next.js API โโโโโโถโ Ollama (LLM) โ
โโโโโโโโโโโโโโโโ โโโโโโโฌโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ
โ โฒ
โผ โ
โโโโโโโโโโโโโโโโ โโโโโโโดโโโโโโโโ
โ Memory Routerโโโโโโโโโโถโ Vector Storeโ
โโโโโโโโฌโโโโโโโโ โโโโโโโฌโโโโโโโโ
โ โฒ
โโโโโโโโโโโโโโผโโโโโโโโโโโโโ โ
โผ โผ โผ โ
โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโ โ
โ Static โ โ Dynamic โ โ Conversa-โ โ
โ Memory โ โ Memory โ โ tional โ โ
โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโ โ
โ โ โ
โผ โผ โ
โโโโโโโโโโโโ โโโโโโโโโโโโ โ
โResume/PDFโ โ GitHub โ โ
โ me.json โ โ Strava โโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโ โโโโโโโโโโโโ
```
## ๐ Project Structure
```
digital-me/
โโโ app/
โ โโโ api/ # Next.js API route โ chat endpoint + RAG logic
โโโ cli/
โ โโโ index.ts # CLI entrypoint (Commander)
โ โโโ chat.ts # Interactive chat session
โโโ integrations/
โ โโโ github/ # GitHub profile, repos & commit ingestion
โ โโโ strava/ # Strava activity ingestion
โโโ memory/
โ โโโ ingest.ts # Orchestrates full ingestion pipeline
โ โโโ router.ts # MemoryRouter โ routes queries by type
โ โโโ vector_store/ # Embedding storage & cosine similarity search
โ โโโ data_processing/ # Document parsing, structure analysis & chunking
โ โโโ parsers/ # Parsers for PDF, Markdown, JSON and all
โโโ model/
โ โโโ llm/ # Ollama client configuration
โ โโโ prompts/ # System prompts & prompt templates
โโโ public/ # Raw static data sources
โ โโโ codes/ # Structured config (e.g., me.json)
โ โโโ documents/ # PDFs, Markdown, Text (e.g., resume.pdf)
โโโ scripts/
โโโ dev-cli.js # Dev helper for CLI execution
```
## ๐ Prerequisites
- **Node.js** v18+
- **Ollama** installed and running โ pull a model:
```bash
ollama pull llama3
```
- **GitHub Token** โ [Personal Access Token](https://github.com/settings/tokens) with `repo` and `read:user` scopes
- **Strava Token** โ API token with `read`, `activity:read`, `activity:write`, `activity:read_all` scopes
## ๐ Getting Started
### 1. Clone & Install
```bash
git clone https://github.com/yourusername/digital-me.git
cd digital-me
npm install
```
### 2. Configure Environment
Create a `.env.local` file in the project root:
```env
# GitHub integration
GITHUB_TOKEN=your_github_token
GITHUB_USERNAME=your_github_username
# Strava integration
STRAVA_ACCESS_TOKEN=your_strava_token
# Optional: Override API URL
# e.g.:
# DIGITAL_ME_API_URL=http://localhost:7001/api
```
### 3. Prepare Your Data
| File | Purpose |
| -------------------------- | ----------------------------------------------------- |
| `memory/static/resume.pdf` | Your resume (parsed via LLM into structured sections) |
### 4. Run
```bash
# Terminal 1 โ Start the API server
npm run dev
# Terminal 2 โ Ingest your data into the vector store
npm run cli ingest
# Terminal 3 โ Run the scheduler
npm run scheduler
# Terminal 4 โ Start chatting with your digital twin
npm run cli chat
```
## ๐งฐ Available Scripts
| Script | Description |
| -------------------- | --------------------------------------------- |
| `npm run dev` | Start the Next.js dev server |
| `npm run build` | Production build |
| `npm run start` | Start production server |
| `npm run cli ingest` | Ingest all data sources into the vector store |
| `npm run cli sync` | Sync latest changes into vector store |
| `npm run cli chat` | Launch the interactive chat CLI |
| `npm run test` | Run tests with Vitest |
| `npm run lint` | Lint with ESLint |
| `npm run scheduler` | Run the scheduler |
## ๐ฎ Roadmap
- [ ] **More Integrations** โ LinkedIn, Instagram, Google Fit
- [ ] **Dynamic Modes** โ Intent-based persona switching (Recruiter vs. Friend mode)
- [ ] **Rich Responses** โ Serve visual UI components (GitHub stats, heatmaps, activity charts)
- [ ] **Hardware Integration** โ ESP32 sensors for live status, room presence & ambient interaction
- [ ] **Voice Interface** โ Conversational voice input/output
- [ ] **On-Device Inference** โ Run smaller models directly on edge hardware
- [ ] **Agent Scheduling** โ Automated periodic data refresh & proactive notifications