Thank you for your interest in contributing to Study Buddy KKW! We welcome contributions from developers, students, and open-source enthusiasts. Whether you are fixing a bug, enhancing the UI, standardizing syllabus docs, or adding new subject notes, this guide will help you set up your development environment and follow project standards.
- Getting Started & Local Setup
- 🌿 Git Branch Discipline
- ✍️ Conventional Commit Guidelines
- 📁 Adding & Updating Subject Content
- ✅ Pull Request Submission Checklist
Ensure your system meets the following requirements before getting started:
- Node.js:
v18.0.0or higher - npm:
v9.0.0or higher - Git: Installed and configured on your machine
- Fork the official repository Sanket-103-pvt/StudyBuddy-KKW to your GitHub account.
- Clone your forked repository locally:
git clone https://github.com/YOUR_USERNAME/StudyBuddy-KKW.git cd StudyBuddy-KKW - Add the main upstream repository as a remote:
git remote add upstream https://github.com/Sanket-103-pvt/StudyBuddy-KKW.git git fetch upstream
- Copy the example environment file:
cp .env.local.example .env.local
- Open
.env.localand configure your API keys (optional for basic UI development, required for AI Study Planner features):GEMINI_API_KEY=your_google_gemini_api_key_here
Install the project dependencies using npm:
npm installStart the Next.js local development server:
npm run devOpen http://localhost:3000 in your browser to view the application with hot reloading.
Study Buddy uses an automatic AJV JSON Schema Validator to ensure subject notes and resource links in content/ conform strictly to content-schema.json.
Run the validator script locally:
npm run validateRun unit tests using Jest:
npm testVerify that the production build compiles cleanly (this automatically triggers content schema validation during prebuild):
npm run buildAll branch names must match one of the following issue formats:
| Category | Prefix | Example Branch Name |
|---|---|---|
| New Feature / UI | feat/* |
feat/toast-notifications-system |
| Bug Fix | fix/* |
fix/mobile-navbar-scroll-overflow |
| Documentation / Content | docs/* |
docs/standardize-year-page-nomenclature |
| Refactoring | refactor/* |
refactor/recent-history-hook |
| Security Fix | security/* |
security/sanitize-url-inputs |
| CI / Tooling / Scripts | ci/* |
ci/json-schema-validator |
| UI Styling / Theme | style/* |
style/glassmorphism-card-shadows |
| Testing | test/* |
test/date-utils-unit-tests |
- Never commit directly to
master: Always work inside a dedicated branch. - One Issue = One Branch = One PR: Keep branches focused on a single task or issue. Do not mix unrelated changes in one branch.
- Branch from Latest Upstream Master: Always fetch and merge
upstream/masterbefore starting a new branch:git checkout master git fetch upstream git merge upstream/master git checkout -b feat/your-feature-name
To keep your feature branch up-to-date with recent changes merged into main:
git fetch upstream
git merge upstream/masterIf merge conflicts occur:
- Open the conflicted files and resolve the differences file-by-file.
- Never blindly accept all incoming or current changes (
--oursor--theirs). - Run
npm testandnpm run buildafter resolving conflicts to ensure the build remains clean. - Stage the resolved files and commit the merge:
git add . git commit -m "Merge upstream/master into feat/your-feature-name"
We enforce Conventional Commit Messages to maintain a clean git history and automated changelogs.
type(scope): description
- Type: Must be one of the recognized standard types.
- Scope (optional): The module, component, or area being modified (e.g.
auth,ui,nomenclature,schema). - Description: Concise summary in imperative present tense (e.g., "add", "fix", "update"). Keep under 72 characters.
feat: A new user-facing feature or componentfeat(ui): add toast notifications for pinned notes
fix: A bug fixfix(navbar): resolve bottom navigation tab overlap on mobile
docs: Documentation or syllabus text changesdocs(nomenclature): standardize year titles across year pages
ci: CI/CD build scripts, workflows, or validation toolsci(schema): implement automatic JSON schema validator
refactor: Code changes that neither fix a bug nor add a featurerefactor(storage): simplify bookmark parsing helper
style: Formatting, white-space, or visual design tweaksstyle(cards): add subtle hover scaling to subject cards
test: Adding or updating unit test suitestest(utils): add boundary tests for date utility functions
chore: Maintenance, updating dependencies, or build configchore(deps): update devDependencies in package.json
You can add new handwritten notes, Drive folders, or PYQ papers by editing the JSON files in the content/ folder without touching application code.
- Locate the year directory (e.g.
content/first-year/orcontent/second-year/). - Add or modify the subject JSON file adhering strictly to
content-schema.json:{ "id": "subject-id", "name": "Subject Title in Title Case", "year": "first-year", "icon": "book-open", "lastUpdated": "YYYY-MM-DD", "units": [ { "unitNumber": 1, "title": "Unit Title", "resources": [ { "label": "Handwritten Notes Unit 1", "type": "file", "url": "https://drive.google.com/...", "lastUpdated": "YYYY-MM-DD" } ] } ] } - Run
npm run validateto ensure your JSON formatting passes schema checks.
Before opening your Pull Request, make sure you complete the following checklist:
- My branch is created from the latest
upstream/masterbranch. - My branch name follows the required format (
feat/*,fix/*,docs/*, etc.). - All subject content JSON files pass schema validation (
npm run validate). - All unit tests pass cleanly (
npm test). - The production build compiles with zero errors (
npm run build). - No
.env, secret keys, node_modules, or temporary files are staged. - Commit messages follow conventional commit format (
type(scope): description). - The PR title follows conventional format and references the target issue number (e.g.,
docs(setup): add contributing guidelines (#54)). - A detailed summary and verification steps are included in the PR description.
Thank you for helping make Study Buddy KKW better for every engineering student! 🎓🚀