Skip to content

docs: add CONTRIBUTING.md guide for new contributors#93

Open
pratiksanjaytigeranalytics wants to merge 1 commit into
mlc-ai:mainfrom
pratiksanjaytigeranalytics:docs/add-contributing-guide
Open

docs: add CONTRIBUTING.md guide for new contributors#93
pratiksanjaytigeranalytics wants to merge 1 commit into
mlc-ai:mainfrom
pratiksanjaytigeranalytics:docs/add-contributing-guide

Conversation

@pratiksanjaytigeranalytics
Copy link
Copy Markdown

Description

This PR adds a comprehensive CONTRIBUTING.md file to help new contributors understand how to contribute to the WebLLM Chat project.

What's Included

📚 Documentation Sections

  1. Getting Started - Prerequisites and setup instructions
  2. Project Structure - Visual overview of the codebase organization
  3. Key Files to Know - Organized by contribution type:
    • UI Changes (chat.tsx, home.tsx, settings.tsx)
    • Model/AI Integration (webllm.ts, constant.ts)
    • State Management (store files)
    • Internationalization (locale files)
    • Configuration files
  4. Development Workflow - Git workflow and commit conventions
  5. Coding Standards - TypeScript, React, naming conventions
  6. Testing Your Changes - Manual testing checklist
  7. Getting Help - Resources and common questions

🎯 Goals

  • Help new contributors quickly find relevant files for their contribution
  • Provide clear coding standards and best practices
  • Reduce repetitive questions about setup and workflow
  • Make the project more accessible to the open source community

✅ Benefits

  • For New Contributors: Clear guidance on where to start and what files to modify
  • For Maintainers: Fewer setup and process questions
  • For Project: More consistent code quality and better contributor experience

Testing

  • ✅ File renders correctly on GitHub
  • ✅ All links are valid
  • ✅ Structure is clear and easy to navigate
  • ✅ Examples are practical and relevant

Related Issues

Closes #90

Checklist

  • Documentation is clear and comprehensive
  • Follows conventional commit format
  • All links tested and working
  • Organized for easy navigation
  • Includes practical examples

- Added comprehensive contribution guide
- Documented project structure and key files
- Included development workflow and coding standards
- Added testing checklist and common questions

Fixes mlc-ai#90
@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello @pratiksanjaytigeranalytics, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a new CONTRIBUTING.md file to the repository, significantly improving the onboarding experience for new contributors. The document outlines prerequisites, setup instructions, project architecture, key files relevant to different contribution types, development workflow, coding standards, and testing guidelines. Its primary goal is to streamline the contribution process, ensure consistent code quality, and foster a more welcoming environment for community involvement.

Highlights

  • New Contribution Guide: A comprehensive CONTRIBUTING.md file has been added to provide clear guidance for new contributors on how to set up the project, understand its structure, and follow development workflows.
  • Enhanced Onboarding: The new guide aims to reduce repetitive questions for maintainers and make the project more accessible to the open-source community by detailing key files, coding standards, and testing procedures.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • CONTRIBUTING.md
    • Added a new CONTRIBUTING.md file.
    • Included sections for getting started, project structure, key files, development workflow, coding standards, and testing.
    • Provided resources and common questions to assist contributors.
Activity
  • The pull request was opened by pratiksanjaytigeranalytics.
  • No human activity (comments, reviews) has occurred yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This is a great addition to the project! The CONTRIBUTING.md is comprehensive and will be very helpful for new contributors. I've left a few suggestions to improve clarity and consistency in the documentation. Overall, excellent work!

Comment thread CONTRIBUTING.md
│ │ └── prompt.ts # Prompt templates
│ ├── locales/ # Internationalization
│ ├── styles/ # Global styles (SCSS)
│ └── utils/ # Utility functions
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The project structure diagram is missing the app/constant.ts file. This file is mentioned later as a key file for model integration and in the FAQ for adding new models. To avoid confusion for new contributors, it would be beneficial to add it to the diagram for consistency.

Suggested change
── utils/ # Utility functions
── utils/ # Utility functions
│ └── constant.ts # Model configurations and constants

Comment thread CONTRIBUTING.md
- **`app/components/home.tsx`** - Main layout and sidebar
- **`app/components/settings.tsx`** - Settings and configuration UI
- **`app/components/model-select.tsx`** - Model selection component
- **`app/styles/*.scss`** - Styling for components
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

There's a slight inconsistency regarding the location of component styles. This line suggests styles are in app/styles/, but other sections (like 'Styling' standards on line 216 and the FAQ on line 283) indicate that component-specific styles are co-located as SCSS modules (e.g., app/components/chat.module.scss).

To avoid confusion, you might want to clarify this. For example, you could change this line to mention co-located .module.scss files and specify that app/styles/ is for global styles.

Comment thread CONTRIBUTING.md
git push origin feature/your-feature-name
```

5. **Submit your contribution** - Follow the project's PR and issue guidelines for the submission process
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This instruction is a bit generic. To make it more actionable for new contributors, you could provide a more specific guideline, such as mentioning the target branch for pull requests and referencing the PR template.

Suggested change
5. **Submit your contribution** - Follow the project's PR and issue guidelines for the submission process
5. **Submit your contribution** - Open a pull request to the `main` branch and follow the PR template to describe your changes.

Copy link
Copy Markdown

@Arunvallal Arunvallal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall Assessment

Strengths:

  • Comprehensive and well-organized structure
  • Clear project structure overview helps newcomers navigate codebase
  • Practical examples (commit messages, component structure)
  • Good coverage of TypeScript, React, and Next.js best practices
  • Manual testing checklist is valuable for this project

Areas for Improvement:

  • Package manager consistency (project uses Yarn)
  • File naming conventions don't match actual project files
  • PR submission process needs more detail
  • Missing info about Husky hooks and issue templates

Recommendation:
This is a great foundation! After addressing the inline comments about consistency with actual project conventions, this will be ready to merge.

Verdict: REQUEST_CHANGES - Minor updates needed to match project conventions

Comment thread CONTRIBUTING.md
- [Testing Your Changes](#testing-your-changes)
- [Getting Help](#getting-help)

## Getting Started
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing Important Info:

  • No mention of Husky pre-commit hooks (exists in project)
  • No reference to .github/ISSUE_TEMPLATE/ files
  • Consider adding section on:
    • Automated checks (lint runs on commit via Husky)
    • Using issue templates for bug reports/features

Comment thread CONTRIBUTING.md
4. **Push your changes**
```bash
git push origin feature/your-feature-name
```
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Vague Submission Process:

  • "Follow the project's PR and issue guidelines" lacks specifics
  • Suggest adding:
    • Create PR from your fork
    • Link to related issue
    • Use PR template if available (check .github/PULL_REQUEST_TEMPLATE/)
    • Wait for maintainer review

Comment thread CONTRIBUTING.md
- **Use Prettier formatting** - Code is auto-formatted
- **Use descriptive variable names** - Be clear, not clever
- **Add comments** for complex logic

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

File Naming Inconsistency:

  • Existing component files use kebab-case: chat.tsx, home.tsx, settings.tsx
  • Guide suggests PascalCase: ChatMessage.tsx
  • Recommend updating to match actual project convention (kebab-case for files)

Comment thread CONTRIBUTING.md
# or
yarn install
# or
pnpm install
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Package Manager Consistency:

  • Project uses Yarn (see package.json "packageManager": "yarn@1.22.22")
  • Suggest showing only yarn commands to avoid confusion
  • Alternative: Add note that yarn is preferred

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary

Great work on creating the CONTRIBUTING.md file! This is a valuable addition that will help new contributors get started quickly. Here's my review:

✅ Strengths

  • Clear project structure with visual tree layout
  • Well-organized "Key Files to Know" section by contribution type
  • Practical examples (component structure, commit conventions)
  • Comprehensive testing checklist
  • Good balance between detail and simplicity

💡 Suggestions for Improvement

Content:

  • Add link to Code of Conduct if one exists separately
  • Consider adding troubleshooting section for common setup issues
  • Add example of good first issues or labels for beginners
  • Include estimated time for first-time setup

Structure:

  • Consider adding a "Quick Start for Experienced Developers" section at top
  • Add visual badges (build status, license) if available

Technical:

  • Verify all file paths match current project structure
  • Add note about Node.js version compatibility testing

Minor Items

  • Line 27: Consider mentioning fork sync process for long-term contributors
  • Line 138: Conventional commits - consider linking to full spec
  • Line 262: Add accessibility testing to manual checklist
  • Line 298: Consider adding maintainer response time expectations

Overall Assessment

This PR successfully addresses issue #90 and provides clear guidance for contributors. The suggested improvements are optional enhancements that can be addressed in future iterations.

Ready for maintainer review! 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request]: Add CONTRIBUTING.md file

2 participants