A user-friendly web application designed to analyze exam response sheets with detailed subject-wise performance breakdowns.
- Student Interface: Easily upload response sheets and receive detailed analysis.
- Admin Dashboard: Manage answer keys, approve submissions, and monitor statistics.
- Blog System: Create and manage SEO-friendly blog posts for exam preparation.
- GitHub OAuth: Secure admin authentication using GitHub accounts.
- MySQL Database: Reliable data storage powered by Prisma ORM.
Follow these simple steps to set up and run the application:
Start by cloning the project repository and installing dependencies:
git clone https://github.com/DishantSinghDev2/exams-analysis.git
cd exam-analysis
npm installSet up GitHub OAuth for secure admin authentication:
- Log in to your GitHub account.
- Navigate to Settings > Developer settings > OAuth Apps.
- Create a new OAuth App with the following details:
- Authorization callback URL:
http://localhost:3000/api/auth/callback/github
- Authorization callback URL:
- Copy the Client ID and Client Secret into the
.envfile.
Prepare the database configuration:
- Copy the example environment file:
cp .env.example .env
- Open
.envand update the following:- DATABASE_URL: Your database connection string.
- GitHub OAuth credentials: Add the Client ID and Client Secret.
Generate the Prisma client and seed sample data:
- Update the
emailfield in theadminstable located inprisma/seed.ts. - Run the following command:
npm run db:setup
Start the development server:
npm run devVisit http://localhost:3000?mode=with_sample to access the application. Adding ?mode=with_sample enables sample data for testing.
- Enter exam details (e.g., date, shift, subject combination).
- Upload the response sheet URL or paste its content.
- View detailed analysis if the answer key is available.
- Submit an answer key for approval if not available.
- Log in using your authorized GitHub account.
- Upload answer keys directly.
- Review and approve student-submitted answer keys.
- Manage marking schemes and monitor statistics.
Create and manage blog posts for exam preparation:
- Add markdown files in the
content/blog/[exam]/[year]/directory. - Include proper frontmatter for metadata (e.g., title, date, tags).
- Blog posts are automatically served at
/blog/[exam]/[year]/[filename].
- Upload response sheets via URL or paste content.
- Real-time parsing and analysis.
- Subject-wise performance breakdown.
- Submit answer keys for approval.
- Detailed question-by-question analysis.
- GitHub OAuth authentication with email restrictions.
- Manage answer keys and pending approvals.
- View statistics and perform bulk operations.
- Markdown-based articles with SEO-friendly URLs.
- Organized by exam, year, and subject.
- Responsive design for all devices.
- Error handling and feedback mechanisms.
- Input validation and sanitization.
- Optimized database relationships and constraints.
- SEO enhancements for better visibility.
POST /api/analyze- Analyze response sheets.POST /api/submit-answer-key- Submit answer keys for approval.POST /api/parse-pdf- Parse PDF files.
GET /api/admin/stats- View dashboard statistics.GET /api/admin/pending-keys- List pending answer keys.POST /api/admin/manual-answer-key- Upload answer keys manually.POST /api/admin/approve-key- Approve submitted answer keys.POST /api/admin/reject-key- Reject submitted answer keys.
- Database Connection: Ensure the
DATABASE_URLin.envis correct. - GitHub OAuth: Verify the callback URL matches exactly.
- Admin Access: Ensure your email is listed in the
adminstable.
- Add database indexes for frequently queried fields.
- Optimize images using Next.js.
- Use static generation for blog posts.
- Cache answer keys for faster access.
