๐ŸŒ

Gea

Compiler-first reactive framework that compiles JSX into surgical DOM updates

Results Summary

About the Gea Weather Front App

Status

  • Lint Lint status badge for Gea
  • Build Build status badge for Gea
  • Test Test status badge for Gea

Usage Instructions

First, follow the repo setup instructions.
Then cd into ./apps/geajs/ and and use the following commands:

  • Dev Command npm run dev
  • Test Command npm run test
  • Lint Command npm run lint
  • Build Command npm run build
  • Start npm start
For troubleshooting, use npm run verify from the root of the project.

App Requirements

The purpose of this project, was to build the same identical app in every frontend framework, in order to benchmark and compare their performance. As such, each app is built to meet identical requirements, which are then verified with the test suite.

Technical Requirements

  • Binding user input and validation
  • Fetching external data asynchronously
  • Basic state management of components
  • Handling fallback views (loading, errors)
  • Using browser features (location, storage, etc)
  • Logic blocks, for iterative content and conditionals
  • Lifecycle methods (mounting, updating, unmounting)

Feature Requirements

  • ๐ŸŒฆ๏ธ Live weather conditions
  • ๐Ÿ“… 7-day weather forecast
  • ๐Ÿ” City search functionality
  • ๐Ÿ“ Geolocation support
  • ๐Ÿ’พ Persistent location storage
  • ๐Ÿ“ฑ Responsive design
  • โ™ฟ Accessible interface
  • ๐ŸŽจ Multi-theme support
  • ๐Ÿงช Fully unit tested
  • ๐ŸŒ Internationalized
Weather app screenshot showing interface features

Gea Implementation

Compiler-Wired Reactivity

Gea doesn't use signals, hooks, dependency arrays, or a virtual DOM. Components are ordinary JavaScript โ€” classes with state and methods, getters for computed values โ€” and @geajs/vite-plugin analyses the JSX at build time, works out which DOM nodes depend on which state paths, and generates the reactive wiring. At runtime only the affected nodes are patched.

A Proxy-Based Store

weather-store.js is a singleton class extending Store. Its fields (searchQuery, isLoading, hasError, weatherData, activeForecastIndex) are made reactive through a deep Proxy, so mutations are plain assignments like this.isLoading = true.

Getters as Computed Values

Derived state such as showContent, locationLabel, currentTemperature and forecastDays are ordinary JavaScript getters on the store. The compiler tracks which state paths each getter reads and re-evaluates the dependent DOM bindings when those paths change.

Class and Function Components

Each UI piece, like SearchForm.jsx and CurrentWeather.jsx, extends Component and returns JSX from template(), using HTML-style attributes (class, for) and native-style event bindings (click={...}, submit={...}) wired through document-level event delegation. Stateless UI like LoadingState.jsx is a plain function which the compiler converts to a class component at build time.

Conditional Rendering and Keyed Lists

{condition && <X />} in WeatherDisplay.jsx compiles into <template> markers with swap logic, so hidden branches cost no DOM nodes. The 7-day forecast in Forecast.jsx maps weatherStore.forecastDays to <ForecastItem key={day.date} day={day} />, and list changes are reconciled per-item rather than re-rendered.

About Gea

Real-world App

Coming soon...

About Gea

Gea is a compiler-first reactive UI framework whose runtime and compiler are vertically integrated: JSX becomes HTML string templates, state tracking happens through deep proxies, and the generated observe() calls patch only the DOM nodes that depend on changed data โ€” no diffing or reconciliation overhead. It can also run without a build step from a CDN global (~4.1 kB gzipped), where the reactivity glue is written by hand instead of by the compiler.

Choosing a Framework

Stack Match Stack Match

Not sure if Gea is right for your project? Use Stack Match to select your preferences and get a tailored recommendation based on the benchmark data.

Stack Match Screenshot