Iweavetales / LunarX

A simplified SSR Framework for X

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

React SSR Framework with NodeJS and Deno

The simplified & light SSR front framework, offering greater flexibility than Next.js and Remix.Run, empower to build powerful front-end applications.

Features

  • File based routing
  • Nested routing
  • Memorize scroll position
  • Server-side fetching
  • Supports NodeJS runtime
  • Page reload on edit
  • Asynchronous Page module load

Getting Started

# pnpx create-lunarx-app example ( Unavailable yet )

$ pnpm add lunarx
# or
$ npm add lunarx


$ lunarx dev 
$ lunarx start 
$ lunarx build

Project structure

You could refer /examples/basic or /tests/samples/basic for now.

Architecture

Response-Render Pipeline

Application Build

Bundler

Lunar uses esbuild to quickly create a split-bundle source structure.

Transpiler

Lunar uses SWC for transpile to ensure compatibility with both client-side and Node.js runtimes.

Server Side Script

Files ending in .server.tsx will only be executed on the server side and won't be exposed to the public.

Roadmap

  1. Support error & 404 page
  2. Optimize and persist routing states from upper nested routing rendering & fetch
  3. Server Action like submit as Post
  4. Support deno-runtime

Author

Iweavetales@github

About

A simplified SSR Framework for X

License:MIT License


Languages

Language:TypeScript 89.7%Language:Go 6.3%Language:JavaScript 2.8%Language:Rust 1.1%Language:CSS 0.0%