Executive Summary: Commercial and residential solar planning has historically relied on heavy, server-side CAD utilities, expensive proprietary databases, and desktop-locked engineering tools. Ananta Labs was commissioned to build Solara—an ultra-premium, daylight-themed intelligent solar planning platform. The design goal was to deliver a strictly zero-server utility capable of doing real-time electrical load analysis, 2D interactive spatial panel packing, multi-season generation variance simulation, and compiling vector engineering blueprints as high-fidelity PDF documents—all natively on the client device inside a standard browser footprint.
The Architectural Paradigm: Pure Client-Side Computation
To eliminate cloud hosting overhead, ensure infinite scaling, and maintain absolute data privacy for users mapping their personal property metrics, we rejected traditional cloud-based computational models. Instead, we shifted 100% of the mathematical algorithms and vector layout processes directly into the client-side state machine using React and TypeScript.
By using optimized calculations and pre-compiled engineering indices, the platform updates complex multi-variable physics planning instantly as the user drags sliders. This reactive setup avoids network hops, keeping UI interaction times under 5ms.
Solara Engineering Architecture & Impact
- Calculation Response Time: Less than 5ms loop execution on client devices.
- Production Compile Time: Under 860ms with zero errors or bundle warnings.
- Build Performance: 100% strict TypeScript types and modular ESNext chunks.
- PDF Generation Latency: Zero-server, 100% vector layout completed in ~1.2s on-device.
- Aesthetic Paradigm: Premium light-mode daylight dashboard with strict high-contrast stone typography.
The Mathematical Sizing & Packing Core
Solara's calculation engine applies precise solar physics, calibrated for regional metrics. The sizing logic operates on a first-principles formula:
1. Base Capacity Requirement
Given the daily consumption in kWh ($DailyDemand$), the solar capacity requirement in kW ($Capacity$) is derived using the standard peak sun hours index and system efficiency metrics:
Capacity (kW) = Daily Demand (kWh) / (Peak Sun Hours * Performance Ratio)
By mapping a regional standard of 5.5 Peak Sun Hours per day and factoring in a realistic 80% Overall System Performance Ratio (which covers inverter conversion losses, wiring impedance, temperature derating coefficients, and dust accumulation), the engine establishes a reliable 4.4x yield multiplier coefficient.
2. Dynamic 2D Aspect Ratio Packing
In Roof Planning Mode, the application translates flat roof dimensions into physical panel grids. To ensure physical walk paths and mandatory roof edge boundary buffers, we deduct a safety margin of 15% usable area. The engine dynamically calculates columns and rows using an aspect ratio heuristic:
Columns = Math.ceil(Math.sqrt(TotalPossibleSlots * 1.5))
This physical footprint mapping prevents standard visual clipping bugs, providing homeowners and commercial operators with an accurate visual feedback loop of empty spaces and actual rooftop utilization metrics.
Advanced Client-Side Vector PDF Engine
A primary request was the ability to instantly export engineering reports. Traditionally, web-to-PDF utilities rely on headless servers running Puppeteer. This approach is slow, expensive, and insecure. We engineered a complete on-device vector generation script using **jsPDF**.
1. The Spacing Budgeting Matrix
To prevent vertical layout text overlap (a common problem on dynamic multi-page reports), we engineered a strict progressive spacing budget tracker. Each section dynamically registers its height demands, feeding a running vertical coordinate tracker ($y$). When section thresholds are crossed, page breaks are initialized programmatically.
2. Strict Tailwind v4 Theme Color Control
For pristine visual aesthetics on modern high-resolution screens and physical print media, we implemented **Tailwind CSS v4**'s advanced theme compiler. By explicitly defining custom high-contrast variables (such as --color-stone-750 and --color-stone-850) inside the root CSS theme definitions, we guaranteed absolute contrast and razor-sharp typographic output for both UI elements and vector graphic exports.
Conclusion
By designing Solara from first-principles engineering concepts, Ananta Labs built a premium, zero-cost, private solar planner. Our pure client-side architecture shows that complex physics simulations and report publishing can run smoothly and securely directly inside web viewports.