-
Notifications
You must be signed in to change notification settings - Fork 0
Contributing
Thank you for your interest in contributing to PERTI. This guide outlines the process for contributing code, documentation, and other improvements.
All contributors are expected to:
- Be respectful and professional in all interactions
- Focus on constructive feedback
- Support an inclusive community
- Follow VATSIM's Code of Conduct
Before contributing, ensure you have:
- A GitHub account
- Git installed locally
- Development environment set up (see Getting Started)
- Familiarity with the Architecture
- Fork the repository on GitHub
- Clone your fork:
git clone https://github.com/your-username/PERTI.git cd PERTI - Add upstream remote:
git remote add upstream https://github.com/vATCSCC/PERTI.git
Use descriptive branch names:
| Prefix | Purpose | Example |
|---|---|---|
feature/ |
New functionality | feature/demand-charts |
fix/ |
Bug fixes | fix/gs-activation-error |
docs/ |
Documentation | docs/api-reference |
refactor/ |
Code improvements | refactor/adl-queries |
git checkout main
git pull upstream main
git checkout -b feature/your-feature-name- Make focused, incremental changes
- Test thoroughly before committing
- Write clear commit messages
Follow conventional commit format:
type(scope): brief description
Longer explanation if needed. Explain the what and why,
not the how (code explains how).
Fixes #123
Types:
-
feat- New feature -
fix- Bug fix -
docs- Documentation -
refactor- Code refactoring -
test- Adding tests -
chore- Maintenance tasks
Examples:
feat(gdt): add demand visualization chart
fix(jatoc): correct incident status transition
docs(api): update ground stop endpoint documentation
- Follow PSR-12 coding standard
- Use meaningful variable and function names
- Document public functions with PHPDoc
- Use parameterized queries for all database operations
- Handle errors appropriately
/**
* Retrieves active ground stops for an airport.
*
* @param string $airport ICAO airport code
* @return array Active ground stop records
*/
function getActiveGroundStops(string $airport): array
{
// Implementation
}- Use ES6+ syntax
- Prefer
constandletovervar - Use meaningful names
- Comment complex logic
/**
* Updates the demand chart with new data.
* @param {Object} demandData - Hourly demand data
*/
function updateDemandChart(demandData) {
// Implementation
}- Use uppercase for SQL keywords
- Use meaningful aliases
- Include comments for complex queries
- Parameterize all inputs
-- Get active ground stops with affected flight counts
SELECT
gs.id,
gs.airport,
COUNT(f.id) AS affected_flights
FROM ground_stops gs
LEFT JOIN flights f ON f.destination = gs.airport
WHERE gs.status = 'active'
GROUP BY gs.id, gs.airport;Ensure your changes:
- Work correctly in local environment
- Do not break existing functionality
- Handle edge cases appropriately
- Include appropriate error handling
- Feature works as intended
- No console errors in browser
- API responses are correct
- Database operations succeed
- Authentication/authorization enforced
- Works across supported browsers
- i18n keys added for all new user-facing strings
-
PERTI_MYSQL_ONLYflag not applied to files using Azure SQL connections - New API endpoints documented in wiki
-
Push your branch:
git push origin feature/your-feature-name
-
Open a Pull Request on GitHub
-
Fill out the PR template:
## Summary Brief description of changes. ## Changes - Added X - Fixed Y - Updated Z ## Testing How was this tested? ## Screenshots (If applicable) ## Related Issues Fixes #123
- Descriptive title and summary
- Linked to related issue(s)
- No merge conflicts with main
- Passes all checks
- Code reviewed
- Maintainers review within 48-72 hours
- Address feedback promptly
- Request re-review after changes
- Maintainer merges when approved
- New features
- Bug fixes
- Performance improvements
- Security patches
- Wiki pages
- Code comments
- API documentation
- User guides
- Bug reports (with reproduction steps)
- Feature suggestions
- Usability feedback
- Translation assistance
Include:
- Clear description of the issue
- Steps to reproduce
- Expected vs. actual behavior
- Browser/environment details
- Screenshots if applicable
Include:
- Description of the feature
- Use case / problem it solves
- Proposed implementation (optional)
- Mockups if applicable
We particularly welcome contributions in:
| Area | Description |
|---|---|
| Documentation | Wiki improvements, user guides |
| Accessibility | WCAG compliance improvements |
| Testing | Automated test coverage |
| Performance | Query optimization, caching |
| Internationalization | i18n dialog migration (~267 remaining Swal.fire calls), locale file expansion, PHP-side i18n layer |
- Create migration file in the appropriate directory:
-
MySQL (perti_site):
database/migrations/organized by feature (e.g.,tmi/,initiatives/,jatoc/) -
Azure SQL (ADL):
adl/migrations/organized by feature area (core/,boundaries/,crossings/,eta/,navdata/,changelog/,cifp/,demand/) -
PostGIS (GIS):
database/migrations/postgis/ -
TMI:
database/migrations/tmi/
-
MySQL (perti_site):
- Use sequential numbering
- Include rollback SQL if possible
- Document in PR
- Maintain backward compatibility when possible
- Document new endpoints in API Reference
- Update any affected client code
- Follow existing Bootstrap patterns
- Test responsive behavior
- Ensure accessibility
- Match existing visual style
All new user-facing strings in JavaScript must use the PERTII18n.t() translation system rather than hardcoded English strings.
- Add translation keys to
assets/locales/en-US.jsonusing the nested key structure - Reference keys in code via
PERTII18n.t('section.key')with interpolation support for dynamic values - Use the
PERTIDialogwrapper for all modal dialogs instead of callingSwal.fire()directly --PERTIDialogresolves i18n keys automatically - Test locale detection by verifying behavior with the
?locale=URL parameter,localStorage(PERTI_LOCALE), andnavigator.languagefallback
See the Internationalization section in CLAUDE.md for the full API reference and current coverage status.
-
PERTI_MYSQL_ONLYflag -- For PHP endpoints that only need MySQL, adddefine('PERTI_MYSQL_ONLY', true);beforeinclude connect.phpto skip the 5 eager Azure SQL connections (~500-1000ms saved per request):include("../../../load/config.php"); define('PERTI_MYSQL_ONLY', true); include("../../../load/connect.php");
Always grep for
$conn_adl,$conn_tmi,$conn_swim,$conn_ref, and$conn_gisin the file before applying this flag. Applying it to a file that uses any Azure SQL connection will cause silent failures or HTTP 500 errors. -
Parallel API calls -- Use
Promise.all()for independent API calls in JavaScript to avoid sequential waterfalls:const [configs, staffing, forecasts] = await Promise.all([ fetch('/api/data/plans/configs.php?p_id=' + planId), fetch('/api/data/plans/term_staffing.php?p_id=' + planId), fetch('/api/data/plans/forecast.php?p_id=' + planId) ]);
Contributors are recognized in:
- Git commit history
- Release notes (for significant contributions)
- Contributors section in README (for major contributions)
- Open a GitHub Discussion for questions
- Tag maintainers if urgent
- Check existing issues/discussions first
- Getting Started - Development setup
- Architecture - System overview
- Code Style - Detailed style guide
PERTI - Virtual Air Traffic Control System Command Center Production Site | GitHub | Report Issue
Last updated: 2026-02-25
Home Navigation Helper (NEW)
Comprehensive Guides
Getting Started
Architecture
Algorithms & Processing
- Algorithms Overview
- Algorithm ETA Calculation
- Algorithm Trajectory Tiering
- Algorithm Zone Detection
- Algorithm Route Parsing
- Algorithm Data Refresh
SWIM API (Public/External)
- SWIM API
- SWIM Routes API
- SWIM Playbook API
- SWIM Route Data Integration
- Building Route Processing
- CDM Connector Guide
PERTI API (Internal)
Features
Walkthroughs
Operations
Development
Analysis
- Analysis (index)
- ETA Accuracy (Jan-Mar 2026)
Reference