Skip to content

just-shane/stringforge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

28 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿน StringForge

Archery bowstring & arrow physics simulator. In your browser. No excuses.

Live at: https://stringforge.io For archers, bowyers, and technicians who want to see the physics in real time.

StringForge โ€” main dashboard with string visualizer, stats bar, and control panel

v4.0.0 ย ยทย  React 19 + TypeScript ย ยทย  Vite ย ยทย  Zustand ย ยทย  Tailwind v4
181 tests passing ย ยทย  PWA installable ย ยทย  Works offline


What Is This?

StringForge is a browser-based physics simulator built for archers, bow techs, and bowyers who want to see what's actually happening when they change string materials, add speed weights, swap arrow shafts, or adjust nock height.

Every slider you move recalculates the full physics pipeline in real time โ€” string vibration modes, arrow velocity, energy distribution, ballistic trajectory, noise levels โ€” rendered in crisp SVG with zero plugins.


โšก At a Glance

๐Ÿ—๏ธ 4 Bow Families Compound (cam let-off), Recurve, Longbow, Crossbow
๐Ÿงต 7 String Materials BCY-X, 452X, 8190, D97, Dacron B-50, Fast Flight, 8125 โ€” real specs
๐Ÿน 15 Arrow Shafts Full builder: shaft + point + nock + fletching + wrap โ†’ FOC & dynamic spine
โš–๏ธ 8 Speed Weights Brass & tungsten, drag-to-position, see exact fps tradeoff
๐Ÿ“Š 15 Bow Database Mathews, Hoyt, Bowtech, PSE, Prime, Elite, Bear, Win&Win + more

| ๐ŸŽจ 7 Themes | Midnight, Neon, Dracula, Nord, Monokai, Catppuccin, High Contrast |


๐Ÿ”ฌ The Physics

This isn't a toy calculator. Every number on screen comes from a real model.

String Vibration

fโ‚™ = (n / 2L) ร— โˆš(T / ฮผ)

8 harmonic modes animated in real time. Place weights at antinodes to kill specific frequencies โ€” watch the damping happen live.

Arrow Velocity

v = โˆš(2 ร— ฮท ร— E_stored / m_virtual)
where m_virtual = m_arrow + m_string/3

Force-draw curves computed via numerical integration. Efficiency factors calibrated per bow type.

Ballistics

F_drag = ยฝ ร— Cd ร— ฯ ร— A ร— vยฒ

Euler-integrated trajectory with quadratic drag, gravity, and wind. KE & momentum tables every 10 yards out to 100.

Reference Benchmarks

Metric Value
IBO compound speed ~300 fps (70# / 30" / 350 gr)
String mass (24-strand BCY-X) 70โ€“90 gr
Speed penalty ~1.8 fps per 10 gr added
Fundamental frequency 120โ€“160 Hz

๐Ÿ“ธ Screenshots

Dashboard โ€” Midnight Theme

Full control panel on the left, animated string visualizer with weight positions, real-time stats bar across the top.

Main dashboard โ€” Midnight theme

Force-Draw Curve & Energy Breakdown

See exactly where every ft-lb goes: arrow KE, limb KE, string KE, hysteresis, vibration, and sound losses.

Force-draw curve and energy breakdown chart

Sound Analysis & Harmonic Spectrum

Vibration decay waterfall, calibrated dB noise estimate, and per-harmonic amplitude bars with weight placement guide.

Sound analysis, vibration waterfall, and harmonic spectrum

Neon Theme โ€” Same Data, Different Vibe

All 7 themes swap instantly via CSS custom properties. No reload.

Neon theme variant


๐Ÿงฐ Feature Breakdown

๐ŸŽฏ Bow & String Lab

  • 4 bow types with distinct force-draw profiles and efficiency curves
  • 7 real string materials โ€” stretch, creep, mass-per-strand all from manufacturer data
  • Strand count & tension affect fundamental frequency, harmonic spectrum, everything
  • Brace height modeling โ€” see how it shifts stored energy and arrow speed

๐Ÿน Arrow Builder

  • 15 real-world shafts โ€” Easton, Gold Tip, Carbon Express, Victory, Black Eagle
  • Dial in point weight, nock weight, fletching, wraps โ€” down to the grain
  • Instant FOC calculation, static & dynamic spine, spine match recommendations
  • Wind-adjusted ballistic tables with KE and momentum at every distance

๐Ÿ”ง Tuning Tools

  • Paper tune diagnostic โ€” reads your tear pattern and tells you what's wrong
  • Bare shaft comparison โ€” see point-of-impact shift vs fletched
  • Walk-back tune โ€” detects rest alignment issues at distance
  • Setup optimizer โ€” recommends nock height, rest position, arrow spine

๐Ÿ“ก Sound & Vibration

  • Vibration decay waterfall โ€” time-frequency visualization of post-shot ring
  • Calibrated dB estimate โ€” peak and sustained noise with real-world comparisons
  • Play Twang โ€” Web Audio synthesis of your exact string's harmonic profile
  • Whisper Quiet badge โ€” earn it by getting noise below threshold

๐Ÿ—„๏ธ Database & Profiles

  • 15-bow database โ€” specs from Mathews, Hoyt, Bowtech, PSE, Elite, Bear, Win&Win, Gillo, Howard Hill, TenPoint, Ravin + more
  • 6 arrow presets โ€” Hunting Heavy, Hunting Standard, Hunting Light, Outdoor Target, Indoor Target, 3D
  • Save/load profiles โ€” snapshot your entire setup to localStorage
  • Share links โ€” base64-encoded URL shares your full config in one click

๐Ÿง™ Setup Wizard & Tour

  • Guided wizard โ€” takes your purpose, experience, arm span โ†’ recommends draw weight, length, spine, shaft
  • 11-step guided tour โ€” walks new users through every feature
  • Version-aware: re-triggers on updates so you discover new stuff

โ™ฟ Accessibility & PWA

  • Full ARIA roles โ€” landmark regions, tablist navigation, live regions, skip-nav link
  • High Contrast theme โ€” pure black + white + bright green for maximum readability
  • PWA installable โ€” add to home screen, works offline via service worker
  • State persistence โ€” every slider position auto-saved to localStorage

๐Ÿ› ๏ธ Tech Stack

Layer Tech
โš›๏ธ UI React 19 + TypeScript (strict)
โšก Build Vite โ€” sub-second HMR, tree-shaken production builds
๐Ÿง  State Zustand โ€” single store, debounced localStorage persistence
๐ŸŽจ Styling Tailwind CSS v4 + CSS custom properties for runtime theming
๐Ÿ“ Charts Pure inline SVG โ€” scales perfectly, razor sharp at any zoom
๐Ÿงฎ Physics Web Worker with auto-fallback to main thread
๐Ÿ“ฆ Code Split React.lazy() + Suspense โ€” 9 lazy-loaded components, ~25% smaller initial bundle
๐Ÿงช Unit Tests Vitest โ€” 145 tests across 6 test files
๐ŸŽญ E2E Tests Playwright โ€” 31 tests: smoke, a11y (axe-core), themes
๐Ÿ“ธ Visual Regression Playwright screenshots โ€” 5 baselines across 3 themes
๐Ÿ”„ CI/CD GitHub Actions โ€” unit โ†’ E2E on every push/PR
๐Ÿ“ฑ PWA manifest.json + service worker (network-first caching)
๐ŸŽ“ Tour react-joyride โ€” theme-matched, version-aware

๐Ÿš€ Quick Start

git clone https://github.com/stringforge/stringforge.git
cd stringforge
npm install
npm run dev

Open http://localhost:5173 and start tuning.

Other Commands

npm run build       # Production build
npm run preview     # Preview production build
npm test            # Run all 145 unit tests
npm run test:e2e    # Run 31 Playwright E2E + accessibility tests
npm run test:a11y   # Run accessibility tests only (axe-core)
npm run test:visual # Run visual regression tests
npm run test:all    # Run everything (unit + E2E + a11y)
npm run test:e2e:ui # Interactive Playwright UI mode
npm run lint        # ESLint check

๐Ÿ“ Project Structure

e2e/
โ”œโ”€โ”€ helpers.ts              # Tour dismissal, theme setting, physics wait
โ”œโ”€โ”€ app-loads.spec.ts       # Core layout and rendering tests
โ”œโ”€โ”€ bow-configuration.spec.ts # Bow type switching and physics updates
โ”œโ”€โ”€ tab-navigation.spec.ts  # Tab ARIA attributes and panel loading
โ”œโ”€โ”€ wizard-flow.spec.ts     # Setup wizard, glossary, docs modals
โ”œโ”€โ”€ theme-switching.spec.ts # All 7 themes load and apply correctly
โ”œโ”€โ”€ accessibility.spec.ts   # axe-core WCAG 2.0 AA scans
โ””โ”€โ”€ visual.spec.ts          # Screenshot baselines for regression

.github/workflows/
โ””โ”€โ”€ test.yml                # CI pipeline: unit โ†’ E2E + a11y on push/PR

src/
โ”œโ”€โ”€ lib/
โ”‚   โ”œโ”€โ”€ physics.ts          # Core physics engine โ€” bow profiles, force-draw, velocity
โ”‚   โ”œโ”€โ”€ physics.worker.ts   # Web Worker entry point
โ”‚   โ”œโ”€โ”€ usePhysicsWorker.ts # React hook โ€” worker with auto-fallback
โ”‚   โ”œโ”€โ”€ arrow.ts            # Arrow builder โ€” shafts, FOC, spine, ballistics
โ”‚   โ”œโ”€โ”€ audio.ts            # Sound synthesis, vibration waterfall, draw cycle
โ”‚   โ”œโ”€โ”€ bows.ts             # Bow database, profiles, presets, share links
โ”‚   โ”œโ”€โ”€ glossary.ts         # 28 archery terms + wizard recommendation engine
โ”‚   โ”œโ”€โ”€ themes.ts           # 7 themes with full color token system
โ”‚   โ”œโ”€โ”€ persist.ts          # localStorage state persistence
โ”‚   โ””โ”€โ”€ version.ts          # Single source of truth for version
โ”œโ”€โ”€ components/
โ”‚   โ”œโ”€โ”€ StringVisualizer/   # Animated SVG string with harmonic modes
โ”‚   โ”œโ”€โ”€ ControlPanel/       # Sliders, bow type picker, material selector
โ”‚   โ”œโ”€โ”€ StatsBar/           # Real-time speed, energy, mass, frequency readout
โ”‚   โ”œโ”€โ”€ DrawCycle/          # Animated draw sequence visualization
โ”‚   โ”œโ”€โ”€ SoundAnalysis/      # Waterfall, dB meter, Play Twang
โ”‚   โ”œโ”€โ”€ BowDatabase/        # Searchable bow specs + arrow presets
โ”‚   โ”œโ”€โ”€ Profiles/           # Save/load/delete user profiles
โ”‚   โ”œโ”€โ”€ ShareExport/        # Share links + text report export
โ”‚   โ”œโ”€โ”€ Glossary/           # Modal glossary with search
โ”‚   โ”œโ”€โ”€ Wizard/             # Multi-step setup wizard
โ”‚   โ”œโ”€โ”€ Tour/               # Guided tour (react-joyride)
โ”‚   โ”œโ”€โ”€ Tuning/             # Paper tune, bare shaft, walk-back, optimizer
โ”‚   โ””โ”€โ”€ Layout/             # Header, hamburger menu
โ”œโ”€โ”€ store.ts                # Zustand store โ€” params, weights, arrow, tuning
โ””โ”€โ”€ App.tsx                 # Root โ€” lazy loading, tabs, layout, ARIA

๐Ÿค Contributing

  1. Fork the repo
  2. Create a feature branch (git checkout -b feature/my-thing)
  3. Write tests for new physics or UI features
  4. Make sure all tests pass (npm run test:all)
  5. Open a PR with a clear description

๐Ÿ“„ License

MIT โ€” do what you want, just don't claim you invented bowstring physics.


Built with ๐Ÿน by StringForge.io
Because if you can't measure it, you can't tune it.

About

๐Ÿน StringForge: Real-time archery bowstring & arrow physics simulator Tune bow setups in-browser: string harmonics with weight damping, force-draw curves (compound/recurve/longbow/crossbow), dynamic spine/FOC, ballistics, energy losses. SVG animations for archers & bow techs. MIT โ€ข React + TypeScript โ€ข Try live: https://stringforge.io

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors