Unlock your competitive programming potential with intelligent insights powered by Google Gemini
Features • Quick Start • Demo Video • Tech Stack • Contributing
|
Leveraging Google Gemini and LangGraph to provide:
|
Real-time analysis of your Codeforces profile:
|
|
Never lose your insights:
|
Your data, your control:
|
Traditional practice tracking tools show you what you solved.
CFanatic tells you why it matters and what to do next.
- 💡 Smart Recommendations: Not just random problems - get personalized suggestions based on your strengths and weaknesses
- 🎓 Learning Path: AI-curated problem sets that match your skill level and learning goals
- 📈 Performance Tracking: Visualize your growth and identify patterns in your problem-solving journey
- 🤝 Conversational Interface: Ask questions naturally - "What topics should I focus on?" or "Why did my rating drop?"
---
Before you begin, ensure you have:
- Python 3.11+ (Download)
- Node.js 20+ (Download)
- Gemini API Key (Get one free)
- Git (Download)
git clone https://github.com/yourusername/cfanatic.git
cd cfanatic# Navigate to backend directory
cd backend
# Install Python dependencies
pip install -r requirements.txt
# Generate encryption keys
python ../generate_keys.py
# Create .env file
# Copy the generated keys to .env (see env.template)Create a .env file in the backend directory:
SECRET_KEY=<generated-from-script>
ENCRYPTION_KEY=<generated-from-script>
PORT=8000# Navigate to frontend directory
cd ../frontend
# Install dependencies
npm install
# Start development server
npm run dev# In a new terminal, from the backend directory
cd backend
uvicorn main:app --reloadOpen your browser and navigate to:
- Frontend: http://localhost:5173
- Backend API: http://localhost:8000
- API Docs: http://localhost:8000/docs
- ⚛️ React 19.2 - Modern UI library
- 📘 TypeScript - Type-safe JavaScript
- 🎨 TailwindCSS - Utility-first CSS framework
- ✨ Framer Motion - Smooth animations
- 🔥 Vite - Lightning-fast build tool
- 🧭 React Router - Client-side routing
- ⚡ FastAPI - High-performance Python web framework
- 🗄️ SQLAlchemy - SQL toolkit and ORM
- 🔐 JWT Authentication - Secure user sessions
- 🔒 Cryptography - API key encryption
- 🤖 LangChain - LLM application framework
- 🧠 LangGraph - Agentic workflow orchestration
- 🌟 Google Gemini - Advanced language model
- 📊 Codeforces API - Contest and user data
- 🔍 Sentence Transformers - Semantic search
- 📚 FAISS - Vector similarity search (RAG)
- 🐳 Docker - Containerization
- 🤗 Hugging Face Spaces - Deployment platform
- 🔄 Git - Version control
cfanatic/
├── backend/ # FastAPI backend
│ ├── main.py # Application entry point
│ ├── auth.py # Authentication logic
│ ├── models.py # Database models
│ ├── mcp_server.py # LangGraph agent
│ ├── cf_api.py # Codeforces API integration
│ ├── rag.py # RAG system for embeddings
│ ├── database.py # Database configuration
│ └── requirements.txt # Python dependencies
│
├── frontend/ # React frontend
│ ├── src/
│ │ ├── components/ # Reusable UI components
│ │ ├── pages/ # Page components
│ │ ├── config.ts # API configuration
│ │ └── App.tsx # Main app component
│ ├── package.json # Node dependencies
│ └── vite.config.ts # Vite configuration
│
├── Dockerfile # Docker build configuration
├── .dockerignore # Docker ignore patterns
├── README.md # This file
├── DEPLOYMENT.md # Deployment guide
├── generate_keys.py # Security key generator
└── env.template # Environment template
Register with your username, email, and password.
- Get a free Gemini API key from Google AI Studio
- Enter your Codeforces handle
- API keys are encrypted and stored securely
Ask questions like:
- "Analyze my recent contest performance"
- "What topics should I focus on to reach Expert?"
- "Give me 5 problems to improve my DP skills"
- "Why did my rating drop in the last contest?"
- View your chat history
- Continue previous conversations
- Export insights for future reference
Contributions are welcome! Here's how you can help:
- 🍴 Fork the repository
- 🌿 Create a feature branch (
git checkout -b feature/amazing-feature) - 💾 Commit your changes (
git commit -m 'Add amazing feature') - 📤 Push to the branch (
git push origin feature/amazing-feature) - 🎉 Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Codeforces for providing the amazing competitive programming platform
- Google for the powerful Gemini AI model
- LangChain team for the excellent LLM framework
- The open-source community for all the amazing tools