Skip to content
ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

5 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ”ฎ Future Me - AI-Powered GitHub Career Simulator

Chat with your future self based on your GitHub journey using Groq AI, LangChain, and Redis Vector Search

Hey there! ๐Ÿ‘‹ I'm Aziz Zoaib, and I built this Kubernetes-native app that analyzes your GitHub commit history, creates a vector database of your coding journey, and lets you chat with an AI about your future career trajectory.

Python FastAPI LangChain Groq Redis Kubernetes

๐ŸŽฏ What Does It Do?

An intelligent conversational AI that:

  • ๐Ÿ” Analyzes ALL your GitHub repositories and commit history
  • ๐Ÿง  Builds a semantic vector database using Redis Stack + HuggingFace embeddings
  • ๐Ÿ’ฌ Enables RAG-powered conversations with LangChain for context-aware responses
  • ๐Ÿค– Uses Groq's ultra-fast Llama 3 for AI-powered career predictions
  • ๐Ÿ”ฎ Predicts your future development trajectory based on actual coding patterns
  • โšก Delivers lightning-fast responses with session-based chat history

โœจ Key Features

  • ๐ŸŽจ Modern dark-themed chat UI with real-time messaging and typing indicators
  • ๐Ÿง  RAG Architecture - Redis Stack HNSW + HuggingFace embeddings (local, no API costs)
  • ๐Ÿš€ Sub-second responses with Groq's optimized Llama 3 inference
  • ๐Ÿ“Š Smart retrieval - Top-K semantic search across your commit history

๐Ÿ—๏ธ Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   GitHub API     โ”‚
โ”‚   (All Repos +   โ”‚
โ”‚   Commit History)โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
         โ”‚
         โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  Data Ingestion Layer    โ”‚
โ”‚  โ€ข Fetch all repos       โ”‚
โ”‚  โ€ข Collect commits       โ”‚
โ”‚  โ€ข Create documents      โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
         โ”‚
         โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  HuggingFace Embeddings  โ”‚
โ”‚  (sentence-transformers) โ”‚
โ”‚  โ€ข Local processing      โ”‚
โ”‚  โ€ข No external API       โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
         โ”‚
         โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   Redis Stack            โ”‚
โ”‚   โ€ข Vector storage       โ”‚
โ”‚   โ€ข HNSW indexing        โ”‚
โ”‚   โ€ข Semantic search      โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
         โ”‚
         โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   LangChain RAG          โ”‚
โ”‚   โ€ข Context retrieval    โ”‚
โ”‚   โ€ข Prompt engineering   โ”‚
โ”‚   โ€ข Chat history mgmt    โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
         โ”‚
         โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   Groq AI (Llama 3)      โ”‚
โ”‚   โ€ข Ultra-fast inference โ”‚
โ”‚   โ€ข Career predictions   โ”‚
โ”‚   โ€ข Contextual responses โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
         โ”‚
         โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   FastAPI Backend        โ”‚
โ”‚   โ€ข REST API             โ”‚
โ”‚   โ€ข Session management   โ”‚
โ”‚   โ€ข Static file serving  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
         โ”‚
         โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   Chat UI (HTML/JS)      โ”‚
โ”‚   โ€ข Modern dark theme    โ”‚
โ”‚   โ€ข Real-time messaging  โ”‚
โ”‚   โ€ข Responsive design    โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ› ๏ธ Tech Stack

Frontend: HTML5/CSS3/JavaScript โ€ข Backend: FastAPI โ€ข AI: Groq (Llama 3 70B) + LangChain
Vector DB: Redis Stack โ€ข Embeddings: HuggingFace Transformers โ€ข Orchestration: Kubernetes

๐Ÿ“‹ Prerequisites

  • Kubernetes cluster (Kind, minikube, GKE, EKS, AKS)
  • Docker 20.10+ and kubectl configured
  • 8GB+ RAM recommended
  • Groq API Key (14,400 free requests/day)
  • GitHub Personal Access Token (scopes: repo, read:user)

โšก Quick Start

Step 1: Clone Repository

git clone https://github.com/azizzoaib786/future-me.git
cd future-me

Note: Feel free to fork this repo and customize it for your own GitHub analysis!

Step 2: Create Kind Cluster (Optional)

If you don't have a Kubernetes cluster, create one with Kind:

# Install Kind (if not already installed)
# macOS
brew install kind

# Linux
curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.20.0/kind-linux-amd64
chmod +x ./kind
sudo mv ./kind /usr/local/bin/kind

# Create cluster using provided config
kind create cluster --config cluster/future-me-cluster.yaml --name future-me

# Verify cluster is running
kubectl cluster-info --context kind-future-me
kubectl get nodes

Skip this step if you're using an existing cluster (minikube, GKE, EKS, AKS, etc.)

Step 3: Build Application Image

# Build Docker image
cd app
docker build -t future-me/app:latest .

# For Kind cluster - load image locally (skip for cloud clusters)
kind load docker-image future-me/app:latest --name future-me

# For cloud clusters - push to your registry
# docker tag future-me/app:latest your-registry/future-me:latest
# docker push your-registry/future-me:latest

Step 4: Configure Secrets

Edit k8s/future-me-secrets.yaml with your API keys:

stringData:
  groq-api-key: "your_groq_api_key_here"
  github-token: "your_github_token_here"

โš ๏ธ Security Warning: Never commit real secrets to Git! Use this for local development only.

Alternatively, create secrets via kubectl:

kubectl create secret generic future-me-secrets \
  --from-literal=groq-api-key="your_groq_api_key" \
  --from-literal=github-token="your_github_token" \
  --namespace=future-me

Step 5: Deploy to Kubernetes

# Deploy Redis Stack (vector database)
kubectl apply -f k8s/redis-stack.yaml

# Wait for Redis to be ready
kubectl wait --for=condition=ready pod -l app=redis-stack -n future-me --timeout=60s

# Deploy secrets
kubectl apply -f k8s/future-me-secrets.yaml

# Deploy main application
kubectl apply -f k8s/future-me-deployment.yaml

# Wait for application to be ready (this may take 2-3 minutes on first run)
kubectl wait --for=condition=ready pod -l app=future-me-app -n future-me --timeout=300s

Step 6: Access the Application

# Port forward to local machine
kubectl port-forward service/future-me-app 8000:8000 -n future-me

# Open in your browser:
# http://localhost:8000

Step 7: Start Chatting!

Ask questions like:

  • "Based on my GitHub activity, what will I be working on in 1 year?"
  • "What programming languages should I learn next?"
  • "What are my strongest technical skills?"

๐Ÿ”ง Configuration

Edit k8s/future-me-deployment.yaml to customize:

Variable Default Description
GROQ_API_KEY Required Groq API key (from secrets)
GITHUB_TOKEN Required GitHub PAT (from secrets)
GITHUB_MAX_COMMITS 100 Max commits to analyze across all repos
FUTURE_ME_NAME "Aziz" Your name (change this!)
FUTURE_ME_YEARS_AHEAD 1 Years to project into future

Example customization:

env:
  - name: GITHUB_MAX_COMMITS
    value: "500"
  - name: FUTURE_ME_NAME
    value: "YourName"

๐Ÿ—๏ธ Project Structure

future-me/
โ”œโ”€โ”€ ๐Ÿ“ app/                           # Application source code
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ app.py                     # FastAPI app (GitHub API, LangChain RAG, Redis, Groq AI, Chat endpoints)
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ requirements.txt           # Python dependencies (fastapi, langchain, sentence-transformers, redis, pygithub)
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ Dockerfile                 # Container build (python:3.11-slim, downloads embedding model)
โ”‚   โ””โ”€โ”€ ๐Ÿ“ static/
โ”‚       โ””โ”€โ”€ ๐Ÿ“„ index.html             # Chat UI (dark theme, real-time messaging, responsive)
โ”‚
โ”œโ”€โ”€ ๐Ÿ“ k8s/                           # Kubernetes manifests
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ redis-stack.yaml           # Redis deployment (vector storage, HNSW indexing)
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ future-me-deployment.yaml  # App deployment (service, environment config, resource limits)
โ”‚   โ””โ”€โ”€ ๐Ÿ“„ future-me-secrets.yaml     # API credentials (Groq, GitHub)
โ”‚
โ”œโ”€โ”€ ๐Ÿ“ cluster/
โ”‚   โ””โ”€โ”€ ๐Ÿ“„ future-me-cluster.yaml     # Kind cluster config
โ”‚
โ””โ”€โ”€ ๐Ÿ“„ README.md                      # This file

๐Ÿ“– How It Works

1. Data Ingestion Phase (Startup)

  1. Fetches ALL repositories from your GitHub account
  2. Collects commits across all repos (up to GITHUB_MAX_COMMITS)
  3. Creates LangChain documents with commit metadata (message, author, date, repo, files)
  4. Generates embeddings using local HuggingFace model
  5. Indexes in Redis with HNSW algorithm for fast vector search

Note: This process runs on every startup. Expect 1-3 minutes depending on your commit count.

2. Query Phase (Chat Interaction)

  1. Vector Search โ†’ Your message is embedded and matched against commit history
  2. Context Retrieval โ†’ Top-K most relevant commits are retrieved (K=8)
  3. Prompt Construction โ†’ LangChain builds prompt with message + context + history
  4. LLM Inference โ†’ Groq's Llama 3 generates contextual response
  5. History Update โ†’ Conversation saved to session
  6. Response Delivery โ†’ Answer streamed back to UI

RAG Benefits: Responses are grounded in your actual commit history, contextually aware of your projects, personalized to your journey, and accurate rather than generic.

๐ŸŽจ Chat UI Features

  • ๐ŸŒ‘ Dark theme with gradient accents โ€ข ๐Ÿ“ฑ Fully responsive mobile design
  • ๐Ÿ’ฌ Typing indicators and real-time updates โ€ข ๐Ÿ“œ Scrollable chat history
  • โœจ Message bubbles with timestamps and avatars โ€ข โŒจ๏ธ Keyboard shortcuts (Enter to send)
  • ๐Ÿ” Session persistence maintains conversation context

๐Ÿš€ API Reference

POST /api/chat

Chat endpoint for conversational interactions.

Request:

{
  "message": "What will I be working on in 1 year?",
  "session_id": "optional-uuid-v4-string"
}

Response:

{
  "reply": "Based on your GitHub activity showing strong Python and Kubernetes work...",
  "session_id": "uuid-v4-string"
}

Features:

  • Session management (returns new session_id if not provided)
  • Conversation history maintained per session
  • RAG-powered responses with commit context

GET /

Serves the chat UI (static HTML).

๐ŸŒ Access Options

Port Forwarding

Option 1: Simple Port Forward

# Forward to localhost (most common for development)
kubectl port-forward service/future-me-app 8000:8000 -n future-me

# Access at: http://localhost:8000

Option 2: Port Forward with Specific Address

# Allow access from any network interface (useful for local network access)
kubectl port-forward --address 0.0.0.0 service/future-me-app 8000:8000 -n future-me

# Access from other devices on your network at: http://YOUR_IP:8000

Option 3: Background Port Forward

# Run port forward in background
kubectl port-forward service/future-me-app 8000:8000 -n future-me > /dev/null 2>&1 &

# Save the process ID
echo $! > /tmp/future-me-port-forward.pid

# Later, to stop it:
kill $(cat /tmp/future-me-port-forward.pid)

Option 4: Persistent Port Forward with Auto-Restart

# Create a script for persistent port forwarding
cat > port-forward.sh << 'EOF'
#!/bin/bash
while true; do
  echo "Starting port forward..."
  kubectl port-forward service/future-me-app 8000:8000 -n future-me
  echo "Port forward stopped. Restarting in 5 seconds..."
  sleep 5
done
EOF

chmod +x port-forward.sh

# Run in background
./port-forward.sh &

Troubleshooting Port Forward

If port 8000 is already in use:

# Use a different local port
kubectl port-forward service/future-me-app 8080:8000 -n future-me
# Access at: http://localhost:8080

If port forward disconnects frequently:

# Use the persistent script (Option 4) above, or
# Check if pod is stable
kubectl get pods -n future-me -w

To find what's using port 8000:

# On macOS/Linux
lsof -i :8000

# Kill the process if needed
kill -9 <PID>

Viewing Logs

# View application logs
kubectl logs -f deployment/future-me-app -n future-me

# Check Redis logs
kubectl logs -f deployment/redis-stack -n future-me

# Check pod status
kubectl get pods -n future-me

๐Ÿ” Troubleshooting

Common Issues

1. Pod CrashLoopBackOff

Check logs:

kubectl logs deployment/future-me-app -n future-me --previous

Common causes:

  • โŒ Invalid Groq API key
  • โŒ Invalid GitHub token
  • โŒ Redis not ready
  • โŒ Out of memory (increase limits)

Fix:

# Verify secrets
kubectl get secret future-me-secrets -n future-me -o jsonpath='{.data.groq-api-key}' | base64 -d

# Check Redis connection
kubectl exec -it deployment/future-me-app -n future-me -- \
  python -c "import redis; print(redis.Redis(host='redis').ping())"

2. Slow Startup / OOMKilled

Problem: Pod crashes during embedding model download

Solution: Increase memory limits

resources:
  limits:
    memory: "2Gi"  # Increase from 1Gi

3. "No commits found" Error

Problem: Application can't access GitHub repos

Causes:

  • Token doesn't have repo scope
  • Repositories are all empty
  • API rate limit exceeded

Fix:

# Check GitHub token permissions
curl -H "Authorization: token YOUR_TOKEN" https://api.github.com/user/repos

# Check rate limit
curl -H "Authorization: token YOUR_TOKEN" https://api.github.com/rate_limit

4. Redis Connection Refused

Problem: Application can't connect to Redis

Solution:

# Check Redis pod status
kubectl get pods -n future-me -l app=redis-stack

# Check Redis service
kubectl get svc redis -n future-me

# Test connectivity
kubectl run redis-test --rm -it --image=redis:alpine -n future-me -- \
  redis-cli -h redis ping

5. Chat UI Not Loading

Problem: Blank page or 404 errors

Causes:

  • Static files not mounted correctly
  • Port forward not working
  • Pod not ready

Fix:

# Check if pod is running
kubectl get pods -n future-me

# Restart port forward
kubectl port-forward service/future-me-app 8000:8000 -n future-me

# Check if static files exist in pod
kubectl exec deployment/future-me-app -n future-me -- ls -la /app/static

Debug Mode

Enable verbose logging by updating the deployment:

env:
  - name: LOG_LEVEL
    value: "DEBUG"

๐ŸŽฏ Use Cases

  • Career Planning - "What senior roles am I qualified for?" โ€ข "Which technologies should I learn next?"
  • Skill Assessment - "What are my strongest programming languages?" โ€ข "How has my code quality improved?"
  • Project Discovery - "What interesting side projects have I worked on?" โ€ข "Show me my contribution patterns"
  • Learning Guidance - "Based on my GitHub, what should I study next?" โ€ข "Which frameworks align with my experience?"
  • Resume Building - "Summarize my most significant contributions" โ€ข "How can I describe my GitHub work on my resume?"

๐Ÿค Contributing

I'd love contributions from the community! Here's how:

Quick Setup:

git clone https://github.com/azizzoaib786/future-me.git && cd future-me/app
python -m venv venv && source venv/bin/activate  # On Windows: venv\Scripts\activate
pip install -r requirements.txt
export GROQ_API_KEY="your-key" GITHUB_TOKEN="your-token" REDIS_URL="redis://localhost:6379/0"
docker run -d -p 6379:6379 redis/redis-stack:latest
uvicorn app:app --reload --host 0.0.0.0 --port 8000

Workflow: Fork โ†’ Branch (feature/amazing-feature) โ†’ Code (PEP 8, type hints, docstrings) โ†’ Test โ†’ Commit (feat: add feature) โ†’ PR

Ideas: Bug fixes โ€ข New chat features โ€ข Analytics โ€ข UI/UX โ€ข Tests โ€ข Docs โ€ข Multi-language โ€ข Performance โ€ข Security

๐Ÿ” Security Notes

โš ๏ธ This is a hobby project for personal use. Security features:

  • Kubernetes Secrets for API keys (don't commit secrets to Git!)
  • Local embedding processing (data stays in your cluster)
  • No permanent storage of commit data

For personal use: Keep your API keys safe and use a read-only GitHub token

๐Ÿ“œ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ™ Acknowledgments

Huge thanks to the open-source community and these amazing technologies: Groq (blazingly fast LLM inference) โ€ข LangChain (Swiss Army knife for RAG) โ€ข Redis Stack (vector search that scales) โ€ข HuggingFace (democratizing AI) โ€ข FastAPI (best Python web framework) โ€ข PyGithub (painless GitHub API) โ€ข Kubernetes (cloud-native orchestration)

๐Ÿ“š Resources

Groq API Docs โ€ข LangChain RAG Tutorial โ€ข Redis Vector Search โ€ข FastAPI Guide


๐Ÿ”ฎ Built with passion by Aziz Zoaib for developers who want to visualize their coding journey and discover their future potential!

Found this helpful? โญ Star the repo โ€ข ๐Ÿ› Report issues โ€ข ๐Ÿ’ก Suggest features

Connect with me:


About

Future-Me App | AI-powered GitHub Commit Insights & Self-Reflection Tool

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages