Thank you for your interest in contributing to Convayto! This guide will help you get started.
We are committed to providing a welcoming and inclusive community. All contributors are expected to:
- Be respectful and professional
- Welcome diverse perspectives and experiences
- Focus on constructive feedback
- Report unacceptable behavior to the maintainers
- Node.js 16+
- npm or yarn
- Git
- Supabase account (free tier works great)
-
Fork the repository
# Click "Fork" on GitHub -
Clone your fork
git clone https://github.com/YOUR_USERNAME/Convayto.git cd Convayto -
Add upstream remote
git remote add upstream https://github.com/CodeWithAlamin/Convayto.git
-
Install dependencies
npm install
-
Set up environment variables
cp .env.example .env.local
Edit
.env.localwith your Supabase credentials:VITE_SUPABASE_URL=https://your-project.supabase.co VITE_SUPABASE_KEY=your-anon-public-keyFind these in your Supabase project settings → API
-
Start development server
npm run dev
Use descriptive branch names:
feat/add-message-reactions- New featurefix/auth-logout-bug- Bug fixdocs/improve-readme- Documentationrefactor/simplify-message-hook- Code refactoring
Write clear, descriptive commit messages:
git commit -m "feat: add emoji reactions to messages"
git commit -m "fix: prevent duplicate messages in chat"
git commit -m "docs: improve database setup guide"- Use 2-space indentation
- Use functional components with hooks
- Extract business logic into custom hooks
- Use meaningful variable names
- Add comments for complex logic
- Follow ESLint rules:
npm run lint
Example:
// ❌ Don't
const handleClick = () => {
const x = data.filter((i) => i.id > 5).map((i) => ({ ...i, active: true }));
setData(x);
};
// ✅ Do
const handleActivateUsers = () => {
const activeUsers = data
.filter((user) => user.id > 5)
.map((user) => ({ ...user, active: true }));
setData(activeUsers);
};Use Tailwind CSS utility classes (no inline style prop):
// ❌ Don't
<div style={{ padding: '16px', borderRadius: '8px' }}>
// ✅ Do
<div className="p-4 rounded-lg"># Run linter
npm run lint
# Build for production
npm run build
# Preview build locally
npm run previewTest in multiple browsers and screen sizes:
- Desktop Chrome
- Desktop Firefox
- Mobile Safari (if possible)
- Mobile Chrome
-
Keep it focused - One feature or fix per PR
-
Update from upstream
git fetch upstream git rebase upstream/main
-
Push to your fork
git push origin your-branch-name
-
Open a Pull Request on GitHub with:
- Clear title:
Fix: prevent duplicate messages - Description of what changed and why
- Screenshot/video if UI changes
- Any related issues:
Fixes #123
- Clear title:
-
Respond to feedback - Maintainers may request changes
- Check if there's an open issue for this feature
- Open an issue first to discuss the approach
- Wait for approval before starting major work
- Create an issue describing the feature
- Discuss implementation approach with maintainers
- Get approval before investing significant time
- Follow the same PR process
All code should have:
- Clear function/component names
- Comments explaining "why" (not just "what")
- JSDoc comments for complex functions
Example:
/**
* Formats a timestamp to human-readable date
* @param {Date} date - The date to format
* @returns {string} Formatted date string like "Jan 15, 2025"
*/
const formatDate = (date) => {
return date.toLocaleDateString("en-US", {
year: "numeric",
month: "short",
day: "numeric",
});
};Currently, Convayto doesn't have automated tests. This is a great area to contribute! If you'd like to add tests, see the Future Improvements section in the main README.
If your change affects the database:
- Document the change in
DATABASE_DESIGN.md - Provide SQL migration steps
- Update
.env.exampleif needed - Test thoroughly before submitting
Place custom hooks in:
- Feature-specific hooks:
src/features/[feature]/use*.js - Utility hooks:
src/utils/use*.js
Follow the naming pattern: use[ActionOrData]
Example:
// src/features/messageArea/useMessages.js
export const useMessages = (conversationId) => {
// Hook implementation
};- 💬 Ask in a GitHub issue
- 📧 Contact the maintainer
- 📚 Check
ARCHITECTURE.mdfor codebase structure - 📖 Check
DATABASE_DESIGN.mdfor database info
Contributors will be recognized in:
- GitHub contributors list
- Release notes
- Contributor section in README (if you'd like)
Thank you for making Convayto better! 🙌