A modern, mobile-first web application for HVAC, BAS, and electrical technicians featuring smart calculators for field work.
🌐 Live Website
https://adam-lovell.github.io/building-automation-toolkit/
Achieve Academy MVP: https://adam-lovell.github.io/building-automation-toolkit/achieve-academy/
Features
Free Calculators
- ⚡ Amps from Power - Calculate current from power and voltage
- 🌡️ HVAC Heat Load - Calculate BTU/hr from airflow and temperature delta
- 🔌 Voltage Drop - Estimate voltage drop in electrical circuits
Premium Calculators 🔒
- 💧 Pump Head/Pressure - Convert between PSI and feet of head (1 PSI = 2.31 ft)
- 🌀 Fan Law - Airflow (CFM) - Calculate CFM₂ = CFM₁ × (RPM₂/RPM₁)
- 📊 Fan Law - Static Pressure - Calculate SP₂ = SP₁ × (RPM₂/RPM₁)²
- ⚙️ Fan Law - Horsepower - Calculate HP₂ = HP₁ × (RPM₂/RPM₁)³
💳 Payment Integration
This project uses Stripe for secure subscription payments.
Stripe Configuration
- Payment Link: https://buy.stripe.com/14A8wPaWYah25B6f16ds400
- Pricing: $19.99 one-time payment for lifetime access (early bird pricing)
- Success URL: Configure in Stripe Dashboard to redirect to
success.html
- Payment Methods: Credit/Debit cards, Apple Pay, Google Pay
Setup Instructions
- Configure Stripe Success URL:
- Go to Stripe Dashboard
- Navigate to your Payment Link settings
- Set success URL to:
https://adam-lovell.github.io/building-automation-toolkit/success.html?session_id={CHECKOUT_SESSION_ID}
- Test Payments:
- Use Stripe test mode for development
- Test card:
4242 4242 4242 4242
- Any future expiry date and CVC
- User Flow:
- User signs up (free account)
- User clicks “Unlock Premium” or tries premium calculator
- Redirected to Stripe checkout
- After payment, returns to
success.html
- Premium status activated in localStorage
Mobile Payment Support
Stripe automatically provides:
- ✅ Apple Pay support on iOS devices
- ✅ Google Pay support on Android devices
- ✅ Mobile-optimized checkout
- ✅ All major credit/debit cards
Managing Subscriptions
- View all payments in Stripe Dashboard mobile app
- Issue refunds directly from Stripe
- View customer details and payment history
- Receive notifications for successful payments
Tech Stack
- Frontend: HTML5, CSS3, Vanilla JavaScript
- Hosting: GitHub Pages (static hosting)
- Authentication: localStorage (demo mode for early access)
- Payments: Stripe Checkout (hosted payment page)
- Backend: Node.js Express (optional - not needed for current deployment)
Installation & Setup
1. Install Node.js Dependencies
2. Start the Backend Server
The API server will run on http://localhost:3000
3. Start the Frontend
In a separate terminal:
python3 -m http.server 8000
The website will be available at http://localhost:8000
API Endpoints
POST /api/signup - Create new user account
POST /api/login - Authenticate user and receive JWT token
GET /api/verify - Verify JWT token validity
POST /api/upgrade - Upgrade user to premium (mock payment)
GET /api/profile - Get user profile information
Development
File Structure
building-automation-toolkit/
├── bas-toolkit.html # Main calculator page
├── login.html # Login page
├── signup.html # Signup page
├── style.css # All styles
├── script.js # Calculator logic
├── auth.js # Authentication frontend
├── server.js # Backend API server
├── database.json # User database
├── package.json # Node.js dependencies
└── README.md # This file
Color Palette
- Background:
#050816
- Card background:
#0F172A
- Primary accent (green):
#22C55E
- Secondary accent (blue):
#38BDF8
- Warning/Premium (yellow):
#FACC15
- Text main:
#E5E7EB
- Text muted:
#9CA3AF
- Border:
#1F2933
Free Calculators
- Amps from Power
- Formula:
I = P / V
- Where: I = current (A), P = power (W or VA), V = voltage (V)
- HVAC Heat Load
- Formula:
BTU/hr = CFM × 1.08 × ΔT
- Where: CFM = airflow, ΔT = temperature difference (°F)
- Voltage Drop
- Formula:
V_drop = 2 × L × I × (R / 1000)
- Where: L = one-way length (ft), I = current (A), R = resistance (Ω/1000ft)
Premium Calculators
- Pump Head/Pressure
- Formula:
Head (ft) = Pressure (PSI) × 2.31
- Fan Law - CFM
- Formula:
CFM₂ = CFM₁ × (RPM₂ / RPM₁)
- Fan Law - Static Pressure
- Formula:
SP₂ = SP₁ × (RPM₂ / RPM₁)²
- Fan Law - Horsepower
- Formula:
HP₂ = HP₁ × (RPM₂ / RPM₁)³
Notes
- Beta version - formulas may not cover all edge cases
- Premium features require account signup and upgrade
- All calculations are performed client-side for speed
- User data is stored in
database.json (not suitable for production)
Future Enhancements
- Real payment processing integration
- Calculation history saving
- Additional calculators (duct sizing, refrigeration, etc.)
- Mobile app version
- Offline support with PWA
- Unit conversion tools
License
MIT License - Free for educational and commercial use