Thank you for your interest in contributing to GhostClass! This guide will help you understand our development workflow and contribution process.
👋 For External Contributors: You don't need GPG keys, PAT tokens, or any special setup! Just fork, code, and submit a PR. The version bump workflow will guide you through a simple script. See Quick Setup below.
- Getting Started
- Development Workflow
- Versioning System
- Pull Request Process
- Code Quality & Testing
- Build Performance Tips
- Commit Messages
- For Maintainers Only
- Node.js: 24.14.1+
- npm: 11.11.0+
- Flutter SDK: 3.27+ (for mobile development)
- Dart SDK: ^3.11.4 (bundled with Flutter)
- Git: Latest version
That's it! External contributors don't need GPG keys, GitHub PAT tokens, or access to secrets.
# 1. Fork and clone
git clone https://github.com/YOUR_USERNAME/GhostClass.git
cd GhostClass
# 2. Install dependencies
npm install --legacy-peer-deps
# 3. Create feature branch
git checkout -b feature/your-feature-name
# 4. Start development
npm run dev # Web development
cd mobile && flutter run # Mobile developmentThat's all you need to start developing! For advanced maintainer setup (GPG, PAT tokens, deployment), see For Maintainers Only at the bottom of this guide.
npm run dev # Development server (HTTP)
npm run dev:https # Development server (HTTPS, requires certificates)
npm run build # Production build
npm run lint # Run ESLint
npm run test # Run unit tests
npm run test:e2e # Run end-to-end tests
npm run test:coverage # Generate coverage reportcd mobile
flutter pub get # Install dependencies
flutter run # Run on device/emulator
flutter test # Run Flutter tests
flutter build apk # Build Android APK-
Create a feature branch from
main -
Make your changes
-
Write or update tests
-
Run tests and linter:
npm run test npm run lint -
Commit with clear messages (see Commit Messages)
-
Push and create a Pull Request
Important: Centralized version values apply automatically! See Versioning System below.
GhostClass derives its build versions dynamically via centralized Infisical runtime and CI configurations (NEXT_PUBLIC_APP_VERSION). Contributors do not need to manually compute or inject git semantic rollover tags when proposing features. Maintainers synchronize version thresholds directly in the project dashboard prior to production releases.
- Push your branch to GitHub
- Open a Pull Request against
main - Fill in the PR template:
- Description of changes
- Related issue numbers
- Testing notes
- Wait for auto-bump (same-repo) or manually bump (fork)
- Request review from maintainers
- Tests pass locally (
npm run test) - Linter passes (
npm run lint) - Version bumped (automatic or manual)
- Documentation updated (if needed)
- Commit messages follow conventions
- Automated tests run on your PR
- Maintainers review your code
- Address feedback or requested changes
- Once approved, maintainer merges
- Auto-tagging and release workflows run automatically
npm run lint# Unit tests
npm run test # Run once
npm run test:watch # Watch mode
npm run test:ui # Interactive UI
npm run test:coverage # Coverage report
# E2E tests
npm run test:e2e # Headless mode
npm run test:e2e:ui # Interactive UI
npm run test:e2e:headed # See browser- Use TypeScript strictly
- Follow existing code patterns
- Write meaningful names
- Add comments for complex logic
- Keep functions small and focused
- Test edge cases and error conditions
Our Docker builds are optimized with layer caching and conditional ARM64 builds.
# Build Docker image locally
docker build -t ghostclass:test .
# With build args
docker build \
--build-arg APP_COMMIT_SHA=$(git rev-parse HEAD) \
-t ghostclass:test .| Build Type | Platforms | Time | Use Case |
|---|---|---|---|
| Cached build | AMD64 | ~3-5 min | Incremental changes |
| Cold build | AMD64 | ~6-8 min | Fresh build |
| Multi-arch | AMD64 + ARM64 | ~10-15 min | Production releases |
- Layer caching: GitHub Actions cache with
mode=max - Conditional ARM64: Only built for tag pushes or manual trigger
- Multi-stage builds: Optimized layer reuse
- Dependency caching: npm dependencies cached separately
To test with ARM64 locally:
docker buildx build \
--platform linux/amd64,linux/arm64 \
-t ghostclass:test .Follow conventional commit format:
<type>(<scope>): <subject>
feat: New featurefix: Bug fixdocs: Documentation onlystyle: Code style (formatting, no logic change)refactor: Code restructuringtest: Adding/updating testschore: Maintenance (deps, version bumps)perf: Performance improvementci: CI/CD changes
feat(auth): add JWT authentication support
fix(api): handle null response in user endpoint
docs: update contributing guide
chore: bump version to v1.7.0For multi-line commits:
feat(dashboard): add attendance calendar view
Implements a monthly calendar view showing attendance history.
Includes color-coded present/absent indicators and hover tooltips.
Closes #123
- Bug Reports: Use bug report template
- Feature Requests: Use feature request template
- Questions: Open a Discussion
- Setup Issues: Check SECURITY.md and
.example.env
⚠️ This section is for repository maintainers with write access only.
External contributors can skip this section entirely.
- Centralized management via Infisical Dashboard acts as the single source of truth, organized into
/build-time,/runtime, and/cifolders. - While GitHub Actions (
/build-timeand/ci) use Native Integrations, Coolify production runtime environments inject/runtimesecrets dynamically into memory at boot time using the Infisical CLI wrapper. - Eliminates manual script execution and plaintext storage on disk.
- External contributors don't need access to Infisical to submit code.
- App Versioning: Controlled directly via
NEXT_PUBLIC_APP_VERSIONinjected dynamically at runtime/compile-time. - Release Automation: Dynamic multi-arch bundles and attestation manual updates are published synchronously upon successful merges to the primary main trunk.
By contributing, you agree that your contributions will be licensed under the project's GPLv3 license.
Thank you for contributing to GhostClass! 🚀