Thank you for your interest in contributing to AntennaSim! This guide will help you get started.
- Docker and Docker Compose
- Git
- Node.js 20+ (only needed for running checks locally)
- Fork the repository and clone your fork:
git clone https://github.com/YOUR_USERNAME/AntennaSim.git
cd AntennaSim- Create the environment file:
cp .env.example .env- Start the development environment:
./scripts/dev.shOr manually:
docker compose -f docker-compose.yml -f docker-compose.dev.yml up --build- Access the application:
| Service | URL |
|---|---|
| Frontend | http://localhost:5173 |
| Backend API | http://localhost:8000 |
| API Docs (Swagger) | http://localhost:8000/docs |
Source directories are volume-mounted, so changes are reflected immediately via hot-reload.
Create branches from main using the following prefixes:
| Prefix | Use for |
|---|---|
feat/ |
New features |
fix/ |
Bug fixes |
docs/ |
Documentation changes |
chore/ |
Maintenance, CI, tooling |
refactor/ |
Code refactoring |
Example: feat/horizontal-delta-loop, fix/simulation-timeout
This project follows the Conventional Commits specification:
type(optional-scope): description
| Type | Description |
|---|---|
feat |
A new feature |
fix |
A bug fix |
docs |
Documentation changes |
style |
Code style (formatting, semicolons, etc.) |
refactor |
Code refactoring (no feature or fix) |
perf |
Performance improvement |
test |
Adding or updating tests |
build |
Build system or dependencies |
ci |
CI/CD configuration |
chore |
Maintenance tasks |
feat: add horizontal delta loop template
fix: resolve simulation timeout on large models
docs: update README with new screenshots
feat(templates): add EFHW antenna template
Important: PR titles must follow this format. When we squash-merge your PR, the title becomes the commit message on main.
- Sync your branch with the latest
main. Rebasing is preferred to keep the PR history clean, but merging is also fine since we squash-merge all PRs:
# Preferred: rebase
git fetch origin
git rebase origin/main
# Also acceptable: merge
git fetch origin
git merge origin/main- Run the checks locally:
cd frontend
npm run type-check # tsc --noEmit
npm run lint # eslint
npm run build # tsc -b && vite build- Make sure all three pass before opening the PR.
Include the following in your PR description:
- Summary -- What changed and why (1-3 bullet points)
- Testing -- How you verified the changes work
- Screenshots -- If the PR includes UI changes
- All PRs are reviewed by a maintainer before merging.
- CI checks (type-check, lint, build) must pass.
- PR title must follow Conventional Commits format.
- PRs are squash-merged to keep
mainhistory clean.
The most common contribution. See existing templates in frontend/src/templates/ for reference (e.g., delta-loop.ts, dipole.ts).
- Create
frontend/src/templates/your-antenna.tsimplementing theAntennaTemplateinterface - Register it in
frontend/src/templates/index.ts(import + add to thetemplatesarray) -- this automatically makes it available in the Simulator, Editor, and Library - Add your template ID to
relatedTemplatesarrays of related existing templates - Update
README.md-- increment the template count and add to the templates table - Run
npm run type-check && npm run buildand test manually
- Components --
frontend/src/components/(charts, 3D viewport, panels, common UI) - Pages --
frontend/src/pages/(Simulator, Editor, Library, Learn, About) - State management --
frontend/src/stores/(Zustand stores for antenna, simulation, editor, UI) - Routing -- React Router in
frontend/src/App.tsx
Follow existing component patterns. Use TypeScript strict mode and type-only imports where possible.
- API endpoints --
backend/src/(FastAPI) - Simulation engine -- NEC2 runner, parsers, and result processing
- The backend runs inside Docker -- use
./scripts/dev.shfor hot-reload development - Test API changes via Swagger at
http://localhost:8000/docs
- Open an issue first describing the bug (unless one already exists)
- Reference the issue number in your PR (e.g., "Fixes #12")
- Include steps to reproduce in the PR description
- TypeScript -- All frontend code is TypeScript with strict mode
- ESLint -- Run
npm run lintto check for issues - Formatting -- Follow the existing code style in the project
- Imports -- Use type-only imports where possible (
import type { ... }) - NEC2 conventions -- Coordinates follow NEC2: X=east, Y=north, Z=up
- Segmentation -- Use
autoSegment()from../engine/segmentationfor wire segments
If you have questions about contributing, feel free to open an issue with the question label or start a discussion on the repository.