An open API service indexing awesome lists of open source software.

https://github.com/skupperr/ai-coding-challenge-generator

AI Coding Challenge Generator is a full-stack application that helps users improve their coding skills through daily AI-generated multiple-choice challenges, tailored by difficulty.
https://github.com/skupperr/ai-coding-challenge-generator

ai clerk fastapi javascript ollama python react sqlalchemy vite

Last synced: 3 months ago
JSON representation

AI Coding Challenge Generator is a full-stack application that helps users improve their coding skills through daily AI-generated multiple-choice challenges, tailored by difficulty.

Awesome Lists containing this project

README

          

# ๐Ÿง  AI Coding Challenge Generator

[![Python 3.11+](https://img.shields.io/badge/Python--3.11+-backend-blue?logo=python)](https://www.python.org/downloads/)
[![Vite + React](https://img.shields.io/badge/Vite_+_React-frontend-purple?logo=react)](https://vitejs.dev/)

> Practice makes perfect โ€” sharpen your coding skills with daily AI-generated MCQs.

**AI Coding Challenge Generator** is a full-stack application that helps users improve their coding skills through daily AI-generated multiple-choice challenges, tailored by difficulty.

![Demo Screenshot](./frontend/public/preview.png)

## ๐Ÿš€ Features

- ๐Ÿง  **AI-Generated Coding Questions**: Challenges are created using a local Ollama LLM model.
- ๐Ÿ” **Authentication with Clerk**: Users must log in to access the platform.
- ๐ŸŽฏ **Difficulty-Based Challenges**: Choose from multiple difficulty levels.
- ๐Ÿ“Š **MCQ Format**: All challenges are multiple choice for quick practice and validation.
- ๐Ÿ“… **Daily Quota System**: Users can attempt a limited number of challenges per day, which resets every 24 hours.
- ๐Ÿ•˜ **History Tracking**: All past challenges are stored in a secure SQLAlchemy database.

---

## ๐Ÿ› ๏ธ Tech Stack

### Frontend
[![React](https://img.shields.io/badge/React-61DAFB?style=for-the-badge&logo=react&color=2d2d2d)](https://react.dev/)
[![JavaScript](https://img.shields.io/badge/javascript-61DAFB?style=for-the-badge&logo=javascript&color=2d2d2d)](https://developer.mozilla.org/en-US/docs/Web/JavaScript)
[![Vite](https://img.shields.io/badge/Vite-646CFF?style=for-the-badge&logo=vite&color=2d2d2d)](https://vitejs.dev/)
[![Clerk](https://img.shields.io/badge/Clerk-6C47FF?style=for-the-badge&logo=clerk&color=2d2d2d)](https://clerk.dev/)

### Backend
[![Python](https://img.shields.io/badge/Python-3.11-3776AB?style=for-the-badge&logo=python&labelColor=2d2d2d)](https://www.python.org/)
[![FastAPI](https://img.shields.io/badge/FastAPI-009688?style=for-the-badge&logo=fastapi&color=2d2d2d)](https://fastapi.tiangolo.com/)
[![SQLAlchemy](https://img.shields.io/badge/SQLAlchemy-cc0000?style=for-the-badge&logo=sqlite&color=2d2d2d)](https://www.sqlalchemy.org/)
[![Clerk SDK](https://img.shields.io/badge/Clerk_Backend-6C47FF?style=for-the-badge&logo=clerk&color=2d2d2d)](https://clerk.dev/)
[![Ollama](https://img.shields.io/badge/Ollama-000000?style=for-the-badge&logo=OpenAI&color=2d2d2d)](https://ollama.com/)

---

## ๐Ÿ” How It Works

1. **User logs in** via Clerk.
2. After login, user selects a **difficulty level** (e.g., Easy, Medium, Hard).
3. A **local Ollama model** generates a multiple-choice coding challenge.
4. The challenge is shown on the frontend and **stored in the backend** database.
5. A **daily quota** system ensures users can only attempt a limited number per day.
6. Once the quota resets, the user can generate more challenges.

---

## ๐Ÿ’ป How to Use This Repo

### 1. Clone the repository
```bash
git clone https://github.com/skupperr/AI-Coding-Challenge-Generator.git
cd AI-Coding-Challenge-Generator
```
### 2. Set up the frontend
```bash
cd Frontend
npm install
npm run dev
```
### 3. In a new terminal, set up the backend
```bash
cd ../Backend
pip install -r requirements.txt
python server.py
```

---

## ๐Ÿ‘ฅ Who Is It For?

- **๐Ÿ‘จโ€๐Ÿ’ป Developers**: Looking to sharpen their coding skills with AI-generated practice.
- **๐Ÿ“š Students**: Practice MCQs before technical interviews or exams.
- **๐Ÿง  Lifelong Learners**: Anyone who wants a quick daily coding brain-teaser.

---

## ๐Ÿ“ Project Structure

```
AI-Coding-Challenge-Generator/
โ”œโ”€โ”€ Backend/ # FastAPI backend
โ”‚ โ”œโ”€โ”€ src/
โ”‚ โ”‚ โ”œโ”€โ”€ routes/
โ”‚ โ”‚ โ”œโ”€โ”€ models/
โ”‚ โ”‚ โ”œโ”€โ”€ database/
โ”‚ โ”‚ โ”œโ”€โ”€ ai_generator.py
โ”‚ โ”‚ โ”œโ”€โ”€ app.py
โ”‚ โ”‚ โ”œโ”€โ”€ utils.py
โ”‚ โ”‚ โ””โ”€โ”€ .env
โ”‚ โ”œโ”€โ”€ server.py
โ”‚ โ””โ”€โ”€ requirements.txt
โ”‚
โ”œโ”€โ”€ Frontend/
โ”‚ โ”œโ”€โ”€ src/
โ”‚ โ”‚ โ”œโ”€โ”€ auth/
โ”‚ โ”‚ โ”œโ”€โ”€ challenges/
โ”‚ โ”‚ โ”œโ”€โ”€ history/
โ”‚ โ”‚ โ”œโ”€โ”€ layout/
โ”‚ โ”‚ โ”œโ”€โ”€ utils/
โ”‚ โ”‚ โ”œโ”€โ”€ App.css
โ”‚ โ”‚ โ”œโ”€โ”€ index.css
โ”‚ โ”‚ โ”œโ”€โ”€ main.jsx
โ”‚ โ”‚ โ”œโ”€โ”€ App.jsx
โ”‚ โ”œโ”€โ”€ public/
โ”‚ โ”œโ”€โ”€ .env
โ”‚ โ”œโ”€โ”€ index.html
โ”‚ โ””โ”€โ”€ package.json
โ”‚
โ””โ”€โ”€ README.md
```

## ๐Ÿ“ฌ Contact

Created with โค๏ธ by [Asif U. Ahmed](https://github.com/skupperr)

[Report Bug](https://github.com/skupperr/AI-Coding-Challenge-Generator/issues) ยท [Request Feature](https://github.com/skupperr/AI-Coding-Challenge-Generator/issues)