Stateless Design for GitHub Pages Deployment

The DCA Simulator is built as a completely static site that runs entirely in the browser. This design choice enables deployment on free platforms like GitHub Pages while preserving user privacy and enabling powerful sharing capabilities.

URL-Based State Management

All simulation parameters are encoded directly into the results page URL as query strings. When the home form is submitted, the application constructs a link containing amount, frequency, periods, initial price, and growth rate. Navigation occurs via client-side routing, and the results page reads these values to perform calculations on load.

Key Advantages

  • No cookies, local storage, or server state required
  • Results can be bookmarked for later reference
  • Links can be shared—recipients see identical simulation instantly
  • Full compatibility with static hosting platforms

Static Build Process

The site uses adapter-static to generate pure HTML, CSS, and JavaScript files during build. Static pages like home and blog are prerendered for instant loading. The dynamic results page disables prerendering to allow runtime access to URL parameters, while remaining fully client-side.

Privacy and Reliability Benefits

Since no data ever leaves the browser, users maintain complete control and privacy. There are no tracking scripts, analytics, or external requests beyond the initial page load. The entire application works offline after the first visit, with all assets cached locally.

Deployment Simplicity

Building produces a docs folder containing the complete site. This folder is deployed directly to GitHub Pages with zero configuration beyond enabling the feature in repository settings. Updates require only pushing changes and rebuilding—no server management needed.

FAQ

Why not use local storage?

URL parameters enable sharing and bookmarking without requiring permissions or persistence.

Can I host this myself?

Yes—any static file host works, including Netlify, Vercel static, or simple web servers.

Are there any server requirements?

None—the entire experience is pure client-side JavaScript and static assets.

Enjoy fast, private, and shareable DCA simulations anywhere.