Thank you for your interest in contributing to TestMe! This document provides guidelines and information for contributors.
- 🐛 Bug Reports: Help us identify and fix issues
- ✨ Feature Requests: Suggest new features or improvements
- 📝 Documentation: Improve documentation and examples
- 🔧 Code Contributions: Bug fixes, new features, optimizations
- 🎨 UI/UX Improvements: Design enhancements and user experience improvements
- 🧪 Testing: Add tests and improve test coverage
# Fork the repository on GitHub, then clone your fork
git clone https://github.com/YOUR_USERNAME/testme.git
cd testme
# Add the original repository as upstream
git remote add upstream https://github.com/dealwap/testme.git# Install dependencies
npm install
# Copy environment template
cp env.example .env.local
# Configure your environment variables
# (See README.md for detailed setup instructions)
# Start development server
npm run dev# Create a new branch for your feature/fix
git checkout -b feature/your-feature-name
# or
git checkout -b fix/bug-descriptionWe use TypeScript and follow these conventions:
- TypeScript: Use strict mode and proper typing
- ESLint: Follow the configured rules
- Prettier: Code will be auto-formatted
- Naming: Use camelCase for variables, PascalCase for components
- File Structure: Group related files in appropriate directories
// Example component structure
import React from 'react';
import styles from './ComponentName.module.scss';
interface ComponentNameProps {
// Define props with proper TypeScript types
title: string;
optional?: boolean;
}
export default function ComponentName({ title, optional = false }: ComponentNameProps) {
return (
<div className={styles.container}>
<h2>{title}</h2>
{optional && <p>Optional content</p>}
</div>
);
}// Example API route structure
import { NextRequest, NextResponse } from 'next/server';
export async function GET(request: NextRequest) {
try {
// Your logic here
return NextResponse.json({ success: true, data: result });
} catch (error) {
console.error('Error description:', error);
return NextResponse.json(
{ error: 'Error message' },
{ status: 500 }
);
}
}- Write tests for new features
- Test both happy path and error cases
- Include edge cases and boundary conditions
- Test AI provider switching functionality
If you want to add a new AI provider:
- Update
src/lib/ai-config.tswith the new provider configuration - Add the provider to
src/lib/ai-service.ts - Update environment variable documentation
- Add tests for the new provider
- Update README.md with setup instructions
- Follow the existing design system
- Ensure responsive design works on all devices
- Test dark/light mode compatibility
- Maintain accessibility standards
- Profile before and after changes
- Consider impact on bundle size
- Test with different AI providers
- Optimize database queries
- Check existing issues to avoid duplicates
- Test with the latest version
- Try with different AI providers
- Check browser console for errors
**Bug Description**
Clear and concise description of the bug.
**Steps to Reproduce**
1. Go to '...'
2. Click on '...'
3. See error
**Expected Behavior**
What you expected to happen.
**Actual Behavior**
What actually happened.
**Environment**
- OS: [e.g., macOS, Windows, Linux]
- Browser: [e.g., Chrome, Firefox, Safari]
- Node.js version: [e.g., 18.17.0]
- AI Provider: [e.g., OpenAI, Claude]
**Additional Context**
Add any other context, screenshots, or logs.**Feature Description**
Clear description of the feature you'd like to see.
**Use Case**
Describe the problem this feature would solve.
**Proposed Solution**
How you envision this feature working.
**Alternatives Considered**
Any alternative solutions you've considered.
**Additional Context**
Mockups, examples, or other relevant information.- Test thoroughly: Ensure your changes work with different AI providers
- Update documentation: Update README.md if needed
- Check code style: Run
npm run lint - Test build: Run
npm run buildto ensure it builds successfully - Write descriptive commit messages
**Description**
Brief description of changes.
**Type of Change**
- [ ] Bug fix
- [ ] New feature
- [ ] Documentation update
- [ ] Performance improvement
- [ ] Other (please describe)
**Testing**
- [ ] Tested locally
- [ ] Tested with different AI providers
- [ ] Added/updated tests
- [ ] Tested responsive design
**Screenshots**
If applicable, add screenshots showing the changes.
**Checklist**
- [ ] Code follows project style guidelines
- [ ] Self-review completed
- [ ] Documentation updated
- [ ] No console errors- Automated checks: All GitHub Actions must pass
- Code review: At least one maintainer will review
- Testing: Changes will be tested across different scenarios
- Feedback: Address any requested changes
- Merge: Once approved, changes will be merged
src/
├── app/ # Next.js App Router pages and layouts
│ ├── api/ # API routes
│ ├── components/ # Page-specific components
│ └── styles/ # Global styles
├── components/ # Reusable components
├── lib/ # Utility libraries and configurations
│ ├── ai-config.ts # AI provider configuration
│ ├── ai-service.ts # AI service implementation
│ └── mongodb.ts # Database connection
├── models/ # MongoDB models
├── types/ # TypeScript type definitions
└── utils/ # Utility functions
src/lib/ai-config.ts: AI provider configurationsrc/lib/ai-service.ts: Main AI service logicsrc/app/api/: All API endpointssrc/models/: Database schemas
# Pull latest changes
git pull upstream main
# Create feature branch
git checkout -b feature/new-feature
# Make changes and commit
git add .
git commit -m "feat: add new feature description"
# Push to your fork
git push origin feature/new-feature
# Create pull request on GitHub# Run linting
npm run lint
# Build for production
npm run build
# Test with different AI providers
# Update DEFAULT_AI_PROVIDER in .env.local and restart- GitHub Discussions: For questions and general discussion
- GitHub Issues: For bug reports and feature requests
- Email: nosisky@gmail.com for direct contact
Contributors will be recognized in:
- README.md acknowledgments
- Release notes for significant contributions
- GitHub contributor statistics
By contributing to TestMe, you agree that your contributions will be licensed under the MIT License.
Thank you for contributing to TestMe! 🚀