Contributing to Radhika's PlacePrep

Thank you for your interest in contributing to R's PlacePrep! This guide will help you get started.

Ways to Contribute

There are two main ways to contribute to R's PlacePrep:

  1. Content Contribution - Add questions, fix typos, improve documentation
  2. Code Contribution - Fix bugs, add features, improve performance

Content Contribution

Adding Company Questions

Questions are stored as markdown files in the content/companies/ directory.

Directory Structure

content/companies/
├── tcs/
│   ├── aptitude/
│   ├── coding/
│   └── 2025-nqt/
├── infosys/
│   └── 2025-irt/
└── accenture/
    └── 2025-nlt/

Question Format

markdown
## Question Title

Question text goes here...

**Options:**
1. First option
2. Second option
3. Third option
4. Fourth option

**Answer:** 2

**Explanation:**
Detailed explanation of why option 2 is correct.

**Difficulty:** Medium
**Topic:** Topic Name

Adding PYQ (Previous Year Questions)

University PYQ papers are stored in the content/pyq/ directory, organized by branch, subject, and year.

PYQ Directory Structure

content/pyq/
└── cse/
    ├── coa/
    │   ├── 2022/
    │   │   └── questions.md
    │   └── 2023/
    │       └── questions.md
    ├── os/
    │   └── 2023/
    │       └── questions.md
    ├── daa/
    │   ├── 2022/
    │   └── 2023/
    ├── dm/
    │   └── 2022/
    ├── de/
    │   └── 2023/
    └── hrdob/
        ├── 2022/
        └── 2023/

PYQ Markdown Format

Each questions.md file should follow this structure:
markdown
---
title: Subject Name - End Semester YEAR
description: BEU B.Tech Semester X End Semester Examination YEAR
university: Bihar Engineering University, Patna
courseCode: "XXXXXX"
semester: IV
totalMarks: 70
duration: 03 Hours
lastUpdated: 2025-02-09
---

# Subject Name

End Semester Examination - YEAR | Bihar Engineering University, Patna

**Instructions:**
- The marks are indicated in the right-hand margin.
- Attempt FIVE questions in all.
- Question No. 1 is compulsory.

---

## MCQ Section

### Q1: Multiple Choice Questions (Any Seven) [2 × 7 = 14]

**Q1(a): Sub-question Title**

Question text here...

- (i) Option A
- (ii) Option B
- **(iii) Correct Option** ✓
- (iv) Option D

**Answer:** (iii) Correct Option

**Solution:** Explanation of the correct answer.

---

## Long Answer Questions

### Q2: Question Title [14]

Question description here...

**(a)** Part A of the question [7]

**(b)** Part B of the question [7]

**Answer:**

Detailed answer for the question...

How to Add a New Subject

  1. Create the folder structure: content/pyq/[branch]/[subject-slug]/[year]/questions.md
  2. Add the subject to src/types/pyq.ts:
    • Add the slug to SUBJECT_SEMESTER_MAP with the semester number
    • Add the display name to SUBJECT_NAMES
  3. Follow the markdown format above
  4. Include **Answer:** and **Solution:** markers for all questions

PYQ Content Guidelines

  • Sections: Use ## Section Name for paper sections (MCQ, Part A, Part B, etc.)
  • Questions: Use ### Q1: Title [Marks] format for individual questions
  • Sub-questions: Use **Q1(a):** for MCQ sub-parts or **(a)** for long answer sub-parts
  • Answers: Always mark with **Answer:** so the platform can detect and highlight them
  • Solutions: Add **Solution:** for detailed explanations
  • MCQ Correct Option: Bold the correct option and add ✓ mark

Steps to Add Questions

  1. Fork the repository
  2. Navigate to the appropriate company/category folder
  3. Edit the existing .md file or create a new one
  4. Follow the format above
  5. Commit your changes with a descriptive message
  6. Submit a pull request

Content Guidelines

  • Accuracy: Ensure questions and answers are correct
  • Clarity: Write clear, unambiguous questions
  • Formatting: Follow the markdown format exactly
  • Attribution: Don't copy questions from copyrighted sources
  • Language: Use professional, grammatically correct English

Improving Documentation

Help make our documentation better:

  1. Fix typos and grammatical errors
  2. Add missing information
  3. Clarify confusing sections
  4. Add examples and screenshots
  5. Update outdated information
Documentation files are located in content/docs/

Code Contribution

Prerequisites

  • Node.js 20+ or Bun
  • Git
  • Code editor (VS Code recommended)
  • Basic knowledge of Next.js, React, and TypeScript

Development Setup

  1. Fork and Clone

    bash
    git clone https://github.com/YOUR-USERNAME/radhika-placeprep.git
    cd radhika-placeprep
  2. Install Dependencies

    bash
    bun install
  3. Environment Setup

    • Copy .env.example to .env.local
    • Configure Appwrite credentials
    • Set up required environment variables
  4. Run Development Server

    bash
    bun dev
  5. Open Browser

    • Navigate to http://localhost:3000

Making Changes

  1. Create a Branch

    bash
    git checkout -b feature/your-feature-name
  2. Make Your Changes

    • Write clean, readable code
    • Follow existing code style
    • Add comments for complex logic
    • Test your changes thoroughly
  3. Commit Changes

    bash
    git add .
    git commit -m "feat: add your feature description"

    Commit Message Format:

    • feat: New feature
    • fix: Bug fix
    • docs: Documentation changes
    • style: Code style changes
    • refactor: Code refactoring
    • test: Adding tests
    • chore: Maintenance tasks
  4. Push to GitHub

    bash
    git push origin feature/your-feature-name
  5. Create Pull Request

    • Go to GitHub repository
    • Click "New Pull Request"
    • Describe your changes
    • Link related issues
    • Submit for review

Code Guidelines

Code Style

  • Use TypeScript for type safety
  • Follow Next.js best practices
  • Use functional components with hooks
  • Keep components small and focused
  • Use meaningful variable names

File Organization

src/
├── app/           # Next.js app router pages
│   ├── companies/ # Company question pages
│   ├── pyq/       # PYQ pages (branch/semester/subject)
│   ├── exam/      # Exam mode pages
│   ├── dashboard/ # Student dashboard
│   └── admin/     # Admin panel
├── components/    # React components
│   ├── landing/   # Landing page components
│   ├── pyq/       # PYQ-specific components
│   ├── exam/      # Exam components
│   └── ui/        # Shared UI components
├── lib/           # Utility functions
│   ├── pyq-loader.ts    # PYQ content loading
│   ├── pyq-export.ts    # PYQ PDF/Word export
│   ├── companies.ts     # Company configuration
│   └── ai/              # AI evaluation
├── types/         # TypeScript types
│   ├── pyq.ts     # PYQ types & config
│   └── exam.ts    # Exam types
└── hooks/         # Custom React hooks
content/
├── companies/     # Company question content (markdown)
├── pyq/           # PYQ content organized by branch/subject/year
└── docs/          # Documentation (markdown)

Component Structure

typescript
'use client' // If client component

import { useState } from 'react'
import type { ComponentProps } from '@/types'

interface MyComponentProps {
  title: string
  onAction: () => void
}

export function MyComponent({ title, onAction }: MyComponentProps) {
  const [state, setState] = useState(false)

  return (
    <div>
      <h1>{title}</h1>
      {/* Component content */}
    </div>
  )
}

Testing

  • Test your changes manually
  • Ensure no console errors
  • Test on different screen sizes
  • Verify light and dark mode
  • Check accessibility

Areas to Contribute

High Priority

  • Bug fixes
  • Performance improvements
  • Accessibility enhancements
  • Mobile responsiveness
  • Test coverage

Feature Ideas

  • Advanced analytics
  • Question randomization
  • Exam templates
  • Bulk import/export
  • Email notifications
  • Performance reports
  • Leaderboards
  • More university PYQ papers (ECE, ME, EE branches)
  • PYQ answer verification and proofreading
  • Subject-wise question tagging for PYQs

Documentation

  • API documentation
  • Component documentation
  • Setup guides
  • Deployment guides

Pull Request Process

Before Submitting

  • Code builds without errors
  • No TypeScript errors
  • Changes are tested
  • Code follows style guidelines
  • Commit messages are clear
  • Documentation is updated

Review Process

  1. Automated Checks: Linting and build verification
  2. Code Review: Maintainer reviews your code
  3. Feedback: Address any requested changes
  4. Approval: PR is approved
  5. Merge: Changes are merged to main branch

After Merge

  • Your contribution will be included in the next release
  • You'll be credited in the release notes
  • Thank you for contributing! 🎉

Questions or Need Help?

  • Check existing issues and discussions
  • Create a new issue for bugs
  • Start a discussion for feature ideas
  • Reach out to maintainers

Code of Conduct

  • Be respectful and inclusive
  • Provide constructive feedback
  • Help others learn and grow
  • Focus on what's best for the community

License

By contributing, you agree that your contributions will be licensed under the same license as the project.


Thank you for making Radhika's PlacePrep better! ❤️

Need help? Check the FAQ or Troubleshooting guide.