Free and open-source ballistics calculators. Privacy-first, actively developed, always free.
This repository contains three applications:
vapr-ballistics/
├── apps/
│ ├── landing-page/ # Marketing site (vaprballistics.com)
│ ├── js-client/ # Pure client-side calculator
│ └── fastapi-fullstack/ # Full-stack calculator (FastAPI + React)
├── packages/ # Shared packages (future)
└── docs/ # Documentation
Marketing website for vaprballistics.com
- Framework: Next.js 16 with React 19
- UI: shadcn/ui with Tailwind CSS v4
- Deployment: Static export, CDN-ready
- Port: 3002
Quick Start:
cd apps/landing-page
pnpm install
pnpm devPure client-side ballistics calculator - No backend required!
- Framework: Next.js 15 with React 19
- Ballistics Engine: js-ballistics v2.2.0-beta.2
- UI: Shadcn/ui with Tailwind CSS v4
- Charts: Recharts for trajectory visualization
- Deployment: Static export, CDN-ready
Pure client-side ballistics calculator - No backend required!
- Framework: Next.js 15 with React 19
- Ballistics Engine: js-ballistics v2.2.0-beta.2
- UI: Shadcn/ui with Tailwind CSS v4
- Charts: Recharts for trajectory visualization
- Deployment: Static export, CDN-ready
- Port: 3000
Use Cases:
- Offline ballistics calculations
- Privacy-first (no data leaves your device)
- Fast, lightweight deployments
- No server costs
Quick Start:
cd apps/js-client
pnpm install
pnpm devTraditional full-stack application with Python backend and React frontend.
- Backend: FastAPI with py-ballisticcalc
- Frontend: Next.js 15 with React 19
- API: RESTful with OpenAPI docs
- Deployment: Docker Compose, multi-container
Use Cases:
- Advanced server-side calculations
- API for mobile apps
- Enterprise deployments
- Complex ballistics modeling
Quick Start (Docker):
cd apps/fastapi-fullstack/docker
docker-compose -f docker-compose.dev.yml up --buildAccess:
- Frontend: http://localhost:3000
- Backend API: http://localhost:8000
- API Docs: http://localhost:8000/docs
Quick Start (Manual):
# Backend
cd apps/fastapi-fullstack/backend
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements-dev.txt
uvicorn app.main:app --reload --port 8000
# Frontend (new terminal)
cd apps/fastapi-fullstack/frontend
npm install
npm run dev- Node.js 18+ and pnpm 10+ (for both apps)
- Python 3.11+ (for FastAPI fullstack only)
- Docker (optional, for FastAPI fullstack)
# Clone the repository
git clone https://github.com/robsdevcraft/vapr-ballistics.git
cd vapr-ballistics
# Install root dependencies (Turborepo)
pnpm installRun JS Client:
pnpm --filter @vapr/js-client devRun FastAPI Fullstack (Docker):
cd apps/fastapi-fullstack/docker
docker-compose -f docker-compose.dev.yml up --buildBuild All Apps:
pnpm build| Feature | JS Client | FastAPI Fullstack |
|---|---|---|
| Backend Required | ❌ No | ✅ Yes |
| Ballistics Engine | js-ballistics | py-ballisticcalc |
| Offline Capable | ✅ Yes | ❌ No |
| API Available | ❌ No | ✅ Yes |
| Deployment Complexity | Low (CDN) | Medium (Docker) |
| Server Costs | None | Required |
| Best For | Static sites, demos | Enterprise, mobile APIs |
- Monorepo: Turborepo v2.5.8
- Package Manager: pnpm v10.18.1
- Frontend Framework: Next.js 15 with React 19
- UI Library: Shadcn/ui with Tailwind CSS v4
- Charts: Recharts v3.1.2
- Forms: React Hook Form + Zod validation
- TypeScript: Full type safety
- Ballistics: js-ballistics v2.2.0-beta.2
- Deployment: Static export
- Backend: FastAPI with Python 3.11+
- Ballistics: py-ballisticcalc v2.2.6.post1+
- API Docs: OpenAPI/Swagger
- Container: Docker + Docker Compose
- Reverse Proxy: Nginx (production)
vapr-ballistics/
├── apps/
│ ├── js-client/ # Client-only app
│ │ ├── src/
│ │ │ ├── app/ # Next.js app router
│ │ │ ├── components/ # React components
│ │ │ ├── hooks/ # Custom hooks
│ │ │ └── lib/ # Utilities & ballistics
│ │ ├── package.json
│ │ └── next.config.ts
│ │
│ └── fastapi-fullstack/ # Fullstack app
│ ├── backend/ # FastAPI backend
│ │ ├── app/
│ │ │ ├── main.py
│ │ │ ├── routers/
│ │ │ ├── services/
│ │ │ └── models/
│ │ └── requirements.txt
│ │
│ ├── frontend/ # Next.js frontend
│ │ ├── src/
│ │ │ ├── app/
│ │ │ └── components/
│ │ └── package.json
│ │
│ ├── docker/ # Docker orchestration
│ │ ├── docker-compose.yml
│ │ ├── docker-compose.dev.yml
│ │ ├── docker-compose.prod.yml
│ │ └── nginx.conf
│ │
│ ├── scripts/ # Development scripts
│ │ ├── dev/
│ │ ├── prod/
│ │ └── deploy/
│ │
│ └── README.md
│
├── docs/ # Documentation
├── packages/ # Shared packages (future)
├── package.json # Root workspace config
├── pnpm-workspace.yaml # pnpm workspace definition
└── turbo.json # Turborepo config
# Run dev server
pnpm --filter @vapr/js-client dev
# Build for production
pnpm --filter @vapr/js-client build
# Lint code
pnpm --filter @vapr/js-client lintUsing Docker (Recommended):
cd apps/fastapi-fullstack/scripts/dev/windows
start.bat # Windows
# Or Unix
cd apps/fastapi-fullstack/scripts/dev/unix
./start.shManual Development:
# Backend
cd apps/fastapi-fullstack/backend
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements-dev.txt
uvicorn app.main:app --reload --port 8000
# Frontend (new terminal)
cd apps/fastapi-fullstack/frontend
npm install
npm run dev# Build all apps
pnpm build
# Run all dev servers
pnpm dev
# Lint all apps
pnpm lint
# Clean all builds
pnpm clean- JS Client: See
apps/js-client/README.md - FastAPI Fullstack: See
apps/fastapi-fullstack/README.md - Scripts Guide: See
apps/fastapi-fullstack/scripts/README.md
Port 3000 already in use:
# Windows
netstat -ano | findstr :3000
taskkill /PID <PID> /F
# Unix
lsof -ti:3000 | xargs kill -9Build errors:
cd apps/js-client
rm -rf .next node_modules
pnpm install
pnpm buildDocker build slow:
- The
.dockerignorefiles should exclude__pycache__,node_modules, etc. - If build context is large, verify
.dockerignoreexists inbackend/andfrontend/
Backend won't start:
cd apps/fastapi-fullstack/backend
python --version # Verify 3.11+
pip install -r requirements.txtFrontend API connection:
- Verify
NEXT_PUBLIC_API_URLin.env.local - Check backend is running on port 8000
- Review CORS settings in backend
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- js-ballistics - Client-side ballistics library
- py-ballisticcalc - Python ballistics library
- Huge thank you to o-murphy for building and maintaining both libraries
- shadcn/ui - The web standard for UI components
- FastAPI - Modern Python web framework
- Next.js - React framework
- Turborepo - High-performance monorepo build system
For ideas, suggestions, or overall discussion for this repo please create a post in discussions.
This application is for educational and recreational purposes ONLY. Verify incrementally at shorter ranges first and always verify calculations with additional sources for direct applications. You own every round that leaves your muzzle.
USMC OEF Infantry Veteran, PRS + IDPA Competitor, USCCA Certified Instructor, Hunter and IT Nerd Robert Anderson. These tools should be free and most importantly easy to use. I am making the best version I can through VAPR Ballistics. I hope you get a chance to try it and provide feedback to make this the best tool it can possibly be.
VAPR - leave no trace...