Master Python with AI-Powered Practice
Pytrix is a modern, privacy-focused platform designed to help you master Python through adaptive, AI-generated challenges. Unlike traditional coding platforms with static problem sets, Pytrix uses Google's Gemini AI to generate infinite, unique exercises tailored to your skill level.
Think of it as having a personal Python tutor that never runs out of problems, never judges you for asking for hints, and runs entirely in your browser.
No accounts. No data collection. Just you and Python.
| Traditional Platforms | Pytrix |
|---|---|
| Static problem sets you eventually memorize | Infinite AI-generated problems |
| Server-side execution (slow, privacy concerns) | Local execution in your browser |
| Account required, data stored on their servers | No account, all data stays local |
| Same difficulty regardless of skill | Adaptive difficulty that grows with you |
| Generic feedback | AI-powered hints and code analysis |
A rapid-fire practice loop where problems are generated instantly. Solve, get feedback, move on. No friction, just flow. Features streak-based difficulty progression that adapts to your performance in real-time.
Create custom practice sessions based on specific topics and difficulty levels. Want to drill "Two-Pointer Techniques" at advanced difficulty? Go for it.
Your code runs directly in your browser using Pyodide (Python compiled to WebAssembly). No network round-trips. No server queues. Execution in milliseconds.
The AI tracks your performance per-topic and adjusts complexity automatically. Crushing beginner problems? You'll be promoted to intermediate. Struggling? You'll get remediation questions to build confidence.
Track your progress with detailed visualization of accuracy, speed, and topic mastery. See your weak points and crush them.
Your API key stays in your browser. Your code never touches our servers. We don't even have a database to store your data if we wanted to.
Built with modern, battle-tested technologies:
| Layer | Technology |
|---|---|
| Framework | Next.js 16 with App Router |
| Language | TypeScript 5 |
| UI | shadcn/ui + Radix UI + Tailwind CSS |
| Python Runtime | Pyodide 0.29 (WebAssembly) |
| AI | Google Gemini |
| State | Zustand |
| Editor | Monaco Editor |
| Testing | Vitest + Playwright |
# Clone and install
git clone https://github.com/SH1SHANK/Pytrix.git
cd Pytrix
npm install
# Run the development server
npm run devOpen http://localhost:3000 and start practicing.
You'll need a Gemini API key for AI features — grab one free from Google AI Studio.
Pytrix uses a Bring Your Own Key model. Here's why:
- Privacy: Your key never leaves your browser
- Control: You manage your own usage and costs
- Transparency: No hidden proxies or middlemen
- Trust: We literally can't access your key even if we wanted to
- Get a free API key from Google AI Studio
- Open Pytrix → Settings → API Keys
- Paste your key
- Done. It's stored in
localStorageand never transmitted to us.
See Security & Privacy for the full security model.
┌─────────────┐ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ Generate │────▶│ Code │────▶│ Execute │────▶│ Evaluate │
│ Question │ │ (Editor) │ │ (Pyodide) │ │ (Gemini) │
└─────────────┘ └─────────────┘ └─────────────┘ └─────────────┘
│ │
└────────────────────────────────────────────────────────────┘
Next Question
- Generate: Gemini creates a unique problem based on your topic and difficulty
- Code: Write your solution in the Monaco Editor (the same editor VS Code uses)
- Execute: Your code runs locally in Pyodide — no server involved
- Evaluate: Gemini analyzes your solution and provides feedback
- Repeat: Move to the next challenge, forever
The whole loop runs in under 2 seconds on average.
Everything you need to know is in /docs:
| Document | What It Covers |
|---|---|
| Overview | Project introduction and design philosophy |
| Getting Started | Installation, setup, first practice session |
| Architecture | System design, data flow, core services |
| Modules Reference | Detailed documentation for each core module |
| API Reference | Complete API documentation |
| Security & Privacy | Security model and data handling |
| Contributing | How to contribute |
| FAQ | Common questions and troubleshooting |
Pytrix is designed for Vercel:
- Push to
main→ Auto-deploy to production - Open a PR → Get a preview URL
- CI checks lint and build before merge
See DEPLOYMENT.md for details.
npm run test # All tests
npm run test:unit # Unit tests only
npm run test:e2e # Browser tests
npm run test:watch # Watch mode
npm run test:coverage # Coverage reportWe use Vitest for unit tests, Testing Library for components, and Playwright for E2E.
See tests/README.md for the full testing guide.
We'd love your help. Here's the quick version:
- Fork the repo
- Create a branch:
git checkout -b feature/your-feature - Make changes
- Run
npm run lint && npm run build && npm run test - Open a PR
See Contributing Guide for code standards, architecture guidelines, and the full PR process.
MIT License — do whatever you want with it. See LICENSE.
Built on the shoulders of giants:
- Next.js for the framework
- Pyodide for bringing Python to the browser
- shadcn/ui for beautiful components
- Google Gemini for the AI
Ready to level up your Python skills? Clone the repo and start practicing.