Contributing Guide
Thank you for considering contributing to the AI Store project!
Getting Started
Prerequisites
- Node.js 18+
- npm or yarn
- Git
- Code editor (VS Code recommended)
Setup
-
Fork the repository
# Fork on GitHub, then clone git clone https://github.com/your-username/Server-December-AIStore.git cd Server-December-AIStore -
Install dependencies
npm install -
Create a branch
git checkout -b feature/your-feature-name -
Start development server
npm run dev
Development Workflow
Code Style
- Follow TypeScript best practices
- Use ESLint configuration
- Format code with Prettier
- Follow existing code patterns
File Structure
- Components in
components/ - Hooks in
hooks/ - Utilities in
lib/ - Types in
types/ - Pages in
app/
Naming Conventions
- Components: PascalCase (
MyComponent.tsx) - Hooks: camelCase with
useprefix (useMyHook.ts) - Utilities: camelCase (
myUtility.ts) - Types: PascalCase (
MyType.ts)
Making Changes
Before You Start
- Check existing issues
- Discuss major changes in issues
- Create an issue for new features
- Ensure tests pass
During Development
-
Write clean code
- Clear variable names
- Add comments for complex logic
- Follow DRY principle
-
Add tests
- Unit tests for utilities
- Component tests for UI
- Integration tests for flows
-
Update documentation
- Update relevant docs
- Add code examples
- Update API docs if needed
Commit Messages
Follow conventional commits:
feat: add new feature
fix: fix bug
docs: update documentation
style: formatting changes
refactor: code refactoring
test: add tests
chore: maintenance tasks
Examples:
feat: add dark mode togglefix: resolve modal closing issuedocs: update API documentation
Pull Request Process
Before Submitting
-
Update code
git add . git commit -m "feat: your feature" git push origin feature/your-feature-name -
Run tests
npm test -
Check linting
npm run lint -
Build check
npm run build
PR Checklist
- [ ] Code follows style guidelines
- [ ] Tests pass
- [ ] Documentation updated
- [ ] No console errors
- [ ] Build succeeds
- [ ] Commit messages follow conventions
PR Description
Include:
- What changes were made
- Why changes were made
- How to test
- Screenshots (if UI changes)
- Related issues
Code Review
Review Process
- Maintainers review PRs
- Address feedback
- Make requested changes
- PR approved and merged
Review Criteria
- Code quality
- Test coverage
- Documentation
- Performance impact
- Security considerations
Testing
Running Tests
# All tests
npm test
# Watch mode
npm test:watch
# Coverage
npm test:coverage
Writing Tests
import { render, screen } from '@testing-library/react';
import MyComponent from './MyComponent';
describe('MyComponent', () => {
it('renders correctly', () => {
render(<MyComponent />);
expect(screen.getByText('Hello')).toBeInTheDocument();
});
});
Documentation
Updating Docs
-
API Documentation (
docs/API.md)- Add new APIs
- Update examples
- Fix errors
-
Component Docs (
docs/COMPONENTS.md)- Document new components
- Update props tables
- Add examples
-
Guides (
docs/GUIDES.md)- Add new guides
- Update existing guides
- Add troubleshooting
Bug Reports
Reporting Bugs
Include:
- Description of bug
- Steps to reproduce
- Expected behavior
- Actual behavior
- Environment details
- Screenshots (if applicable)
Bug Report Template
## Bug Description
Brief description of the bug
## Steps to Reproduce
1. Step one
2. Step two
3. Step three
## Expected Behavior
What should happen
## Actual Behavior
What actually happens
## Environment
- OS: [e.g., macOS 13.0]
- Browser: [e.g., Chrome 120]
- Node: [e.g., 18.17.0]
## Screenshots
If applicable
Feature Requests
Requesting Features
Include:
- Feature description
- Use case
- Proposed solution
- Alternatives considered
Feature Request Template
## Feature Description
Brief description of the feature
## Use Case
Why is this feature needed?
## Proposed Solution
How should it work?
## Alternatives
Other solutions considered
Code of Conduct
Our Standards
- Be respectful
- Be inclusive
- Be constructive
- Be professional
Unacceptable Behavior
- Harassment
- Discrimination
- Trolling
- Personal attacks
Getting Help
Resources
- Documentation:
/docs - Issues: GitHub Issues
- Discussions: GitHub Discussions
- Support: Contact maintainers
Questions
- Check documentation first
- Search existing issues
- Ask in discussions
- Create an issue if needed
Recognition
Contributors will be:
- Listed in CONTRIBUTORS.md
- Mentioned in release notes
- Credited in documentation
License
By contributing, you agree that your contributions will be licensed under the same license as the project.
Thank You!
Thank you for contributing to the AI Store project! Your contributions make this project better for everyone.