The CodeQuest API is a web service that offers a variety of programming questions for anyone looking to improve their coding skills, from beginners learning programming to experienced developers seeking new challenges.
- Uses Google’s Generative AI (Gemini 1.5 Flash).
- Dynamic question creation based on specified topics.
- Supports multiple programming categories and topics.
- Returns up to 10 programming questions.
- Random question retrieval with customizable parameters.
- Multiple programming categories.
- Random daily programming question.
- Users can contribute by submitting new questions.
- Pending review system for AI-generated and user-submitted questions.
- Export questions to popular quiz platforms such as Kahoot or Blooket.
- Ensures a secure and fast experience for all users.
- Framework: Express.js
- Language: Node.js
- Database: MongoDB with Mongoose
- AI Integration: Google Generative AI
const questionSchema = new Schema({
categories: {
type: [String],
enum: QUESTIONS_CATEGORIES,
default: ["other"],
},
question: {
type: String,
required: true,
},
codeExamples: {
type: [String],
default: [],
},
answerOptions: [
{
answer: {
type: String,
required: true, // Texto de la opción de respuesta
},
isCorrect: {
type: Boolean,
required: true, // Indicación de si esta opción de respuesta es correcta
},
},
],
explanation: {
type: String,
maxlength: 4000,
},
urlSource: {
type: String,
},
status: {
type: String,
enum: ["approved", "pending"],
default: "approved",
},
});
-
Clone repository
git clone https://github.com/IronHack-2024/CodeQuestAPI -
Install dependencies
npm install -
Set up environment variables
cp .env.example .env
-
For the repository.
-
Create a feature/bug branch.
-
Commit the changes with a very descriptive message.
-
Push changes and create a pull request.