How haneesh-m/fraud-detection-and-plagarism-checker works
Project type and purpose
• This is a full-stack web application aimed at allowing teachers and students to upload assignments, perform plagiarism checks, and detect potential fraud.
• It consists of two distinct modules:
– myproject-frontend (React)
– myproject-backend (Node.js/Express)
File structure
Top-level
• README.md – Project title and brief description
• SQL schema files (e.g., assignments table.txt, plagarism table.txt, login page.sql, teachers table.txt)
• myproject-backend/
– server.js (main Express server)
– package.json (dependencies)
– uploads/assignments (persisted user files)
• myproject-frontend/
– public/ (static HTML & manifest)
– src/ (React components: Login, Signup, Dashboard, TeacherDashboard, AssignmentUpload, PlagiarismChecker, etc.)
Patterns & clues
• A classic MVC-style split: React (View), Express endpoints (Controller), SQL database (Model)
• File uploads stored on disk under /uploads/assignments
• PlagiarismChecker component suggests an algorithm or service invoked from backend
Extract insights from README
• Project name: “fraud-detection-and-plagarism-checker”
• Purpose: “fraud detection and plagarism checker”
a. Main components
1. Client (Web Browser)
– React UI (myproject-frontend)
– Routes: /login, /signup, /dashboard, /upload, /plagiarism-report, etc.
2. API Layer (myproject-backend)
– Express server (server.js)
– Endpoints:
• POST /api/login
• POST /api/signup
• POST /api/upload-assignment
• GET /api/view-assignments
• POST /api/check-plagiarism
3. File Storage
– Local filesystem at /uploads/assignments
4. Database
– Relational DB (MySQL/PostgreSQL)
– Tables: users (students, teachers), assignments, plagiarism_records
5. (Optional) Plagiarism/Fraud Engine
– Internal module or external service invoked by backend to process uploaded files and generate reports
b. Relationships & data flow
• User interacts with React UI → sends HTTP request to Express
• Express authenticates via DB → returns JWT or session token
• For uploads: Express uses Multer to save file to disk → records metadata in DB → (optionally) invokes plagiarism-engine
• Plagiarism-engine reads files from disk → runs comparison algorithm → outputs similarity score → backend saves results in DB
• Frontend fetches report via API → displays results
c. Architectural patterns & principles
• Separation of concerns: UI vs API vs Data
• RESTful API design
• Stateless authentication (JWT or sessions)
• Modular React components
• Single responsibility for each Express route
• Local file storage decoupled from DB (could be replaced with S3 or similar in future)
d. Key technologies & libraries
• React, React Router
• Node.js, Express, Multer
• SQL database (MySQL/Postgres) via a driver or ORM (e.g., Sequelize)
• Plagiarism checker algorithm (in-house module or npm library)
• CSS modules for styling
Details to capture
• All frontend routes/components (Login, Dashboard, AssignmentUpload, PlagiarismChecker)
• All backend endpoints and their responsibilities
• Database schema entities and relationships
• File storage path and its purpose
• Any asynchronous flows (e.g., background plagiarism processing)
• Error handling or retry mechanisms (optional annotations)