Skip to content

mullermnm/ai_examination

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

14 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸŽ“ AI Examination System

CI License: MIT Node.js Vue.js MongoDB

A thoughtful, accessible examination platform crafted for inclusion. Designed to be simple, reliable, and friendly for students and teachersβ€”especially those who are visually impaired.


πŸ“– Table of Contents


🌟 Overview

The AI Examination System is an open-source, web-based examination platform designed with accessibility at its core. It provides a seamless experience for both visually impaired and sighted users, enabling teachers to create exams and students to take them with full voice control and screen reader support.

Why This Project?

Traditional examination systems often overlook users with visual impairments. This project aims to bridge that gap by providing:

  • Voice Commands: Navigate and answer questions entirely by voice
  • Screen Reader Support: Full ARIA compliance for assistive technologies
  • Keyboard Navigation: Complete exam workflow without a mouse
  • AI-Assisted Features: Smart tools to support students while maintaining exam integrity

✨ Key Features

πŸ”Š Accessibility First

  • Speech Recognition: Answer questions using your voice
  • Text-to-Speech: Hear questions and options read aloud
  • Keyboard Navigation: Full keyboard support with intuitive shortcuts
  • High Contrast Mode: Enhanced visibility for low-vision users
  • ARIA Labels: Complete screen reader compatibility

πŸ‘¨β€πŸ« For Teachers

  • Create and manage exams with multiple question types
  • Set time limits and total marks
  • Publish, archive, or save exams as drafts
  • View student submissions and performance

πŸ‘©β€πŸŽ“ For Students

  • Browse available exams
  • Take exams with voice or keyboard controls
  • Timer announcements for time management
  • Real-time feedback and progress tracking

πŸ› οΈ Technical Features

  • Real-time updates via WebSocket (Socket.IO)
  • GraphQL API for flexible data queries
  • JWT-based authentication
  • Mobile-ready with Capacitor support

πŸ› οΈ Tech Stack

Frontend

Technology Purpose
Vue.js 3 Reactive UI framework
Vite Fast build tool and dev server
TailwindCSS Utility-first CSS framework
Pinia State management
Vue Router Client-side routing
Capacitor Native mobile app support
Rive Interactive animations
Web Speech API Speech recognition & synthesis

Backend

Technology Purpose
Node.js JavaScript runtime
Express Web application framework
MongoDB NoSQL database
Mongoose MongoDB object modeling
GraphQL API query language
Socket.IO Real-time communication
JWT Authentication tokens
Joi Schema validation

πŸ“‹ Prerequisites

Before you begin, ensure you have the following installed:

  • Node.js (v20.x or higher) - Download
  • npm (v9.x or higher) - Comes with Node.js
  • MongoDB (v5.x or higher) - Download
  • Git - Download

πŸš€ Installation

1. Clone the Repository

git clone https://github.com/mullermnm/ai_examination.git
cd ai_examination

2. Install Backend Dependencies

cd backend
npm install

3. Install Frontend Dependencies

cd ../frontend
npm install

βš™οΈ Environment Configuration

Backend Environment

Create a .env file in the backend directory:

# Server Configuration
SERVER_PORT=8000

# Database
MONGODB_URI=mongodb://localhost:27017/ai_examination

# JWT Configuration
JWT_SECRET=your-super-secret-jwt-key-change-in-production
JWT_EXPIRES_IN=7d

# Environment
NODE_ENV=development

Frontend Environment

Create a .env file in the frontend directory:

VITE_API_URL=http://localhost:8000

For production, create .env.production:

VITE_API_URL=https://your-production-api-url.com

πŸ’» Development

Start MongoDB

Make sure MongoDB is running on your system:

# On Windows (if installed as a service)
net start MongoDB

# On macOS/Linux
mongod --dbpath /path/to/your/data

Start the Backend Server

cd backend
npm run dev

The backend will start on http://localhost:8000

Start the Frontend Dev Server

cd frontend
npm run dev

The frontend will start on http://localhost:5000

Access the Application

Open your browser and navigate to http://localhost:5000


πŸ—οΈ Building for Production

Build Frontend

cd frontend
npm run build

The production build will be in the frontend/dist directory.

Build Backend

cd backend
npm run build

The bundled backend will be in backend/dist/backend.js.

Build Mobile App (Android)

cd frontend
npm run build:mobile

This creates an APK in frontend/public/app-debug.apk.


πŸ§ͺ Testing

Frontend Unit Tests

cd frontend
npm run test:unit

Uses Vitest with jsdom for component testing.

Frontend E2E Tests

cd frontend
npm run test:e2e

Uses Cypress for end-to-end testing.

Run E2E Tests in Development Mode

cd frontend
npm run test:e2e:dev

This opens Cypress Test Runner for interactive testing.

Linting

cd frontend
npm run lint

Runs ESLint to check for code quality issues.


πŸ“ Project Structure

ai_examination/
β”œβ”€β”€ backend/                    # Node.js/Express backend
β”‚   β”œβ”€β”€ bootstrap/              # Server and database initialization
β”‚   β”œβ”€β”€ config/                 # Configuration files
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ controller/         # Route controllers
β”‚   β”‚   β”œβ”€β”€ graphql/            # GraphQL schema and resolvers
β”‚   β”‚   β”œβ”€β”€ helpers/            # Utility helpers
β”‚   β”‚   β”œβ”€β”€ interface/          # Data access interfaces
β”‚   β”‚   β”œβ”€β”€ middleware/         # Express middleware (auth, validation)
β”‚   β”‚   β”œβ”€β”€ models/             # Mongoose models
β”‚   β”‚   β”œβ”€β”€ routes/             # API route definitions
β”‚   β”‚   β”œβ”€β”€ services/           # Business logic services
β”‚   β”‚   └── validators/         # Joi validation schemas
β”‚   β”œβ”€β”€ index.js                # Application entry point
β”‚   └── package.json
β”‚
β”œβ”€β”€ frontend/                   # Vue.js frontend
β”‚   β”œβ”€β”€ public/                 # Static assets
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ assets/             # Images, fonts, styles
β”‚   β”‚   β”œβ”€β”€ components/         # Reusable Vue components
β”‚   β”‚   β”œβ”€β”€ directives/         # Custom Vue directives
β”‚   β”‚   β”œβ”€β”€ mixins/             # Vue mixins
β”‚   β”‚   β”œβ”€β”€ modules/            # Feature modules
β”‚   β”‚   β”‚   β”œβ”€β”€ auth/           # Authentication views
β”‚   β”‚   β”‚   β”œβ”€β”€ exam/           # Exam management (teacher)
β”‚   β”‚   β”‚   β”œβ”€β”€ home/           # Landing page
β”‚   β”‚   β”‚   β”œβ”€β”€ student/        # Student dashboard & exam taking
β”‚   β”‚   β”‚   └── teacher/        # Teacher dashboard
β”‚   β”‚   β”œβ”€β”€ plugins/            # Vue plugins
β”‚   β”‚   β”œβ”€β”€ router/             # Vue Router configuration
β”‚   β”‚   β”œβ”€β”€ services/           # API service layer
β”‚   β”‚   β”œβ”€β”€ stores/             # Pinia state stores
β”‚   β”‚   └── utils/              # Utility functions
β”‚   β”œβ”€β”€ index.html              # Entry HTML
β”‚   β”œβ”€β”€ vite.config.js          # Vite configuration
β”‚   └── package.json
β”‚
β”œβ”€β”€ .github/
β”‚   └── workflows/
β”‚       └── ci.yml              # GitHub Actions CI/CD
β”‚
β”œβ”€β”€ .gitignore
β”œβ”€β”€ LICENSE
└── README.md

πŸ“‘ API Documentation

Authentication Endpoints

Method Endpoint Description
POST /api/auth/register Register a new user
POST /api/auth/login Login and receive JWT token
GET /api/auth/me Get current user profile

Exam Endpoints

Method Endpoint Description
GET /api/exams List all exams (teacher)
GET /api/exams/published List published exams (student)
POST /api/exams Create a new exam
GET /api/exams/:id Get exam details
PUT /api/exams/:id Update an exam
DELETE /api/exams/:id Delete an exam
PATCH /api/exams/:id/status Update exam status

Submission Endpoints

Method Endpoint Description
POST /api/submissions Submit exam answers
GET /api/submissions/:examId Get submissions for an exam

GraphQL Endpoint

Endpoint Description
POST /graphql GraphQL API endpoint

🀝 Contributing

We welcome contributions from everyone! Here's how you can help:

Getting Started

  1. Fork the repository
  2. Clone your fork:
    git clone https://github.com/YOUR_USERNAME/ai_examination.git
  3. Create a branch for your feature:
    git checkout -b feature/amazing-feature
  4. Make your changes and commit them:
    git commit -m "feat: add amazing feature"
  5. Push to your fork:
    git push origin feature/amazing-feature
  6. Open a Pull Request

Commit Message Convention

We follow Conventional Commits:

  • feat: New features
  • fix: Bug fixes
  • docs: Documentation changes
  • style: Code style changes (formatting, etc.)
  • refactor: Code refactoring
  • test: Adding or updating tests
  • chore: Maintenance tasks

Areas for Contribution

  • πŸ› Bug fixes
  • ✨ New accessibility features
  • 🌍 Internationalization (i18n)
  • πŸ“š Documentation improvements
  • πŸ§ͺ Test coverage
  • 🎨 UI/UX enhancements

πŸ“œ Code of Conduct

This project adheres to a Code of Conduct that all contributors are expected to follow:

  • Be Respectful: Treat everyone with respect and kindness
  • Be Inclusive: Welcome contributors of all backgrounds
  • Be Constructive: Provide helpful feedback
  • Be Patient: Help newcomers learn and grow

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

MIT License

Copyright (c) 2024 AI Examination Contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

πŸ™ Acknowledgments

  • All contributors who help make education more accessible
  • The open-source community for the amazing tools and libraries
  • Educators and students who provide valuable feedback
  • Vue.js team for the excellent framework
  • MongoDB for the flexible database
  • The Web Accessibility community for guidance and best practices

πŸ“ž Support

If you have questions or need help:

  1. πŸ“– Check the documentation
  2. πŸ” Search existing issues
  3. πŸ’¬ Open a new issue for bugs or feature requests

Made with ❀️ for accessible education

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors