A FastAPI + React application that tests coding knowledge using AI-generated multiple-choice questions. Users sign in via Clerk authentication, answer questions, and receive instant feedback with explanations. The app also keeps a history of previously generated questions for review and learning.
- AI-generated coding questions using OpenAI API.
- Multiple-choice answers with instant feedback and explanations.
- User authentication and management via Clerk.
- History of previously generated questions for review.
- Clean, modern interface with React frontend and FastAPI backend.
- Backend: FastAPI, Python
- Frontend: React, JavaScript, HTML, CSS
- Authentication: Clerk
- AI Integration: OpenAI API
- Database: SQLite / PostgreSQL (depending on setup)
VITE_CLERK_PUBLISHABLE_KEY=your_clerk_publishable_key
VITE_BACKEND_URL=http://localhost:8000
VITE_FRONTEND_URL=http://localhost:5173VITE_CLERK_PUBLISHABLE_KEY: Public key for Clerk authentication.VITE_BACKEND_URL: URL of the backend API.VITE_FRONTEND_URL: URL of the frontend for redirects.
CLERK_SECRET_KEY=your_clerk_secret_key
JWT_KEY=your_jwt_public_key
DATABASE=sqlite:///database.db
OPENAI_API_KEY=your_openai_api_key
CLERK_WEBHOOK_SECRET=your_clerk_webhook_secret
FRONTEND_URL=http://localhost:5173
PORT=8000CLERK_SECRET_KEY: Secret key for backend authentication.JWT_KEY: Public key for JWT verification.DATABASE: Database URL.OPENAI_API_KEY: API key for OpenAI.CLERK_WEBHOOK_SECRET: Secret to verify Clerk webhooks.FRONTEND_URL: URL of the frontend.PORT: Backend server port.
Important: Do not commit
.envfiles to version control. Use.gitignoreand environment variables on deployment platforms.
- Clone the repository:
git clone https://github.com/MPALONDON/CodeKnowledgeTester.git
cd CodeKnowledgeTester- Backend setup:
cd backend
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt- Frontend setup:
cd ../frontend
npm install- Add
.envfiles as described above.
Backend:
cd backend
python server.pyFrontend:
cd frontend
npm start- Sign in with Clerk authentication.
- Generate coding questions via the AI-powered interface.
- Answer multiple-choice questions and receive instant feedback with explanations.
- Review your history of previously generated questions.
Live demo: https://codeknowledgetester-frontend.onrender.com/