We welcome contributions to AIRole.net! This document provides guidelines for contributing to the project.
- Fork the repository
- Clone your fork
git clone https://github.com/easychen/airole.git cd airole - Install dependencies
npm install
- Create a feature branch
git checkout -b feature/your-feature-name
- Make your changes
- Test your changes
npm run dev
- Commit and push
git commit -m "Add your feature" git push origin feature/your-feature-name - Create a Pull Request
- Use TypeScript for all new code
- Follow existing code formatting (use Prettier if available)
- Use meaningful variable and function names
- Add comments for complex logic
- Place components in the
components/directory - Use the existing UI component library (shadcn/ui)
- Keep components focused and reusable
- Follow the existing file naming conventions
- Place API routes in
app/api/ - Use proper HTTP status codes
- Include error handling
- Validate input parameters
When reporting bugs, please include:
- Description: Clear description of the issue
- Steps to Reproduce: Detailed steps to reproduce the bug
- Expected Behavior: What you expected to happen
- Actual Behavior: What actually happened
- Environment: Browser, OS, device type
- Screenshots: If applicable
For feature requests, please include:
- Problem: What problem does this solve?
- Solution: Describe your proposed solution
- Alternatives: Any alternative solutions you considered
- Additional Context: Any other relevant information
- Node.js 18+
- npm/yarn/pnpm
Create a .env.local file for testing (see env-example.md):
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=test-secret
# Optional: Google OAuth credentials for testing Google Drive featuresCurrently, the project doesn't have automated tests, but manual testing is important:
- Test the main character creation flow
- Test image upload and analysis
- Test chat functionality
- Test export features
- Test responsive design on mobile
- Update Documentation: Update README or other docs if needed
- Test Thoroughly: Ensure your changes don't break existing functionality
- Keep It Focused: One feature/fix per PR
- Write Clear Commit Messages
- Update Changelog: Add your changes to the changelog if applicable
- Code follows existing style guidelines
- Self-review completed
- Manual testing completed
- Documentation updated (if needed)
- No console errors or warnings
- Mobile responsiveness checked
- Works without environment variables
We especially welcome contributions in these areas:
- New AI model integrations
- Enhanced character book functionality
- Better mobile experience
- Performance optimizations
- Better responsive design
- Accessibility improvements
- Theme enhancements
- Animation improvements
- New language translations
- Right-to-left language support
- Better language detection
- Better user guides
- API documentation
- Video tutorials
- Code examples
Please avoid:
- Breaking changes without discussion
- Large refactors without prior approval
- Adding heavy dependencies
- Removing existing functionality
- Changes that require a database
- Discord: Join our community (link TBD)
- Discussions: Use GitHub Discussions for questions
- Issues: Use GitHub Issues for bugs and feature requests
By contributing, you agree that your contributions will be licensed under the MIT License.
Contributors will be recognized in:
- The project README
- Release notes for significant contributions
- Special thanks section
Thank you for contributing to AIRole.net! 🎉