Thank you for your interest in contributing to Connecto! We welcome contributions from the community to make our social media platform even better.
- Code of Conduct
- Getting Started
- Development Workflow
- Reporting Bugs
- Suggesting Features
- Pull Request Guidelines
- Coding Standards
- Commit Messages
- Testing
- Documentation
By participating in this project, you are expected to uphold our Code of Conduct. Please read it before contributing.
Before you begin, ensure you have the following installed:
- Node.js 18 or later
- Bun (recommended) or npm/yarn
- Git
- A code editor (VS Code recommended)
-
Fork the repository
-
Clone your fork
git clone https://github.com/YOUR_USERNAME/Connecto.git cd Connecto -
Add upstream remote
git remote add upstream https://github.com/ORIGINAL_OWNER/Connecto.git
-
Install dependencies
bun install
-
Set up environment variables
cp .env.example .env # Edit .env with your Supabase credentials -
Start the development server
bun dev
git fetch upstream
git checkout main
git merge upstream/maingit checkout -b feature/your-feature-name
# or
git checkout -b fix/bug-description- Write your code
- Add tests if applicable
- Update documentation
git add .
git commit -m "feat: add new feature"git push origin feature/your-feature-name- Go to the original repository
- Click "New Pull Request"
- Fill in the template
- Submit
- Check if the bug has already been reported
- Try to reproduce the bug
- Check the issues page
Use the Bug Report Template and include:
- Description: Clear description of the bug
- Steps to Reproduce: Numbered steps to reproduce the bug
- Expected Behavior: What should happen
- Actual Behavior: What actually happens
- Screenshots: If applicable
- Environment: OS, browser, Node.js version
- Check existing features and plans
- Consider if it aligns with project goals
Use the Feature Request Template and include:
- Feature Description: Clear description of the feature
- Use Case: Why is this feature needed?
- Proposed Solution: How should it work?
- Alternatives: Other solutions considered
- Additional Context: Any other relevant information
Use one of these prefixes:
feat:- New featurefix:- Bug fixdocs:- Documentation changesstyle:- Code style (formatting, no logic change)refactor:- Code refactoringtest:- Adding/updating testschore:- Maintenance tasks
Example: feat: add dark mode support
Include:
- Summary: What does this PR do?
- Related Issue: Link to the issue (e.g., "Closes #123")
- Type of Change: Bug fix / Feature / Documentation
- Testing: How was it tested?
- Screenshots: If UI changes
- My code follows the code style of this project
- I have performed a self-review of my code
- I have commented my code, particularly in hard-to-understand areas
- I have made corresponding changes to the documentation
- My changes generate no new warnings
- I have added tests that prove my fix is effective or that my feature works
- New and existing unit tests pass locally with my changes
- Use TypeScript for all new code
- Avoid
anytype - useunknownif necessary - Use proper type annotations for function parameters and return types
- Export types that are used externally
- Use functional components with hooks
- Keep components small and focused
- Use proper prop typing with TypeScript interfaces
- Extract reusable logic into custom hooks
src/
├── components/ # React components
│ ├── feature/ # Feature-specific components
│ └── ui/ # Reusable UI components
├── hooks/ # Custom React hooks
├── pages/ # Page components
├── lib/ # Utility functions
├── contexts/ # React contexts
└── integrations/ # External service integrations
- Components: PascalCase (e.g.,
PostCard.tsx) - Hooks: camelCase with "use" prefix (e.g.,
usePosts.ts) - Utilities: camelCase (e.g.,
utils.ts) - Constants: UPPER_SNAKE_CASE
- Files: kebab-case for non-component files
- Use Tailwind CSS utility classes
- Avoid custom CSS when possible
- Use semantic class names for complex custom styles
<type>(<scope>): <description>
[optional body]
[optional footer]
feat: A new featurefix: A bug fixdocs: Documentation only changesstyle: Changes that don't affect code meaning (formatting)refactor: Code change that neither fixes a bug nor adds a featuretest: Adding missing tests or correcting existing testschore: Changes to build process, dependencies, etc.
feat(posts): add image upload functionality
fix(comments): resolve comment sorting issue
docs(readme): update installation instructions
refactor(auth): simplify login logic
test(hooks): add tests for usePosts hook
# Run all tests
bun test
# Run tests in watch mode
bun test:watch
# Run tests with coverage
bun test:coverage- Write tests for new features
- Write tests for bug fixes
- Follow the existing test structure
- Use descriptive test names
Place tests in the src/test/ directory:
src/test/
├── setup.ts # Test setup and utilities
└── example.test.ts # Example test file
- Use JSDoc comments for exported functions
- Document complex logic with comments
- Keep comments up-to-date with code changes
- Update README.md for significant changes
- Document new features
- Update installation/setup instructions if changed
If you add new API endpoints, document:
- Endpoint URL
- HTTP method
- Request parameters
- Response format
- Error codes
If you have any questions, feel free to:
- Open an issue for discussion
- Join our community chat
- Contact the maintainers
Thank you for contributing to Connecto! 🚀