Thank you for your interest in contributing to Alpha-Chats! This document provides guidelines and information for contributors.
# Fork the repository on GitHub
# Then clone your fork
git clone https://github.com/your-username/alpha-chats.git
cd alpha-chats# Install all dependencies
npm run install:all
# Set up environment variables
cp backend/.env.example backend/.env
# Edit backend/.env with your configurationgit checkout -b feature/your-feature-name
# or
git checkout -b fix/your-bug-fix# Start development servers
npm run dev
# Run tests
npm run test:all
# Before committing
npm run test- JavaScript/React: Follow existing patterns in the codebase
- Naming: Use camelCase for variables/functions, PascalCase for components
- Comments: Write clear, concise comments for complex logic
- File Structure: Follow the established folder structure
// β
Good - Functional component with proper structure
import React, { useState, useEffect } from 'react'
import { useSelector, useDispatch } from 'react-redux'
function MyComponent({ prop1, prop2 }) {
const [localState, setLocalState] = useState('')
const { globalState } = useSelector(state => state.user)
const dispatch = useDispatch()
useEffect(() => {
// Effect logic
}, [dependency])
return (
<div className="component-container">
{/* Component JSX */}
</div>
)
}
export default MyComponent// β
Good - Consistent error handling
export const controllerFunction = async (req, res) => {
try {
// Controller logic
return res.status(200).json({ data: result })
} catch (error) {
console.error('Error in controllerFunction:', error)
return res.status(500).json({
message: "Internal Server Error",
error: error.message
})
}
}# All tests
npm run test:all
# Backend tests only
npm run test:backend
# Integration tests only
npm run test- Write tests for new features
- Test both success and error cases
- Use descriptive test names
- Follow existing test patterns
- Terminal Aesthetic: Maintain the developer-focused terminal theme
- Responsive Design: Ensure mobile-first approach
- Performance: Optimize for fast loading and smooth interactions
- Accessibility: Follow basic accessibility principles
/* Primary Colors */
--primary-green: #39ff14 /* Matrix green */
--primary-yellow: #ffe156 /* Warning yellow */
--primary-orange: #ff6f3c /* Accent orange */
/* Background Colors */
--bg-primary: #181c2f /* Dark blue */
--bg-secondary: #23234a /* Medium blue */
--bg-tertiary: #2d1e60 /* Purple tint */
/* Text Colors */
--text-primary: #ffffff /* White */
--text-secondary: #b3b3ff /* Light blue */
--text-muted: #7f53ac /* Purple */- Check existing issues and pull requests
- Discuss major changes in issues first
- Consider backward compatibility
- Think about mobile responsiveness
## Feature Description
Brief description of the feature
## Use Case
Why is this feature needed?
## Proposed Implementation
How should this be implemented?
## Additional Context
Any additional information or screenshots## Bug Description
Clear description of the bug
## Steps to Reproduce
1. Go to '...'
2. Click on '...'
3. See error
## Expected Behavior
What should happen
## Actual Behavior
What actually happens
## Environment
- OS: [e.g., Windows 11]
- Browser: [e.g., Chrome 120]
- Node.js: [e.g., 18.17.0]
## Additional Context
Screenshots, console logs, etc.type(scope): description
body (optional)
footer (optional)
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changes (formatting, etc.)refactor: Code refactoringtest: Adding or updating testschore: Maintenance tasks
feat(chat): add typing indicators
fix(auth): resolve JWT token expiration issue
docs(readme): update installation instructions
style(sidebar): improve responsive design- Tests pass locally
- Code follows style guidelines
- Documentation updated (if needed)
- No console errors
- Mobile responsive (if UI changes)
## Description
What does this PR do?
## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Documentation update
- [ ] Refactoring
## Testing
- [ ] Unit tests pass
- [ ] Integration tests pass
- [ ] Manual testing completed
## Screenshots (if applicable)
Add screenshots for UI changes
## Checklist
- [ ] Code follows project guidelines
- [ ] Self-review completed
- [ ] Documentation updated
- [ ] Tests added/updatedContributors will be recognized in:
- README.md contributors section
- Release notes for significant contributions
- Special thanks in documentation
- Issues: Create a GitHub issue
- Discussions: Use GitHub Discussions
- Email: Contact the maintainer
- React Documentation
- Node.js Documentation
- Socket.IO Documentation
- MongoDB Documentation
- TailwindCSS Documentation
Currently looking for contributions in:
- End-to-end encryption implementation
- Voice/Video calling features
- Performance optimizations
- Mobile app development
- Advanced search functionality
- Integration tests expansion
Thank you for contributing to Alpha-Chats! Your efforts help make this project better for the entire developer community. π