PROJECT OVERVIEW:
The application, titled 'Akademik Dürüstlük Kontrolü' (Academic Integrity Checker), is a SaaS platform designed to combat the growing problem of misinformation and fraudulent claims within academic research. It aims to automatically verify claims, cross-reference cited sources, and identify inconsistencies or false statements in scholarly papers. The core value proposition is to enhance the credibility and reliability of academic research, providing a vital tool for researchers, institutions, and publishers to maintain scientific integrity. This tool will specifically address issues like those highlighted in the Hacker News discussion about false claims in a widely-cited paper, where corrections and consequences were lacking, particularly in business school publications. By automating the verification process, it saves researchers valuable time and effort while significantly reducing the risk of relying on or propagating inaccurate information.
TECH STACK:
- Frontend: React.js (using Create React App for simplicity or Next.js for potential SSR/SEO benefits if planning a public-facing content aspect later, though for MVP, CRA is sufficient)
- Styling: Tailwind CSS for rapid UI development and consistent styling.
- State Management: Zustand or Jotai for lightweight, efficient state management, suitable for a single-page application.
- Routing: React Router DOM for navigation within the SPA.
- API Interaction: Axios for making HTTP requests to a potential backend (or for fetching mock data initially).
- Utility Libraries: Lodash for utility functions, perhaps a PDF parsing library (like pdf.js) if direct PDF upload analysis is a core feature.
CORE FEATURES:
1. **Document Upload & Processing:**
* User Flow: User navigates to the upload section, clicks an 'Upload Document' button, selects a file (PDF, DOCX) from their local system, and initiates the upload. The system shows a progress indicator. Upon successful upload, the document is parsed, and its text content is extracted.
* Details: Handles various document formats, extracts text content, and performs initial text cleaning (e.g., removing headers/footers, handling special characters).
2. **Claim Identification & Extraction:**
* User Flow: After document processing, the system automatically identifies key claims or assertions made within the text. These identified claims are presented to the user, possibly in a list format, allowing the user to review them.
* Details: Utilizes Natural Language Processing (NLP) techniques (even simple regex or keyword matching for MVP) to pinpoint declarative statements that require evidence or citation.
3. **Source Verification & Cross-Referencing:**
* User Flow: For each identified claim, the system attempts to find the cited source(s) within the document. It then queries external academic databases (simulated via mock data for MVP) or provided links to retrieve information about the cited source and its content relevant to the claim.
* Details: Extracts citation information (author, year, title, journal/conference). For MVP, this might involve searching a local mock database of research papers or using mock API endpoints that return pre-defined verification results.
4. **Inconsistency Detection:**
* User Flow: The system compares the extracted claims against the information retrieved from their sources. It flags any discrepancies, contradictions, or unsupported statements.
* Details: Logic to identify differences in findings, methodologies, conclusions, or data presented in the cited source versus the claim made in the current document.
5. **Report Generation:**
* User Flow: Once all claims and sources are analyzed, a comprehensive report is generated. This report summarizes the document's key claims, their verification status (verified, unverified, contradictory), and provides links to supporting evidence or flags potential issues.
* Details: The report should be clear, concise, and actionable, highlighting the most critical findings.
6. **User Dashboard:**
* User Flow: A central dashboard where users can see a list of their uploaded documents, their analysis status, and access generated reports. Ability to search and filter documents.
* Details: Provides an organized view of user activity and results.
UI/UX DESIGN:
- **Layout:** Single Page Application (SPA) structure. Main navigation (Upload, Dashboard, Settings) likely in a sidebar or top navigation bar. Content area displays the active feature. Clean, minimalist aesthetic.
- **Color Palette:** Primary: A calming, trustworthy blue (e.g., `#4A90E2`). Secondary: A neutral gray for text and backgrounds (e.g., `#F8F9FA` for light backgrounds, `#343A40` for dark text). Accent: A subtle green for success states (e.g., `#28A745`) and a muted red/orange for warnings/errors (e.g., `#DC3545`).
- **Typography:** Use a clean, readable sans-serif font like 'Inter' or 'Lato'. Clear hierarchy using font weights and sizes (e.g., H1 for page titles, H2 for sections, standard paragraphs for body text).
- **Responsive Design:** Mobile-first approach. Use Tailwind CSS's responsive prefixes (sm:, md:, lg:) to ensure usability across devices. Navigation might collapse into a hamburger menu on smaller screens. Content should reflow gracefully.
COMPONENT BREAKDOWN:
- `App.js`: Main application component, sets up routing.
- `Header.js`: Top navigation bar or branding element.
- `Navigation.js`: Sidebar or top navigation links (Dashboard, Upload, Settings).
- `DocumentUpload.js`: Handles file input, upload button, progress indicator. Receives `onUploadSuccess` callback.
- `AnalysisProgress.js`: Displays the status of document analysis (e.g., 'Parsing text', 'Verifying claims').
- `ClaimList.js`: Displays a list of identified claims. Receives `claims` array and `onClaimSelect` handler.
- `ClaimListItem.js`: Represents a single claim in the list, showing its text and verification status.
- `SourceVerification.js`: Shows details about the verification of a specific claim, including source information and findings. Receives `claimDetails` object.
- `ReportViewer.js`: Displays the final analysis report. Receives `reportData` object.
- `Dashboard.js`: Main user dashboard, lists uploaded documents and their status. Receives `documents` array.
- `DocumentListItem.js`: Represents a single document in the dashboard list.
- `Modal.js`: Generic modal component for displaying detailed information or confirmations.
DATA MODEL:
- `Document`: { id: string, name: string, uploadDate: string, status: 'uploaded' | 'processing' | 'completed' | 'error', reportId?: string }
- `Claim`: { id: string, text: string, sourceCitations: string[], verificationStatus: 'verified' | 'unverified' | 'contradictory' | 'error', explanation?: string }
- `VerificationResult`: { source: string, citationDetails: object, findings: string, consistency: boolean }
- `Report`: { id: string, documentId: string, summary: string, claims: Claim[], verificationResults: VerificationResult[] }
- **State Structure (using Zustand/Jotai):**
* `documents`: Array of `Document` objects.
* `currentDocument`: The document currently being processed or viewed.
* `claims`: Array of `Claim` objects for the current document.
* `report`: The `Report` object for the completed analysis.
* `isLoading`: Boolean flag for global loading states.
* `error`: String or object for error handling.
- **Mock Data Format:** JSON objects mimicking the above structures. For `SourceVerification`, mock data will simulate successful verification, failed verification, or contradictory findings for specific claims.
ANIMATIONS & INTERACTIONS:
- **Page Transitions:** Subtle fade-in/fade-out transitions between different sections using `Framer Motion` or CSS transitions.
- **Button Hovers:** Slight scale-up or background color change on button hovers.
- **Upload Progress:** Animated progress bar or spinner during file upload and analysis.
- **Loading States:** Skeleton loaders or spinners displayed while data is being fetched or processed.
- **Micro-interactions:** Subtle animations on list item expansion, status changes (e.g., icon changes from 'processing' to 'completed').
EDGE CASES:
- **Empty States:** Display informative messages when document lists, claims, or reports are empty (e.g., 'No documents uploaded yet. Upload your first paper!').
- **Error Handling:** Gracefully handle API errors, file upload failures, parsing errors. Display user-friendly error messages. Implement retry mechanisms where appropriate.
- **Validation:** Validate file types and sizes on upload. Ensure required fields are filled in user inputs (if any).
- **Accessibility (a11y):** Use semantic HTML, provide ARIA attributes where necessary, ensure sufficient color contrast, keyboard navigation support.
- **Large Files:** Implement strategies for handling large document uploads (chunking, server-side processing, time limits).
- **Complex Citations:** Develop robust parsing for various citation styles (APA, MLA, Chicago, etc.) or focus on extracting key entities (Author, Year, Title).
SAMPLE DATA:
1. **Document Upload Response:**
```json
{
"id": "doc-123",
"name": "AnalysisOfX.pdf",
"uploadDate": "2023-10-27T10:00:00Z",
"status": "processing"
}
```
2. **Claim Identified:**
```json
{
"id": "claim-abc",
"text": "Our study shows a significant 30% increase in efficiency.",
"sourceCitations": ["Smith et al., 2020"]
}
```
3. **Claim Identified (Multiple Sources):**
```json
{
"id": "claim-def",
"text": "The new method outperforms existing ones.",
"sourceCitations": ["Jones, 2019", "Williams, 2021"]
}
```
4. **Verification Result (Verified):**
```json
{
"source": "Smith et al., 2020",
"citationDetails": {"author": "Smith, J.", "year": 2020, "title": "Efficiency Gains in Method Y"},
"findings": "Paper reports a 30% increase in efficiency using Method Y.",
"consistency": true
}
```
5. **Verification Result (Contradictory):**
```json
{
"source": "Williams, 2021",
"citationDetails": {"author": "Williams, A.", "year": 2021, "title": "Limitations of New Approaches"},
"findings": "Study found only a 5% increase, with significant drawbacks.",
"consistency": false,
"explanation": "Cited paper reports lower efficiency gains and highlights drawbacks not mentioned."
}
```
6. **Verification Result (Unverified - Simulated):**
```json
{
"source": "Brown, 2018",
"citationDetails": null,
"findings": "Could not retrieve or verify the content of this source.",
"consistency": false,
"explanation": "Source could not be accessed or its content is missing."
}
```
7. **Full Report Structure:**
```json
{
"id": "report-xyz",
"documentId": "doc-123",
"summary": "The analysis found 2 claims with direct source support, 1 claim with contradictory evidence, and 1 claim that could not be verified.",
"claims": [ /* Array of Claim objects */ ],
"verificationResults": [ /* Array of VerificationResult objects */ ]
}
```
8. **User Dashboard State:**
```json
[
{
"id": "doc-123",
"name": "AnalysisOfX.pdf",
"uploadDate": "2023-10-27T10:00:00Z",
"status": "completed",
"reportId": "report-xyz"
},
{
"id": "doc-456",
"name": "NewResearch.docx",
"uploadDate": "2023-10-26T15:30:00Z",
"status": "error"
}
]
```
DEPLOYMENT NOTES:
- **Build:** Use `npm run build` or `yarn build` for production build. Ensure `NODE_ENV` is set to `production`.
- **Environment Variables:** Use `.env` file for configuration. Key variables might include `REACT_APP_API_BASE_URL` (if a backend is used), `REACT_APP_MOCK_DATA_ENABLED` (to toggle between mock and real API).
- **Performance:** Optimize build output (code splitting, tree shaking). Lazy load components where appropriate. Optimize image loading if any are used. Ensure efficient state management updates.
- **Hosting:** Suitable for static hosting platforms like Netlify, Vercel, AWS S3/CloudFront, GitHub Pages.