Contributing¶
Thank you for your interest in contributing to Learnify! This guide will help you get started.
Code of Conduct¶
Please be respectful and constructive in all interactions. We're building a welcoming community for everyone.
Getting Started¶
1. Fork the Repository¶
Click the "Fork" button on GitHub to create your own copy.
2. Clone Your Fork¶
3. Set Up Development Environment¶
# Install dependencies
npm install
# Set up environment
cp .env.example .env
# Edit .env with your credentials
# Set up database
npx prisma generate
npm run db:push
npm run db:seed
# Start development server
npm run dev
4. Create a Branch¶
Development Workflow¶
Making Changes¶
- Write your code
- Follow existing code style
- Add tests if applicable
- Update documentation if needed
Code Style¶
- Use TypeScript for all new code
- Follow existing patterns in the codebase
- Use meaningful variable and function names
- Add comments for complex logic
Running Tests¶
Committing Changes¶
Write clear, concise commit messages:
# Good
git commit -m "Add course search functionality"
git commit -m "Fix enrollment progress calculation"
# Bad
git commit -m "Update files"
git commit -m "Fix bug"
Pull Request Process¶
1. Push Your Changes¶
2. Create a Pull Request¶
- Go to the original repository on GitHub
- Click "New Pull Request"
- Select your branch
- Fill in the PR template
3. PR Guidelines¶
- Title: Clear, descriptive title
- Description: Explain what and why
- Screenshots: Include for UI changes
- Testing: Describe how you tested
4. Review Process¶
- Maintainers will review your PR
- Address any feedback
- Once approved, your PR will be merged
What to Contribute¶
Good First Issues¶
Look for issues labeled good first issue for beginner-friendly tasks.
Types of Contributions¶
- Bug fixes - Fix reported issues
- Features - Implement new functionality
- Documentation - Improve docs
- Tests - Add test coverage
- Performance - Optimize code
- Accessibility - Improve a11y
Feature Requests¶
Before working on a large feature:
- Check existing issues
- Open a new issue to discuss
- Wait for maintainer feedback
Project Structure¶
learnify/
├── prisma/ # Database schema and seeds
├── docs/ # Documentation
├── src/
│ ├── app/ # Next.js App Router pages
│ ├── components/ # React components
│ ├── lib/ # Utilities and configs
│ ├── hooks/ # Custom React hooks
│ ├── providers/ # Context providers
│ └── types/ # TypeScript types
└── public/ # Static assets
Questions?¶
- Open an issue for questions
- Check existing issues and discussions
- Read the documentation
Thank you for contributing! 🎉