Thank you for your interest in contributing to CSDeepSeek! This document provides guidelines and information for contributors.
- Search existing issues first to avoid duplicates
- Use issue templates when available
- Provide detailed information:
- Clear description of the problem
- Steps to reproduce
- Expected vs actual behavior
- Screenshots if applicable
- Environment details (OS, WeChat version, Go version)
- Check existing feature requests to avoid duplicates
- Provide clear use cases and benefits
- Consider the scope - features should align with project goals
- Be open to discussion and alternative solutions
- Go 1.21 or later
- WeChat Developer Tools
- Git knowledge
- Familiarity with WeChat Mini Program development
-
Fork the repository
git clone https://github.com/yourusername/csdeepseek.git cd csdeepseek -
Set up the backend
cd csdeepseek/backend go mod tidy cp env.example .env # Edit .env with your DeepSeek API key
-
Set up the frontend
- Open
csdeepseek/frontendin WeChat Developer Tools - Configure API endpoint in
services/api/api.js
- Open
-
Create a feature branch
git checkout -b feature/your-feature-name
-
Follow coding standards
- Go: Follow Effective Go guidelines
- WeChat Mini Program: Follow WeChat development guidelines
- Use meaningful variable and function names
- Add comments for complex logic
- Keep functions small and focused
-
Write tests
# Backend tests cd csdeepseek/backend go test ./... # Frontend testing # Test thoroughly in WeChat Developer Tools
-
Commit your changes
git add . git commit -m "feat: add amazing new feature"
Commit Message Format:
feat:new featuresfix:bug fixesdocs:documentation changesstyle:code style changesrefactor:code refactoringtest:adding or updating testschore:maintenance tasks
-
Push and create PR
git push origin feature/your-feature-name
Then create a Pull Request on GitHub.
- Formatting: Use
go fmt - Linting: Use
golangci-lint - Testing: Aim for good test coverage
- Error Handling: Always handle errors appropriately
- Documentation: Add godoc comments for exported functions
Example:
// GenerateResponse creates an AI response for the given messages.
// It returns the response text or an error if the generation fails.
func (s *Service) GenerateResponse(ctx context.Context, messages []Message) (string, error) {
if len(messages) == 0 {
return "", fmt.Errorf("no messages provided")
}
// ... implementation
}- File Structure: Follow the established directory structure
- Naming: Use descriptive names for components and functions
- WXSS: Follow WeChat styling guidelines
- Performance: Optimize for mobile devices
- Accessibility: Consider different screen sizes and user needs
Example:
// services/api/api.js
const sendMessage = async (sessionId, message) => {
try {
const response = await wx.request({
url: `${BASE_URL}/chat`,
method: 'POST',
data: { session_id: sessionId, message }
});
return response.data;
} catch (error) {
console.error('Failed to send message:', error);
throw error;
}
};# Run all tests
go test ./...
# Run with coverage
go test -cover ./...
# Run specific test
go test ./services/llm -v- Test in WeChat Developer Tools simulator
- Test on real devices when possible
- Test different screen sizes
- Test network conditions (offline/slow)
- Verify all user interactions work correctly
- Update README.md if you add new features
- Add inline comments for complex logic
- Update API documentation for backend changes
- Include examples in your documentation
- Automated checks must pass (if set up)
- Manual review by maintainers
- Testing on different environments
- Discussion and feedback incorporation
- Approval and merge
When contributing, keep these goals in mind:
- Educational Value: Code should be easy to understand and learn from
- Production Quality: Maintain high standards for reliability and performance
- Chinese Market: Consider Chinese users and WeChat ecosystem
- Best Practices: Follow industry standards and modern patterns
- Maintainability: Write code that's easy to maintain and extend
- Breaking changes without discussion
- Code that doesn't follow project standards
- Features that don't align with project goals
- Proprietary or licensed code without permission
- Large refactors without prior discussion
- GitHub Issues: For bugs and feature requests
- GitHub Discussions: For questions and general discussion
- Code Comments: For implementation-specific questions
Contributors will be recognized in:
- README.md contributors section
- Release notes for significant contributions
- GitHub contributor graphs
Thank you for helping make CSDeepSeek better! 🚀