This document provides the rules and processes for contributing to the CAMP (Campus Asset Management Platform) project. Please review it before making contributions to ensure consistency and collaboration across the team.
- Team Norms
- Git Workflow
- Development Environment Setup
- Coding Standards
- How to Contribute
- Pull Request Process
- Building and Testing
- Respect: Every voice matters; treat all feedback constructively.
- Communication: Keep updates open and transparent.
- Collaboration: Support teammates and review code with care.
- Accountability: Own your assigned work and deliver on time.
- Quality: Write maintainable, readable, and well-tested code.
- Commit regularly; don’t wait until the end of a sprint.
- Review PRs within 24 hours.
- Update task progress daily on the board.
- Communicate blockers early.
- Update documentation alongside new code.
We follow the Feature Branch Workflow.
Use the format:
<type>/<short-description>
Examples: feature/add-login fix/resolve-overdue-alert docs/update-readme
perl Copy code
Follow the format:
<type>(<scope>): <subject>
Types: feat, fix, docs, style, refactor, test, chore
Scope: The component/feature affected (optional but recommended)
Subject: Brief description of the change
Example: feat(auth): implement JWT refresh token endpoint
# Create and checkout a feature branch
git checkout -b feature/add-dashboard
# Make your changes and commit regularly
git add .
git commit -m "feat(dashboard): add staff dashboard UI"
# Push to remote
git push origin feature/add-dashboard
# Open a Pull Request on GitHub
# All PRs go to the master branch- Node.js v18+ and npm v9+
- MongoDB Atlas account (or local MongoDB 6.0+)
- Git
- VS Code (recommended)
# Clone the repository
git clone https://github.com/agile-students-fall2025/4-final-camp.git
cd 4-final-campBackend Setup:
cd back-end
npm install
# Create environment file
cp .env.example .env
# Edit .env with your MongoDB Atlas credentials
nano .env
# Start development server
npm startFrontend Setup:
cd ../front-end
npm install --legacy-peer-deps
npm run devBackend .env example:
MONGODB_URI=mongodb+srv://user:password@cluster.mongodb.net/camp
JWT_SECRET=your_jwt_secret_key
NODE_ENV=development
PORT=8081Frontend .env example:
REACT_APP_USE_MOCK=false
REACT_APP_API_BASE=/api- Frontend: http://localhost:3001
- Backend: http://localhost:8081
- API Health Check: http://localhost:8081/health
- Use ES6+ syntax (const/let, arrow functions, destructuring)
- Prefer async/await over callbacks or promise chains
- Use meaningful variable names (camelCase)
- Keep functions focused on a single responsibility
- Add JSDoc comments for functions and complex logic
- Use functional components with React hooks exclusively
- Use PascalCase for component names
- Keep component files focused (one component per file when possible)
- Use meaningful prop names and include prop validation
- Extract reusable components to reduce duplication
- Use middleware for cross-cutting concerns (auth, validation, logging)
- Keep route handlers clean; move business logic to models/services
- Use proper HTTP status codes
- Return consistent JSON error responses
Frontend:
cd front-end
npm run lint
npm run lint:fixBackend: Code should follow project conventions. Run tests to catch issues:
cd back-end
npm test-
Select or Create an Issue
- Check the GitHub Project Board
- Find an unassigned task or create a new issue
- Assign yourself and add the appropriate sprint milestone
-
Create a Feature Branch
- Follow naming conventions:
feature/issue-descriptionorfix/issue-description - Example:
feature/add-notification-system
- Follow naming conventions:
-
Implement & Test Changes
- Write code following our coding standards
- Test your changes locally
- Run linting and tests before committing
- Update relevant documentation
-
Commit & Push
- Commit with meaningful messages
- Push regularly; don't wait until the end
- Example:
git push origin feature/add-notification-system
-
Submit a Pull Request
- Open PR against the
masterbranch - Include a clear description of changes
- Reference the related issue (e.g., "Closes #42")
- Request at least one team member to review
- Open PR against the
-
Code Review
- Address reviewer feedback promptly
- Re-request review after updates
- Keep discussions constructive and collaborative
- Code follows our style guidelines
- All tests pass locally (
npm testin relevant directory) - No debugging code (console.logs, etc.)
- Documentation updated if adding new features
- Commit messages follow our convention
- No sensitive credentials in code
## Description
Brief explanation of the changes made.
## Related Issue
Closes #<issue-number>
## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Breaking change
- [ ] Documentation update
## Testing
How was this tested? Include any relevant test results.
## Screenshots
(if applicable)- Team members will review and provide feedback within 24 hours
- Address feedback and push updates to the same branch
- Once approved, maintainer will merge using "Squash and Merge"
- Delete the feature branch after merging
Backend Tests:
cd back-end
npm test # Run all tests
npm run test:coverage # Run with coverage report
npm test -- auth.test.js # Run specific test fileFrontend Build:
cd front-end
npm run build # Create production build
npm run lint # Check code quality- Backend tests use Mocha, Chai, and Supertest
- Aim for >80% code coverage on critical paths
- All new features should include corresponding tests
- Backend has 9 test suites covering major functionality
Our project includes automated CI/CD:
- CI: Runs on every PR (tests, linting, build)
- CD: Deploys to production on merge to master
- Configuration in
.github/workflows/
View pipeline status in the README badges
Current Sprint (Sprint 4):
- Scrum Master: Shaf Khalid
- Product Owner: Saad Iftikhar
For current role assignments, see the README.md
- Review this document for answers
- Check existing GitHub issues for similar problems
- Post in project discussions or reach out via team chat
- Contact the Scrum Master if the issue is urgent or process-related
Thank you for contributing to CAMP! Your work directly impacts the university community. Let's build something great together. 🚀