Thank you for your interest in contributing to GameCollab!
By contributing, you agree that your contributions will be licensed under the GNU Affero General Public License v3.0.
- Node.js 18+
- Bun (recommended) or npm/yarn/pnpm
- Git
# Fork the repository
# Clone your fork
git clone https://github.com/<your-username>/game-collab-app.git
cd game-collab-app
# Install dependencies
bun install
# Create a .env file based on .env.example
cp .env.example .env.local
# Start development server
bun run devsrc/
├── components/ # Reusable UI components
│ ├── shared/ # Shared components (Hero, SEO, Spinner)
│ └── profile/ # Profile-related components
├── hooks/ # Custom React hooks
│ └── __tests__/ # Hook tests
├── i18n/ # Internationalization
│ └── locales/ # Language files (en.json, es.json)
├── lib/ # Utilities and constants
│ ├── __tests__/ # Unit tests
│ ├── constants.ts # App constants
│ └── utils.ts # Utility functions
├── pages/ # Page components
│ ├── auth/ # Authentication pages
│ ├── news/ # News/feed pages
│ ├── profile/ # User profile pages
│ └── .../ # Other feature pages
├── App.tsx # Main app component
└── main.tsx # Entry point
- Use TypeScript for all new code
- Follow existing naming conventions
- Components: PascalCase (e.g.,
UserProfile.tsx) - Hooks: camelCase with
useprefix (e.g.,useAuth.tsx) - Utils/constants: camelCase (e.g.,
constants.ts) - Pages: PascalCase in kebab-case folders (e.g.,
user-profile/UserProfile.tsx)
// Functional component with TypeScript
import { type FC } from 'react';
interface ComponentProps {
title: string;
onAction?: () => void;
}
export const Component: FC<ComponentProps> = ({ title, onAction }) => {
return (
<div>
<h1>{title}</h1>
<button onClick={onAction}>Action</button>
</div>
);
};- Place in
src/hooks/ - One hook per file
- Include tests in
__tests__/subfolder - Use named exports:
export const useAuth = ...
- Tests use Vitest
- Place tests in
__tests__/folders next to the code they test - Follow naming:
useProjects.test.tsx
- All user-facing strings must use i18n keys
- Add keys to both
src/i18n/locales/en.jsonandsrc/i18n/locales/es.json - Use descriptive keys:
pages.profile.title
main- Stable releasedevelop- Development (if needed)feature/*- New featuresfix/*- Bug fixesrefactor/*- Code refactoring
Follow Conventional Commits:
feat: add dark mode toggle
fix: resolve login redirect issue
docs: update README
refactor: simplify notification hook
test: add tests for useProjects
- Create a feature branch from
main - Make your changes following the guidelines
- Ensure tests pass:
bun run test - Ensure linting passes:
bun run lint - Update documentation if needed
- Submit a PR with a clear description
- Link related issues
- Use GitHub Issues
- Include bug reproduction steps
- Specify browser/OS if relevant
- Add labels appropriately
- Open a discussion on GitHub
- Check existing issues and discussions