Welcome Contributors
Thank you for your interest in contributing to SkillRise! This guide will help you get started with the development workflow, coding standards, and submission process.SkillRise is an open-source project built for students and educators. We welcome contributions of all kinds - bug fixes, features, documentation, and more.
Getting Started
Prerequisites
Before you begin, ensure you have the following installed:Node.js
Version 20 or higher required for both client and server
MongoDB
Local instance or MongoDB Atlas connection
Git
For version control and collaboration
Docker
Optional, for containerized development
Required Accounts
You’ll need accounts for the following services:- Clerk - Authentication and user management
- Stripe - Payment processing
- Cloudinary - Media storage and CDN
- Groq - AI-powered features
Development Setup
1. Fork and Clone
Start by forking the repository and cloning your fork:2. Install Dependencies
Install packages for both client and server:3. Configure Environment Variables
Create.env files with your credentials:
4. Seed the Database (Optional)
Populate your local database with demo data:- 5 demo educators and 5 demo students
- 5 sample courses with chapters and lectures
- Community groups, posts, and replies
- Quizzes and sample enrollment data
5. Run the Development Servers
Start both frontend and backend in separate terminals:The client dev server proxies API requests to
http://localhost:3000 as configured in VITE_BACKEND_URL.6. Set Up Webhooks (Optional)
For testing authentication and payments locally, forward webhooks using ngrok:Development Workflow
Branch Strategy
SkillRise follows a Git Flow-inspired branching model:1
Create a Feature Branch
Always branch from
dev, never from main:2
Make Your Changes
Write code, add tests, update documentation as needed.
3
Commit Your Work
Use clear, descriptive commit messages:
4
Push to Your Fork
5
Open a Pull Request
Create a PR from your fork to the
dev branch of the main repository.Commit Message Convention
Use clear, imperative commit messages:Code Standards
Linting and Formatting
SkillRise uses ESLint for code quality and Prettier for consistent formatting.- Client
- Server
JavaScript/JSX Style Guide
Component Structure
API Controllers
File Naming Conventions
- Client
- Server
- Components: PascalCase with
.jsxextension- ✓
CourseCard.jsx - ✓
UserProfile.jsx
- ✓
- Hooks: camelCase with
useprefix- ✓
useTimeTracker.js - ✓
useInView.js
- ✓
- Utils: camelCase
- ✓
formatDate.js - ✓
apiClient.js
- ✓
Pull Request Process
Before Submitting
PR Template
When creating a pull request, include:CI Checks
All pull requests trigger automated CI checks via GitHub Actions:1
Client Build Job
- Install dependencies (
npm ci) - Run ESLint (
npm run lint) - Check Prettier formatting (
npm run format:check) - Build the app (
npm run build)
2
Server Lint Job
- Install dependencies (
npm ci) - Run ESLint (
npm run lint) - Check Prettier formatting (
npm run format:check)
Review Process
- Automated Checks: CI pipeline must pass
- Code Review: At least one maintainer approval required
- Testing: Reviewers may test changes locally
- Merge: Once approved, maintainers will merge to
dev
Development Commands Reference
Client Commands
Server Commands
Docker Commands
Common Development Tasks
Adding a New API Route
1
Create Controller Function
Add logic in appropriate controller file:
2
Define Route
Add route in corresponding routes file:
3
Test Endpoint
Use Postman or curl to test:
Adding a New React Component
1
Create Component File
2
Import and Use
Adding Environment Variables
1
Update .env Files
Add the variable to appropriate
.env file(s)2
Document in README
Update the environment variables section in documentation
3
Add to CI/CD
If needed for builds, add to GitHub Secrets and workflow files
Troubleshooting
Port already in use
Port already in use
If you see “Port 3000 already in use” or “Port 5173 already in use”:
MongoDB connection failed
MongoDB connection failed
Ensure MongoDB is running:
Module not found errors
Module not found errors
Reinstall dependencies:
Clerk authentication not working
Clerk authentication not working
Verify:
- Publishable key matches in both
.envfiles - Webhook secret is correct
- ngrok URL is configured in Clerk dashboard (for local webhooks)
Getting Help
GitHub Issues
Report bugs or request features
Discussions
Ask questions and share ideas
Documentation
Read through our full documentation
Code of Conduct
Be respectful and collaborative
Remember: Good code is code that others can understand. Write clear, maintainable code and document complex logic.
Related Resources
Project Structure
Understand the codebase organization
Testing Guide
Learn about testing approaches