Skip to content

Jeszter/JS-engineer-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Quiz Builder

Full-Stack JS engineer test assessment - the Quiz Builder

🛠 Tech Stack

Backend

  • Node.js with Express.js - REST API framework
  • TypeScript - Type safety and better developer experience
  • SQLite - Lightweight database
  • Prisma ORM - Database modeling and migrations
  • Zod - Request validation
  • Helmet - Security headers
  • CORS - Cross-origin resource sharing

Frontend

  • React.js with Next.js 15 - UI framework with App Router
  • TypeScript - Type safety
  • Tailwind CSS - Styling
  • React Hook Form - Form management
  • Zod - Form validation
  • Axios - API requests
  • React Icons - Icon library

Installation & Setup

1. Clone repository

git clone https://github.com/Jeszter/JS-engineer-test
cd quiz-builder

2. Backend

cd backend
npm install
npm run prisma:migrate
npm run dev
# Server runs on http://localhost:3001

3. Frontend

cd frontend
npm install
npm run dev
# App runs on http://localhost:3000

📁 Project Structure

quiz-builder/
├── backend/          # Express + Prisma
│   ├── src/
│   │   ├── controllers/
│   │   ├── routes/
│   │   └── validators/
│   └── prisma/
└── frontend/         # Next.js
    ├── src/
    │   ├── app/
    │   ├── services/
    │   └── types/
    └── public/
изображение изображение

📌 API Endpoints

  • POST /api/quizzes - create quiz
  • GET /api/quizzes - list all quizzes
  • GET /api/quizzes/:id - get quiz details
  • DELETE /api/quizzes/:id - delete quiz

🎯 Question Types

  • Boolean - True/False
  • Input - text answer
  • Checkbox - multiple correct options

📝 Example: Create a Quiz

curl -X POST http://localhost:3001/api/quizzes \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Test Quiz",
    "questions": [{
      "text": "What is 2+2?",
      "type": "INPUT",
      "correctAnswer": "4",
      "order": 0
    }]
  }'

🛠 Available Scripts

Backend

npm run dev        # start development server
npm run build      # build for production
npm run prisma:studio # open database UI

Frontend

npm run dev        # start development server
npm run build      # build for production
npm run lint       # run linter

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors