Thank you for your interest in contributing to Ollama Web App! This document provides guidelines and instructions for contributing.
- Be respectful and inclusive
- Provide constructive feedback
- Focus on what is best for the community
- Show empathy towards other contributors
- Node.js 18+
- Ollama installed and running
- Git
# Fork the repository
# Clone your fork
git clone https://github.com/YOUR_USERNAME/ollama-webapp-v2.git
cd ollama-webapp-v2
# Install dependencies
npm install
# Start development server
npm run dev# Create a feature branch
git checkout -b feature/your-feature-name
# Or a bugfix branch
git checkout -b bugfix/your-bugfix-description- Write clean, readable code
- Follow existing code style
- Add comments for complex logic
- Test your changes thoroughly
Follow Conventional Commits format:
# Feature
git commit -m "feat: add user authentication"
# Bug fix
git commit -m "fix: resolve database connection timeout"
# Documentation
git commit -m "docs: update API documentation"
# Style
git commit -m "style: format JavaScript code"# Push to your fork
git push origin feature/your-feature-name
# Create pull request on GitHub<type>: <subject>
Examples:
- feat: add dark mode toggle
- fix: resolve streaming connection issues
- docs: update installation instructions
## Changes
- Brief description of changes
- Key features added/modified
## Testing
- How to test these changes
- Test cases covered
## Screenshots (if applicable)
[Add screenshots]
## Checklist
- [ ] Code follows project style guidelines
- [ ] Self-reviewed the code
- [ ] Commented complex logic
- [ ] Updated documentation
- [ ] Added/updated tests
- [ ] All tests passing
- [ ] No console errors or warnings
## Related Issues
Closes #123
Related to #456- Use 2 spaces for indentation
- Use single quotes for strings
- Use const/let, avoid var
- Use arrow functions for callbacks
- Add JSDoc comments for functions
// Good
const getUserById = (id) => {
return db.prepare('SELECT * FROM users WHERE id = ?').get(id);
};
// Bad
function getUserById(id) {
return db.prepare("SELECT * FROM users WHERE id = ?").get(id);
}- Use semantic HTML
- Keep CSS organized
- Use meaningful class names
- Follow mobile-first approach
- Server starts without errors
- Can create new conversations
- Can send messages and receive responses
- Streaming works correctly
- System stats display properly
- Database operations work
- Multiple users can access simultaneously
# Run tests
npm test
# Run with coverage
npm run test:coverageollama-webapp-v2/
├── server.js # Main Express server
├── public/
│ └── index.html # Frontend interface
├── package.json # Dependencies
├── .gitignore # Git ignore rules
├── README.md # Project documentation
├── CONTRIBUTING.md # This file
└── LICENSE # MIT License
- Add route in
server.js - Implement handler function
- Add error handling
- Test with curl or Postman
- Update API documentation
- Create migration script
- Test with backup database
- Update queries in
server.js - Document changes in README
- Modify
public/index.html - Test in multiple browsers
- Check mobile responsiveness
- Update screenshots in README
Use the issue template and include:
- Clear description of the bug
- Steps to reproduce
- Expected behavior
- Actual behavior
- Environment details (OS, Node.js version, Ollama version)
- Screenshots/logs if applicable
- Describe the feature
- Explain use case
- Suggest implementation approach
- Consider alternatives
- 📖 Check README.md
- 🐛 Search existing Issues
- 💬 Start a Discussion
- 📧 Email: jlaportebot@gmail.com
Contributors will be acknowledged in:
- README.md contributors section
- Release notes
- GitHub contributors list
By contributing, you agree that your contributions will be licensed under the MIT License.
Feel free to open an issue or discussion if you have any questions about contributing!