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