Thank you for your interest in contributing to LinguaLive! This document provides guidelines and instructions to help you contribute effectively to our project. Whether you're fixing bugs, adding features, or improving documentation, we appreciate your help! 💪
- Code of Conduct
- Ways to Contribute
- Getting Started
- Development Setup
- Commit Guidelines
- Branch Naming Conventions
- Pull Request Process
- Testing Guidelines
- Code Style & Linting
- Documentation
- Reporting Issues
- Asking for Help
We are committed to providing a welcoming and inclusive environment for all contributors. Please follow these principles:
- ✨ Be respectful — Treat everyone with kindness and respect
- 🤝 Be collaborative — Help others and accept feedback gracefully
- 🎯 Be constructive — Provide helpful feedback and solutions, not criticism
- 🔒 Be inclusive — Welcome people of all backgrounds and experience levels
- 🚫 No harassment — Any form of harassment, discrimination, or abuse will not be tolerated
Found a bug? Help us squash it! Create a bug report.
Have an idea? Submit a feature request in the Discussions tab.
Pick an issue labeled bug and submit a pull request with your fix.
Browse open issues labeled enhancement or implement something from our roadmap.
Help us write better docs, examples, and guides.
Increase our test coverage and ensure code quality.
Peer review is valuable! Comment on open pull requests.
Click the Fork button on GitHub to create your own copy.
# Clone your fork
git clone https://github.com/hardikrathod777/lingualive-ai-language-coach.git
cd lingualive-ai-language-coachKeep your fork in sync with the main repository.
git remote add upstream https://github.com/original-owner/lingualive-ai-language-coach.gitAlways work on a new branch, never on main.
git checkout -b feature/your-feature-nameSee Branch Naming Conventions for guidance.
Edit files, add features, or fix bugs. See Development Setup.
Follow our Commit Guidelines.
git commit -m "feat: add amazing feature"git push origin feature/your-feature-nameSubmit your PR with a clear description. See Pull Request Process.
- Node.js 18 or higher
- npm or yarn package manager
- Git for version control
- Google Gemini API Key (Get one free)
-
Install dependencies
npm install
-
Set up environment variables
cp .env.example .env.local
Edit
.env.localand add your API key:NEXT_PUBLIC_GEMINI_API_KEY=your_api_key_here -
Start the development server
npm run dev
The app will be available at
http://localhost:3000 -
Run linting
npm run lint
| Command | Description |
|---|---|
npm run dev |
Start development server |
npm run build |
Build for production |
npm run start |
Start production server |
npm run lint |
Run ESLint on all files |
npm run clean |
Clean build artifacts |
Write clear, descriptive commit messages that explain what and why, not just what.
<type>(<scope>): <subject>
<body>
<footer>
Must be one of the following:
- feat — A new feature
- fix — A bug fix
- docs — Documentation only changes
- style — Changes that don't affect code meaning (formatting, whitespace, etc.)
- refactor — Code change that neither fixes a bug nor adds a feature
- perf — Code change that improves performance
- test — Adding or updating tests
- chore — Changes to build process, dependencies, or tooling
- ci — Changes to CI configuration files
Optional. The area of the codebase affected:
componentshookslibaudiouidocsci
- Use imperative mood ("add feature" not "added feature")
- Don't capitalize the first letter
- No period (.) at the end
- Limit to 50 characters or less
- Be specific and descriptive
Optional but recommended:
- Explain what and why, not how
- Wrap at 72 characters
- Reference issues with
Closes #123 - Separate from subject with blank line
Good:
feat(components): add language difficulty selector
The new selector allows users to choose between beginner,
intermediate, and advanced conversation modes. This helps
tailor the AI responses to the user's proficiency level.
Closes #456
Also good:
fix(audio): prevent audio feedback loop on reconnect
Clear the audio player buffer before starting a new session
to prevent overlapping audio playback.
Avoid:
updated stuff
fixed thing
ADDED NEW FEATURE
Use the following format for branch names:
<type>/<description>
- feature/ — New features
- fix/ — Bug fixes
- docs/ — Documentation updates
- refactor/ — Code refactoring
- test/ — Test additions or modifications
- chore/ — Build, dependencies, tooling
- perf/ — Performance improvements
# Good branch names
git checkout -b feature/add-difficulty-levels
git checkout -b fix/audio-feedback-loop
git checkout -b docs/update-setup-guide
git checkout -b refactor/audio-utils
git checkout -b test/add-language-selector-tests
# Avoid these
git checkout -b my-changes
git checkout -b fix-stuff
git checkout -b test123- Create a branch from
main - Make your changes
- Run linting:
npm run lint - Test thoroughly in development
- Commit with clear messages following our guidelines
- Push to your fork
- Verify all changes are present
- Go to GitHub and open a new pull request
- Set the base branch to
main - Use the PR template (auto-filled when you open the PR)
- Link related issues using
Closes #NUMBER
Use the same format as commit messages:
feat: add language difficulty selector
fix: resolve audio feedback loop on reconnect
docs: update setup instructions
## 📋 Description
Brief description of what this PR does and why.
## 🎯 Related Issue
Closes #NUMBER (if applicable)
## 🔍 Type of Change
- [ ] 🐛 Bug fix
- [ ] ✨ New feature
- [ ] 📚 Documentation update
- [ ] 🔄 Refactoring
- [ ] ⚡ Performance improvement
- [ ] 🧪 Test addition/update
## 📝 Changes Made
- Change 1
- Change 2
- Change 3
## ✅ Testing
- [ ] Tested in development environment
- [ ] No console errors or warnings
- [ ] Linting passes (`npm run lint`)
- [ ] Changes work as intended
## 📸 Screenshots/Demo
(If applicable, add before/after screenshots or demo links)
## 🎓 Learning Notes
(Any important context or decisions made)- 👀 At least one reviewer will review your PR
- 💬 Address feedback constructively
- 🔄 Push updates to the same branch (no new PR needed)
- ✅ Once approved, maintainers will merge
We encourage contributions that include tests! Here's how:
-
Create test files alongside source files
components/ ├── LanguagePartner.tsx └── LanguagePartner.test.tsx -
Use descriptive test names
describe('LanguagePartner', () => { it('should initialize with English as default language', () => { // test code }); it('should handle language change correctly', () => { // test code }); });
-
Test edge cases and error scenarios
-
Keep tests focused — one concept per test
npm test
npm test -- --watch # Watch mode
npm test -- --coverage # Coverage report- Aim for >80% code coverage for new features
- Maintain or improve existing coverage
- All public APIs should be tested
npm run lint # Check all files
npm run lint --fix # Auto-fix issues
npm run lint app/ # Check specific folder- Format: Follow ESLint configuration in
.eslintrc.json - TypeScript: Use strict typing, avoid
any - Naming: Use camelCase for variables/functions, PascalCase for components/classes
- Imports: Organize imports alphabetically, group by type
- Comments: Write clear, concise comments explaining "why", not "what"
// Good: Type-safe, clear naming, logical organization
import { useState, useRef } from 'react';
import { GoogleGenAI } from '@google/genai';
interface AudioConfig {
sampleRate: number;
channelCount: number;
}
export function useAudioRecorder(config: AudioConfig) {
const [isRecording, setIsRecording] = useState(false);
// Implementation...
}We recommend setting up husky for automatic linting before commits:
npm install husky --save-dev
npx husky install- 📝 New features should include documentation
- 🔄 Breaking changes require doc updates
- 🐛 Bug fixes might need clarification
- 💡 Complex logic deserves explanation
- README.md — High-level overview and quick start
- CONTRIBUTING.md — This file! Contribution guidelines
- Code comments — Explain complex logic, not obvious code
- Commit messages — Explain context and reasoning
- PR descriptions — Describe changes and impact
/**
* Records audio from the user's microphone
* @param {AudioConfig} config - Audio recording configuration
* @returns {Promise<AudioData>} The recorded audio data
* @throws {Error} If microphone access is denied
*/
export async function recordAudio(config: AudioConfig): Promise<AudioData> {
// implementation
}- ✅ Search existing issues to avoid duplicates
- ✅ Check the FAQ and troubleshooting sections
- ✅ Verify the issue is in the latest version
- ✅ Test in multiple browsers/environments
## 🐛 Bug Description
A clear description of the bug.
## 📍 Reproduction Steps
1. Step 1
2. Step 2
3. Step 3
## 🤔 Expected Behavior
What should happen
## 👀 Actual Behavior
What actually happens
## 💻 Environment
- OS: Windows/macOS/Linux
- Browser: Chrome/Firefox/Safari
- Node version: (if applicable)
- npm version: (if applicable)
## 🖼️ Screenshots
(If applicable)
## 📝 Additional Context
Any other relevant information## ✨ Feature Description
Clear description of the feature you want
## 🎯 Use Case
Why do you need this? What problem does it solve?
## 📋 Acceptance Criteria
- [ ] Criterion 1
- [ ] Criterion 2
- [ ] Criterion 3
## 🔗 Related
Links to related issues or discussions- 📖 Documentation: Check README.md and code comments
- 💬 GitHub Discussions: Ask questions in the Discussions tab
- 🐞 GitHub Issues: Search for similar problems
- 💬 Discord: Join our community on Discord
- 📧 Email: Contact us at support@lingualive.dev
- ✅ Clear description of what you're trying to do
- ✅ Steps you've already tried
- ✅ Error messages or code snippets
- ✅ Environment details (OS, Node version, etc.)
- ✅ Links to related issues or docs
- Next.js 15 — Documentation
- React 19 — Documentation
- TypeScript — Handbook
- Tailwind CSS — Docs
- Web Audio API — MDN Guide
- Entry Point:
app/layout.tsxandapp/page.tsx - Main Component:
components/LanguagePartner.tsx - Audio Logic:
lib/audio-utils.ts - Utilities:
lib/utils.ts
- 🎤 Audio Recording — Understanding Web Audio API
- 🌐 Multi-Language Support — How language switching works
- 🔄 State Management — React hooks for session state
- 🎨 Styling — Tailwind CSS patterns used in the project
- I've read the Code of Conduct
- I've created a feature branch (not on
main) - I've followed the commit message guidelines
- I've run
npm run lintand fixed issues - I've tested my changes locally
- I've updated documentation if needed
- I've linked related issues with
Closes #NUMBER - I've filled out the PR template completely
- I've requested a review from maintainers
- ✅ Review your PR thoroughly
- ✅ Test the changes
- ✅ Merge once approved
- ✅ Close related issues automatically
- ✅ Add you to contributors list
- 🎉 Celebrate your contribution!
- 📢 Share your work with the community
- 🔄 Continue contributing to other issues
- 📚 Help review other PRs
Start with these if you're new to the project:
- Documentation improvements
- Bug fixes with clear reproduction steps
- Test additions
- Code comment improvements
Filter by label: good-first-issue, documentation, help-wanted
Once you're familiar with the codebase:
- New features from the roadmap
- Refactoring tasks
- Performance improvements
- Complex bug fixes
Filter by label: enhancement, refactor
For experienced contributors:
- Architecture decisions
- Major refactors
- Multi-component features
- Performance optimization
Discuss with maintainers in Issues/Discussions first
All contributors are recognized in:
- 📝 Contributors section
- 🏆 Release notes
- ⭐ Project README
Thank you for being part of our community! 💝
Don't hesitate to ask! Use any of these channels:
- 🐙 GitHub Issues — For bugs and feature requests
- 💬 GitHub Discussions — For questions and ideas
- 📧 Email — support@lingualive.dev
- 🎯 Discord — Real-time chat with the community
By contributing to LinguaLive, you agree that your contributions will be licensed under its MIT License.
Your contributions make LinguaLive better for everyone.
🚀 Get Started • 📖 View Roadmap • ⭐ Star us on GitHub
Happy coding! 💻✨