An interactive web application for learning prompt engineering through hands-on exercises.
- 🤖 Interactive Learning: Practice with real AI responses using OpenAI's API
- 🎯 Targeted Exercises: Focus on specific prompt techniques (JSON formatting, role-playing, reasoning, etc.)
- 💡 Smart Hints: Progressive hint system to help when you're stuck
- 📊 Instant Feedback: Automated evaluation with detailed feedback and scoring
- 🎨 Modern UI: Clean, responsive interface built with React and TypeScript
frontend/- React frontend application with TypeScriptbackend/- Node.js/Express API server with TypeScriptdatabase/- SQLite database with sample exercisesexercises/- Exercise definitions and configurationsdocs/- Project documentation
- Node.js (v16 or higher)
- npm or yarn
- OpenAI API key
-
Clone and install dependencies:
# Install backend dependencies cd backend npm install # Install frontend dependencies cd ../frontend npm install
-
Set up environment variables:
# Edit backend/.env cd ../backend # Replace 'your_openai_api_key_here' with your actual OpenAI API key
-
Start the development servers:
# Terminal 1: Start backend (from backend directory) npm run dev # Terminal 2: Start frontend (from frontend directory) npm run dev
-
Open your browser:
- Frontend: http://localhost:5173
- Backend API: http://localhost:3001
The application comes with 5 sample exercises:
- JSON Format Response (Difficulty 2) - Learn to request structured JSON output
- Role Playing - Shakespeare (Difficulty 3) - Practice character-based prompting
- Step-by-Step Reasoning (Difficulty 2) - Master chain-of-thought prompting
- Creative Writing with Constraints (Difficulty 3) - Combine creativity with specific requirements
- List with Numbers (Difficulty 1) - Basic formatting exercises
GET /api/exercises- Get all exercisesGET /api/exercises/:id- Get specific exercisePOST /api/exercises/:id/submit- Submit prompt for evaluationGET /api/health- Health check
- React 18
- TypeScript
- Vite
- Axios
- CSS3
- Node.js
- Express
- TypeScript
- SQLite3
- OpenAI API
- CORS
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
MIT License - feel free to use this project for educational purposes!