- Overview
- Recent Updates
- Features
- Architecture
- Quick Start
- Installation
- Configuration
- Usage
- API Documentation
- Development
- Testing
- Deployment
- Contributing
- Support
- License
EduPapers is a comprehensive, AI-powered question paper management system designed for educational institutions, students, and educators. The platform streamlines the process of organizing, processing, and sharing examination papers with intelligent question extraction and categorization capabilities.
- π€ AI-Powered Processing: Leverages Google Gemini AI for intelligent question extraction and analysis
- π Smart Organization: Automatically categorizes papers by university, course, semester, and subject
- π Secure & Scalable: Built with modern security practices and scalable architecture
- π± Responsive Design: Seamless experience across desktop, tablet, and mobile devices
- β‘ Real-time Updates: Live progress tracking and instant feedback during processing
- π Dark Mode: Beautiful water ripple animations with smooth theme transitions
π Beautiful Dark Mode Features:
- π§ Water Ripple Animation: Stunning water drop animation starting from the dark mode toggle button
- π Multi-layered Ripples: Realistic physics with surface tension effects and progressive delays
- π Bidirectional Animation: Smooth transitions between light β dark mode with adaptive effects
- β‘ GPU-Optimized Performance: Hardware-accelerated animations with smooth easing curves
- π¨ Enhanced UI Theming: Dynamic AppBar backgrounds, improved Material-UI component styling
- π Adaptive Color Schemes: Intelligent color adaptation for both light and dark themes
π§ Technical Improvements:
- WaterRippleAnimation Component: Built with Framer Motion for smooth animations
- DarkModeContext: Centralized theme management with animation support
- Click Position Detection: Accurate ripple origin tracking for natural effects
- Performance Optimization: Efficient animation cleanup and memory management
- Enhanced Theme System: Component-level overrides for consistent theming
ποΈ Backend Improvements:
- π Streamlined Structure: Moved all Python processing files to
backend/src/for better organization - π Cleaner Architecture: Consolidated AI processing logic into a single, maintainable directory
- π§ Updated References: All Node.js server references now point to the new
backend/src/structure - π¦ Simplified Deployment: More conventional backend layout for easier deployment and maintenance
- π§Ή Code Organization: Removed redundant directory nesting and improved code accessibility
- ποΈ Dependency Cleanup: Removed redundant root
node_modulesfor cleaner project structure
π New Backend Structure:
/backend/src/- All Python AI processing logic (main.py, gemini_client.py, etc.)/backend/server/- Node.js API server/backend/output/- Processing results storage- Clean separation with conventional naming patterns
π― Major Improvements:
- ποΈ Restructured Architecture: Separated frontend and backend into dedicated directories
- π Bug Fixes: Fixed notification issues showing "0 questions" during processing
- π§Ή Code Cleanup: Removed unused test files, debug scripts, and temporary files
- π¦ Dependency Management: Separate package.json for frontend and backend services
- π Enhanced Deployment: Improved build process and deployment configuration
π New Structure:
/frontend/- React TypeScript application with Vite/backend/- Node.js API server and Python AI processing engine- Clean separation of concerns for better maintainability
π§ Fixed Issues:
- Resolved "Processing completed! Found 0 questions" false notifications
- Fixed hardcoded "0" display during PDF processing
- Improved error handling and user feedback
- Updated all internal references and import paths
| Feature | Description | Status |
|---|---|---|
| PDF Upload & Processing | Drag-and-drop PDF upload with intelligent text extraction | β |
| AI Question Extraction | Advanced OCR and AI-powered question identification | β |
| Smart Categorization | Automatic organization by academic hierarchy | β |
| Multi-format Support | Support for various PDF formats and layouts | β |
| Progress Tracking | Real-time processing status with detailed feedback | β |
| Search & Filter | Advanced search across questions and papers | β |
| User Management | Role-based access control (Student, Pro, Admin) | β |
| Export Options | Multiple export formats (JSON, PDF, etc.) | β |
| Dark Mode | Beautiful water ripple animations and theme switching | β |
- Modern Tech Stack: React 18, TypeScript, Node.js, Python
- Advanced Animations: Framer Motion with water ripple effects and smooth transitions
- Dark Mode Support: GPU-optimized theme switching with realistic physics animations
- Database: Supabase with PostgreSQL backend
- Authentication: Secure user authentication and authorization
- File Storage: Cloud-based file storage and management
- API Integration: RESTful APIs with comprehensive error handling
- Build System: Vite with optimized production builds
- Styling: Tailwind CSS with responsive design patterns and Material-UI theming
graph TB
A[Frontend - React/TypeScript] --> B[API Gateway - Express.js]
B --> C[PDF Processor - Node.js]
C --> D[Python AI Engine - backend/src/]
D --> E[Google Gemini AI]
B --> F[Supabase Backend]
F --> G[PostgreSQL Database]
F --> H[File Storage]
subgraph "Processing Pipeline"
C --> I[PDF Upload]
I --> J[Text Extraction]
J --> K[AI Analysis]
K --> L[Question Categorization]
L --> M[Database Storage]
end
subgraph "Backend Structure"
D --> N[main.py - Entry Point]
D --> O[gemini_client.py - AI Service]
D --> P[pdf_extractor.py - Text Processing]
D --> Q[supabase_integration.py - Database]
end
Clean Separation:
- Frontend (
/frontend/) - Pure React/TypeScript UI layer - Backend API (
/backend/server/) - Node.js REST API and routing - AI Processing (
/backend/src/) - Python AI and processing logic - Storage (
/backend/output/) - Processed results and temporary files
Scalability:
- Microservices-ready architecture
- Independent deployment of frontend and backend
- Modular Python processing components
- Clear data flow and responsibility separation
Maintainability:
- Conventional directory structure
- Type-safe interfaces between layers
- Centralized configuration management
- Comprehensive error handling and logging
EduPapers/
βββ π frontend/ # Frontend application
β βββ π src/ # React source code
β β βββ π components/ # Reusable React components
β β β βββ Navbar.tsx # Navigation with dark mode toggle
β β β βββ WaterRippleAnimation.tsx # Dark mode animations
β β β βββ QuestionEditor.tsx # Question editing interface
β β βββ π pages/ # Application pages
β β βββ π contexts/ # React contexts (Auth, DarkMode, etc.)
β β β βββ AuthContext.tsx # Authentication context
β β β βββ DarkModeContext.tsx # Theme management context
β β βββ π hooks/ # Custom React hooks
β β βββ π lib/ # External integrations
β β βββ π theme/ # Material-UI theme configurations
β β β βββ mui-theme.ts # Dark/light theme definitions
β β βββ π types/ # TypeScript definitions
β βββ π public/ # Static assets
β βββ π config/ # Build & deployment configs
β β βββ vite.config.ts # Vite configuration
β β βββ tailwind.config.js # Tailwind CSS config (with dark mode)
β β βββ tsconfig.json # TypeScript config
β βββ index.html # Main HTML template
β βββ package.json # Frontend dependencies (includes framer-motion)
β
βββ π backend/ # Backend services
β βββ π src/ # Python AI processing engine
β β βββ main.py # Main processing entry point
β β βββ gemini_client.py # AI integration service
β β βββ pdf_extractor.py # PDF text extraction
β β βββ supabase_integration.py # Database operations
β β βββ production_webhook.py # Webhook handlers
β βββ π server/ # Node.js API server
β β βββ index.js # Main API server
β β βββ pdf-processor.js # PDF processing service
β βββ π output/ # Processing results
β βββ π temp-processing/ # Temporary file storage
β βββ package.json # Backend Node.js dependencies
β βββ requirements.txt # Python dependencies
β βββ runtime.txt # Python runtime version
β
βββ π docs/ # Documentation
βββ π database/ # Database schemas & migrations
βββ π scripts/ # Utility scripts
βββ .env # Environment variables
βββ README.md # This file
Ensure you have the following installed:
- Node.js >= 18.0.0
- Python >= 3.8
- npm or yarn
- Git
# Clone and setup the entire project
git clone https://github.com/your-username/edupapers.git
cd edupapers && npm install && npm run setupNote: This project has been recently reorganized with separate
frontend/andbackend/directories for better maintainability and deployment flexibility.
-
Clone Repository
git clone https://github.com/your-username/edupapers.git cd edupapers -
Install Frontend Dependencies
cd frontend npm install cd ..
-
Install Backend Dependencies
cd backend npm install pip install -r requirements.txt cd ..
-
Environment Setup
cp .env.example .env # Configure your environment variables -
Start Development
# Start both frontend and backend npm run dev-with-processor # Or start individually: npm run frontend:dev # Frontend only npm run backend:dev # Backend only
Create a .env file in the project root with the following configuration:
# Supabase Configuration (Required)
VITE_SUPABASE_URL=https://your-project.supabase.co
VITE_SUPABASE_ANON_KEY=your-supabase-anon-key
SUPABASE_SERVICE_ROLE_KEY=your-service-role-key
# PDF Processing Service
VITE_WEBHOOK_URL=http://localhost:8000/webhook/process-pdf
# AI Integration
GEMINI_API_KEY=your-google-gemini-api-key
# Firebase Authentication (Optional)
VITE_FIREBASE_API_KEY=your-firebase-api-key
VITE_FIREBASE_AUTH_DOMAIN=your-project.firebaseapp.com
VITE_FIREBASE_PROJECT_ID=your-project-id
VITE_FIREBASE_STORAGE_BUCKET=your-project.appspot.com
VITE_FIREBASE_MESSAGING_SENDER_ID=your-sender-id
VITE_FIREBASE_APP_ID=your-app-id-
Create a Supabase Project:
- Go to supabase.com
- Create a new project
- Note your project URL and anon key
-
Create Storage Bucket:
-- Create a storage bucket for question papers INSERT INTO storage.buckets (id, name, public) VALUES ('question-papers', 'question-papers', true); -- Alternative bucket names (the app will try these automatically): -- 'documents', 'uploads', 'files'
-
Set up Database Tables:
-- Create question_papers table CREATE TABLE question_papers ( id UUID DEFAULT gen_random_uuid() PRIMARY KEY, title TEXT NOT NULL, file_url TEXT NOT NULL, file_path TEXT NOT NULL, university_id TEXT NOT NULL, course_id TEXT NOT NULL, semester TEXT NOT NULL, year INTEGER NOT NULL, subject TEXT, uploader_name TEXT NOT NULL, uploaded_by UUID REFERENCES auth.users(id), processing_status TEXT DEFAULT 'pending', created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW() );
-
Configure Row Level Security (RLS):
-- Enable RLS ALTER TABLE question_papers ENABLE ROW LEVEL SECURITY; -- Allow authenticated users to read all papers CREATE POLICY "Allow authenticated read" ON question_papers FOR SELECT TO authenticated USING (true); -- Allow authenticated users to insert their own papers CREATE POLICY "Allow authenticated insert" ON question_papers FOR INSERT TO authenticated WITH CHECK (auth.uid() = uploaded_by);
- Required: The
VITE_SUPABASE_URLandVITE_SUPABASE_ANON_KEYare required for the application to function - Storage: The app will automatically try multiple bucket names if the primary one doesn't exist
- Error Handling: Detailed error messages will guide you through any configuration issues
| File | Purpose | Location |
|---|---|---|
vite.config.ts |
Build configuration | /frontend/config/ |
tailwind.config.js |
Styling configuration | /frontend/config/ |
tsconfig.json |
TypeScript configuration | /frontend/config/ |
eslint.config.js |
Code linting rules | /frontend/config/ |
postcss.config.js |
CSS processing | /frontend/config/ |
# Start both frontend and backend services
npm run dev-with-processor
# Or start services individually
npm run frontend:dev # Frontend only (localhost:5173)
npm run backend:dev # Backend only (localhost:8000)- Frontend: http://localhost:5173
- API Server: http://localhost:8000
- Health Check: http://localhost:8000/health
Backend Python Processing:
- All Python files are now in
backend/src/ - Python dependencies:
cd backend && pip install -r requirements.txt - Direct Python testing:
cd backend && python -m src.main
Path Updates:
- Node.js server now references
src/main.pyinstead of old paths - All AI processing logic consolidated in
backend/src/ - Output files stored in
backend/output/
- Upload: Drag and drop PDF files or click to browse
- Processing: AI automatically extracts questions and metadata
- Review: View extracted questions with categorization
- Save: Store processed data in the database
- Export: Download results in various formats
POST /webhook/process-pdf
Content-Type: application/json
{
"file_url": "https://example.com/paper.pdf",
"metadata": {
"university": "University Name",
"course": "Course Name",
"semester": "Semester",
"subject": "Subject Name"
}
}GET /status/:processing_idGET /health{
"success": true,
"status": "completed",
"data": {
"questions": [...],
"metadata": {...},
"processing_time": "2.5s"
}
}| Command | Description |
|---|---|
npm run dev-with-processor |
Start both frontend and backend |
npm run frontend:dev |
Start frontend development server |
npm run backend:dev |
Start backend services |
npm run frontend:build |
Build frontend for production |
npm run frontend:preview |
Preview frontend production build |
npm run frontend:lint |
Run ESLint on frontend |
npm run frontend:type-check |
Run TypeScript checks |
- Code Style: Follow ESLint and Prettier configurations
- TypeScript: Maintain strict type checking
- Testing: Write tests for new features
- Documentation: Update docs for API changes
- Commits: Use conventional commit messages
Frontend Development:
cd frontend
npm run dev # Start frontend dev server
npm run build # Build for production
npm run lint # Run linting
npm run type-check # TypeScript validationBackend Development:
cd backend
npm run start # Start Node.js server
python -m src.main # Run Python processor directly
pip install -r requirements.txt # Install Python dependenciesFull Stack Development:
# From project root
npm run dev-with-processor # Start both servicesfrontend/src/
βββ components/ # Reusable UI components
β βββ Navbar.tsx # Navigation component with dark mode toggle
β βββ WaterRippleAnimation.tsx # Water ripple animation effects
β βββ UniversityCard.tsx # University display card
β βββ QuestionEditor.tsx # Question editing interface
βββ pages/ # Route-based page components
β βββ Home.tsx # Landing page
β βββ Upload.tsx # PDF upload interface
β βββ Profile.tsx # User profile page
βββ contexts/ # React Context providers
β βββ AuthContext.tsx # Authentication context
β βββ DarkModeContext.tsx # Dark mode theme management
βββ hooks/ # Custom React hooks
β βββ useDebounce.ts # Debounce utility hook
βββ lib/ # External service integrations
β βββ supabase.ts # Supabase client
β βββ firebase.ts # Firebase configuration
βββ theme/ # Theme configurations
β βββ mui-theme.ts # Material-UI light/dark theme definitions
βββ types/ # TypeScript type definitions
βββ index.ts # Common types
βββ supabase.ts # Database types
backend/
βββ server/ # Node.js API services
β βββ index.js # Main API server
β βββ pdf-processor.js # PDF processing service
βββ src/ # Python AI processing engine
β βββ main.py # Main processing entry point
β βββ gemini_client.py # AI integration service
β βββ pdf_extractor.py # PDF text extraction
β βββ supabase_integration.py # Database operations
β βββ production_webhook.py # Webhook handlers
βββ output/ # Processing results storage
βββ temp-processing/ # Temporary file storage
βββ package.json # Node.js dependencies
βββ requirements.txt # Python dependencies
βββ runtime.txt # Python version specification
# Run all tests
npm test
# Run specific test suites
npm run test:unit
npm run test:integration
npm run test:e2e
# Test coverage
npm run test:coverage# Test PDF processing
node scripts/test-pdf-processing.js
# Test file downloads
node scripts/test-download.js
# Validate project structure
node scripts/show-structure.js- Write unit tests for utility functions
- Integration tests for API endpoints
- E2E tests for critical user workflows
- Maintain >80% code coverage
# Build the frontend application
cd frontend
npm run build
# Preview the build
npm run previewFrontend Deployment:
# Deploy frontend only
cd frontend
npm install
npm run build
vercel --prodFull Stack Deployment:
# Deploy from project root with backend support
vercel --prodThe project includes optimized Vercel configurations:
vercel.json- Root configuration for full-stack deploymentfrontend/vercel.json- Frontend-specific configuration for standalone deployment
Configuration Features:
- Automatic build optimization for Vite frontend
- API route handling for backend services
- Python dependency installation for AI processing
- Environment variable management
- Custom headers for CORS handling
# Use the configuration in config/staticwebapp.config.json# Build and serve
npm run build
serve -s dist- Set up environment variables on your platform
- Configure database migrations
- Set up file storage buckets
- Configure AI service API keys
Comprehensive documentation is available in the /docs directory:
- Integration Guide - Database setup and configuration
- PDF Processing - AI processing pipeline details
- Troubleshooting - Common issues and solutions
- API Reference - Complete API documentation
- Deployment Guide - Production deployment instructions
We welcome contributions! Please follow these steps:
- Fork the repository
- Create a feature branch
git checkout -b feature/amazing-feature
- Make your changes
- Add tests for new functionality
- Commit your changes
git commit -m 'feat: add amazing feature' - Push to the branch
git push origin feature/amazing-feature
- Open a Pull Request
- Follow existing code style and patterns
- Write clear, descriptive commit messages
- Add tests for new features
- Update documentation as needed
- Ensure all tests pass before submitting
- Documentation: Check the
/docsdirectory first - Issues: Search existing GitHub issues
- Discussions: Join our community discussions
- Email: Contact us at [email protected]
When reporting issues, please include:
- Operating system and version
- Node.js and Python versions
- Steps to reproduce
- Expected vs actual behavior
- Screenshots (if applicable)
We welcome feature requests! Please:
- Check existing issues and discussions
- Provide clear use cases
- Explain the expected behavior
- Consider contributing the feature yourself
This project is licensed under the MIT License - see the LICENSE file for details.
MIT License
Copyright (c) 2025 EduPapers
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.
- React Team - For the amazing React framework
- Supabase - For the excellent backend-as-a-service platform
- Google - For the powerful Gemini AI API
- Vercel - For seamless deployment platform
- Open Source Community - For the fantastic tools and libraries
- Current Version: 2.2.0
- Status: Production Ready
- Last Updated: June 2025
- Dark Mode: β Beautiful water ripple animations
- Backend Structure: β Optimized & Streamlined
- Project Cleanup: β Redundant dependencies removed
- Maintained: β Actively maintained
- Security: β Regular security updates