First off, thank you for considering contributing to LiveWeb! It's people like you that make LiveWeb such a great tool.
- Code of Conduct
- Getting Started
- How Can I Contribute?
- Development Workflow
- Style Guidelines
- Commit Messages
- Pull Request Process
This project and everyone participating in it is governed by our Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to the project maintainers.
- Be respectful: Treat everyone with respect and kindness
- Be collaborative: Work together and help each other
- Be inclusive: Welcome newcomers and diverse perspectives
- Be constructive: Provide helpful feedback and suggestions
- Node.js 18+ and npm
- Git
- A code editor (VS Code recommended)
- Google Gemini API key for testing
-
Fork the repository on GitHub
-
Clone your fork:
git clone https://github.com/YOUR_USERNAME/liveweb.git
cd liveweb- Add upstream remote:
git remote add upstream https://github.com/ORIGINAL_OWNER/liveweb.git- Install dependencies:
# Backend
npm install
# Frontend
cd frontend
npm install
cd ..- Create
.envfile:
cp .env.example .env
# Edit .env and add your GEMINI_API_KEY- Run the application:
# Terminal 1: Backend
npm run dev
# Terminal 2: Frontend
cd frontend
npm run devBefore creating bug reports, please check the existing issues to avoid duplicates. When you create a bug report, include as many details as possible:
- Use a clear and descriptive title
- Describe the exact steps to reproduce the problem
- Provide specific examples (code snippets, screenshots, etc.)
- Describe the behavior you observed and what you expected
- Include your environment details (OS, Node version, browser, etc.)
Bug Report Template:
**Description**
A clear description of the bug.
**Steps to Reproduce**
1. Go to '...'
2. Click on '...'
3. See error
**Expected Behavior**
What you expected to happen.
**Actual Behavior**
What actually happened.
**Screenshots**
If applicable, add screenshots.
**Environment**
- OS: [e.g., macOS 14.0]
- Node.js: [e.g., 18.17.0]
- Browser: [e.g., Chrome 120]
- LiveWeb Version: [e.g., 1.0.0]
**Additional Context**
Any other relevant information.Enhancement suggestions are tracked as GitHub issues. When creating an enhancement suggestion:
- Use a clear and descriptive title
- Provide a detailed description of the proposed feature
- Explain why this enhancement would be useful
- Include mockups or examples if applicable
Unsure where to begin? Look for issues labeled:
good first issue- Good for newcomershelp wanted- Extra attention neededbug- Something isn't workingenhancement- New feature or request
Use descriptive branch names with prefixes:
feature/- New features (e.g.,feature/add-export-button)fix/- Bug fixes (e.g.,fix/voice-recognition-error)docs/- Documentation (e.g.,docs/update-readme)refactor/- Code refactoring (e.g.,refactor/simplify-api-client)test/- Adding tests (e.g.,test/add-generation-tests)chore/- Maintenance (e.g.,chore/update-dependencies)
- Create a new branch:
git checkout -b feature/your-feature-name-
Make your changes:
- Write clean, readable code
- Follow the style guidelines
- Add comments for complex logic
- Update documentation if needed
-
Test your changes:
- Test manually in the browser
- Verify voice recognition works
- Check code generation with various prompts
- Test on different browsers if possible
-
Commit your changes:
git add .
git commit -m "feat: add amazing feature"- Keep your branch updated:
git fetch upstream
git rebase upstream/main- Push to your fork:
git push origin feature/your-feature-name- Use ES6+ syntax (arrow functions, destructuring, etc.)
- Use functional components with hooks (not class components)
- Use const for variables that don't change, let for those that do
- Use meaningful variable names (avoid single letters except in loops)
- Destructure props in function parameters
- Use JSDoc comments for functions
Example:
/**
* Generate code using Gemini API
* @param {string} prompt - User's voice command
* @param {string} currentCode - Current HTML code
* @returns {Promise<Object>} Generated code result
*/
export const generateCode = async (prompt, currentCode = '') => {
// Implementation
};import { useState, useEffect } from 'react'
import { useTranslation } from 'react-i18next'
/**
* ComponentName - Brief description
* @param {Object} props - Component props
*/
export const ComponentName = ({ prop1, prop2, onAction }) => {
const { t } = useTranslation()
const [state, setState] = useState(initialValue)
useEffect(() => {
// Side effects
}, [dependencies])
const handleAction = () => {
// Event handler
}
return (
<div className="...">
{/* JSX */}
</div>
)
}- Use Tailwind utility classes when possible
- Keep custom CSS in separate files when needed
- Use semantic class names for custom CSS
- Follow mobile-first approach
- Use CSS variables for theme colors
- Components: One component per file
- Hooks: Custom hooks in
hooks/directory - Utils: Utility functions in
utils/directory - Services: API calls in
services/directory - Constants: Constants in
config/constants.js
We follow the Conventional Commits specification:
<type>(<scope>): <subject>
<body>
<footer>
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changes (formatting, missing semicolons, etc.)refactor: Code refactoringperf: Performance improvementstest: Adding or updating testschore: Maintenance tasks (dependencies, build, etc.)ci: CI/CD changes
feat(voice): add support for multiple languages
fix(api): handle timeout errors gracefully
docs(readme): update installation instructions
refactor(hooks): simplify useCodeGeneration hook
chore(deps): update dependencies to latest versions- Use present tense ("add feature" not "added feature")
- Use imperative mood ("move cursor to..." not "moves cursor to...")
- First line should be 50 characters or less
- Body should wrap at 72 characters
- Reference issues and PRs in the footer
- Code follows the style guidelines
- Self-review of your own code
- Commented complex code sections
- Updated documentation if needed
- Tested the changes manually
- No console errors or warnings
- Commit messages follow conventions
-
Push your branch to your fork
-
Open a Pull Request on GitHub
-
Fill in the PR template:
## Description
Brief description of changes
## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Breaking change
- [ ] Documentation update
## How Has This Been Tested?
Describe your testing process
## Screenshots (if applicable)
Add screenshots
## Checklist
- [ ] Code follows style guidelines
- [ ] Self-reviewed code
- [ ] Commented complex code
- [ ] Updated documentation
- [ ] No new warnings
- [ ] Tested manually-
Wait for review - Maintainers will review your PR
-
Address feedback - Make requested changes if needed
-
Merge - Once approved, your PR will be merged!
- Delete your branch (optional but recommended)
- Update your local repository:
git checkout main
git pull upstream mainbug- Something isn't workingenhancement- New feature or requestdocumentation- Documentation improvementsgood first issue- Good for newcomershelp wanted- Extra attention neededquestion- Further information requestedwontfix- This will not be worked onduplicate- This issue or PR already existsinvalid- This doesn't seem right
If you need help:
- Check the documentation
- Search existing issues
- Ask in GitHub Discussions
- Contact maintainers
Contributors will be recognized in:
- README.md contributors section
- Release notes
- Project website (if applicable)
Thank you for contributing to LiveWeb! 🎉