Skip to content

Latest commit

Β 

History

History
325 lines (253 loc) Β· 9.36 KB

File metadata and controls

325 lines (253 loc) Β· 9.36 KB

🀝 Contributing to AgriTech Blog Platform

Thank you for your interest in contributing to the AgriTech Blog Platform! This project thrives on community contributions from developers, AgriTech enthusiasts, and content creators of all skill levels.

🌟 Ways to Contribute

πŸ› Bug Reports

Found a bug? Help us fix it!

✨ Feature Requests

Have an idea for improvement?

πŸ’» Code Contributions

Ready to write some code?

πŸ“ Documentation

Help make the project more accessible!

  • Improve existing documentation
  • Add code comments and examples
  • Create tutorials and guides
  • Translate documentation

🎨 Design & UX

Make the platform more beautiful and user-friendly!

  • UI/UX improvements
  • Accessibility enhancements
  • Mobile responsiveness
  • Visual design elements

πŸš€ Development Workflow

1. Setup Your Development Environment

# Fork the repository on GitHub
# Clone your fork
git clone https://github.com/YOUR_USERNAME/AgriTechBlog.git
cd AgriTechBlog

# Add upstream remote
git remote add upstream https://github.com/asamountain/AgriTechBlog.git

# Install dependencies
npm install

# Copy environment template
cp env.example .env

# Set up your MongoDB connection in .env
# MONGODB_URI=your-mongodb-connection-string
# SESSION_SECRET=your-random-secret-key

# Start development server
npm run dev

2. Create a Feature Branch

# Sync with upstream
git checkout main
git pull upstream main

# Create your feature branch
git checkout -b feature/your-feature-name
# or
git checkout -b fix/your-bug-fix
# or
git checkout -b docs/your-documentation-update

3. Make Your Changes

Code Style Guidelines

  • TypeScript: Use strict typing throughout
  • React: Use functional components with hooks
  • Naming: Use descriptive names for variables and functions
  • Comments: Add JSDoc comments for complex functions
  • Formatting: Use Prettier for consistent formatting

File Structure

client/src/
β”œβ”€β”€ components/          # Reusable React components
β”‚   β”œβ”€β”€ ui/             # Basic UI components (buttons, inputs)
β”‚   └── [feature]/      # Feature-specific components
β”œβ”€β”€ pages/              # Route components
β”œβ”€β”€ hooks/              # Custom React hooks
β”œβ”€β”€ lib/                # Utilities and configurations
└── styles/             # CSS and styling files

api/                    # Vercel serverless functions
server/                 # Development server files
shared/                 # Shared TypeScript types

Component Guidelines

// Good component structure
interface ComponentProps {
  title: string;
  onAction?: () => void;
  children?: React.ReactNode;
}

export default function Component({ title, onAction, children }: ComponentProps) {
  // Component logic here
  
  return (
    <div className="space-y-4">
      <h2 className="text-xl font-semibold">{title}</h2>
      {children}
      {onAction && (
        <button onClick={onAction} className="btn-primary">
          Action
        </button>
      )}
    </div>
  );
}

4. Test Your Changes

# Type checking
npm run type-check

# Build the project
npm run build

# Test locally
npm run dev

# Run linting
npm run lint

5. Commit Your Changes

# Stage your changes
git add .

# Commit with descriptive message
git commit -m "✨ Add feature: user profile management

- Add user profile component
- Implement profile editing functionality
- Add validation for profile fields
- Update navigation to include profile link

Closes #123"

Commit Message Guidelines

Use conventional commits with emojis:

  • ✨ :sparkles: - New features
  • πŸ› :bug: - Bug fixes
  • πŸ“ :memo: - Documentation
  • 🎨 :art: - UI/UX improvements
  • ♻️ :recycle: - Code refactoring
  • ⚑ :zap: - Performance improvements
  • πŸ”’ :lock: - Security fixes
  • πŸ§ͺ :test_tube: - Tests

Example:

✨ Add AI-powered content tagging

- Integrate Perplexity API for tag suggestions
- Add tag management UI component
- Implement tag validation and storage
- Update post editor with tag suggestions

Closes #45

6. Push and Create Pull Request

# Push to your fork
git push origin feature/your-feature-name

# Create a pull request on GitHub
# - Use a descriptive title
# - Reference related issues
# - Add screenshots for UI changes
# - Request review from maintainers

πŸ“‹ Pull Request Guidelines

PR Checklist

  • Code follows project style guidelines
  • Self-review completed
  • Comments added for complex logic
  • Documentation updated if needed
  • No new TypeScript errors
  • Builds successfully
  • Tested locally
  • Screenshots included for UI changes

PR Template

## Description
Brief description of changes

## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Documentation update
- [ ] Performance improvement
- [ ] Code refactoring

## Testing
- [ ] Tested locally
- [ ] No TypeScript errors
- [ ] Builds successfully

## Screenshots (if applicable)
Add screenshots for UI changes

## Related Issues
Closes #123

🎯 Areas We Need Help With

🌱 Beginner-Friendly

  • Documentation improvements
  • UI/UX enhancements
  • Accessibility features
  • Bug fixes
  • Code comments

πŸ”§ Intermediate

  • API endpoint improvements
  • Database optimization
  • Performance enhancements
  • Testing infrastructure
  • Mobile responsiveness

πŸš€ Advanced

  • Architecture improvements
  • Security enhancements
  • Advanced features (search, analytics)
  • CI/CD pipeline
  • Deployment optimization

πŸ“š Resources for Contributors

Learning Resources

Project-Specific Knowledge

🀝 Community Guidelines

Code of Conduct

  • Be respectful and inclusive
  • Welcome newcomers and help them learn
  • Focus on constructive feedback
  • Collaborate openly and transparently
  • Respect different perspectives and experiences

Communication

  • Use GitHub Issues for bug reports and feature requests
  • Use GitHub Discussions for questions and ideas
  • Be patient with response times - we're all volunteers!
  • Tag issues appropriately for better organization

πŸ† Recognition

Contributors are recognized in:

  • Project README contributors section
  • Release notes for significant contributions
  • Community highlights in discussions
  • Potential invitation to core contributor team

❓ Getting Help

Stuck or have questions? We're here to help!

  • πŸ’¬ GitHub Discussions - Ask questions and get help
  • πŸ› GitHub Issues - Report bugs and request features
  • πŸ“§ Email: Create an issue and we'll respond there
  • πŸ“– Documentation - Comprehensive guides and references

πŸŽ‰ First Contribution?

Welcome! Here's how to get started:

  1. Star the repository ⭐
  2. Look for good first issues
  3. Read this contributing guide
  4. Set up your development environment
  5. Make a small change (fix a typo, improve documentation)
  6. Create your first pull request

Don't worry about making mistakes - we're all learning! The community is here to support you.


Thank you for contributing to the AgriTech Blog Platform! Every contribution, no matter how small, helps make this project better for the entire agricultural technology community. 🌱

Together, we're building a platform that helps share knowledge and advances agricultural technology for a better world.