~repos/edge-city


edge-city is a next level meta-framework for react that runs only on edge runtimes

7d46866a — pyrossh

HEAD -> main, origin/main, origin/HEAD

2 years ago
update app
c7f7584c — pyrossh

2 years ago
refactor dir
e785cf44 — pyrossh

2 years ago
Fix more warnings

edge-city

edge-city is a next level meta-framework for react that runs only on edge runtimes.
It uses file system routing with streaming SSR + CSR to render pages.
It is very opionated and has set of idiomatic ways of doing things.
It has an inbuilt rpc mechanism to access server resources instead of a typical REST API.
It aims to have almost the same router api as nextjs router for ease of use.

During development each request for a page is executed in a separate edge-runtime (miniflare/vercel) vm.
During production each page is packaged to an esm function adapted to the platform of your choice.

Why?

  • Its really hard to have a streaming SSR + CSR with automatic data rehydration setup in nextjs 13.
  • There is no meta-framework which runs your code in an edge simulated environment during development.

Requirements

  1. node >= v20
  2. wrangler for deploying to cloudflare page functions
  3. vercel for deploying to vercel edge runtime

DB access

Since it runs only on edge runtimes which run in a constrained browser environment, you have to use database drivers which can run in the browser, basically utilize Ajax/Fetch/Websocket. Here is a list of some of them,

Supported platforms

  1. Cloudflare page functions
  2. [TODO]Vercel edge functions
  3. [TODO]Netlify edge functions

Developing

  1. node >= v20.2.0
  2. pnpm >= v8.5.1

Todo[General]

  1. Build a docs website
  2. Add tests for bot
  3. Add tests for runtime
  4. Add E2E tests for example
  5. Maybe move to vite for HMR goodness

Todo[Cloudflare]

  1. Fix 404 pages not routing on server