Ecopages0.2.0-rc.1

A modern, basic web framework

Pick an Integration. Create Pages. Add a server if you need it.

Start with Ecopages JSX or another Integration. Author Pages that render HTML. Add a Cache Strategy, typed handlers, and Explicit Routes only when a Page needs more than static HTML.

npx ecopages init ecopages-app && cd ecopages-app && npm install && npm run dev
import path from 'node:path';
import { ConfigBuilder } from '@ecopages/core';
import { ecopagesJsxPlugin } from '@ecopages/ecopages-jsx';
import { postcssProcessorPlugin } from '@ecopages/postcss-processor';
import { tailwindV4Preset } from '@ecopages/postcss-processor/presets/tailwind-v4';

const baseUrl = import.meta.env?.ECOPAGES_BASE_URL ?? 'http://localhost:3000';

const config = await new ConfigBuilder()
  .setRootDir(import.meta.dir)
  .setBaseUrl(baseUrl)
  .setDefaultMetadata({
    title: 'Ecopages',
    description: 'Pick an Integration, then author Pages',
  })
  .setIntegrations([ecopagesJsxPlugin()])
  .setProcessors([
    postcssProcessorPlugin(
      tailwindV4Preset({
        referencePath: path.resolve(import.meta.dir, 'src/styles/app.css'),
      })
    ),
  ])
  .build();

export default config;

Get Started

Pick an Integration

Start with Ecopages JSX, or choose React, Lit, KitaJS, or MDX when a Page needs a different renderer.

Core

Create Pages

Define Pages with eco.page, compose them with a Layout, and declare Dependencies explicitly.

Server

Add a server if you need it

Keep Pages static until you need typed handlers or Explicit Routes.

Libraries

Add the rest on demand

Reach for Radiant, routers, and processors when a Page needs more than HTML.

Suggested path

Build confidence step by step

  1. Pick an Integration. Ecopages JSX is the default.
  2. Create Pages that render HTML.
  3. Compose them with a Layout and Html.
  4. Add Radiant or another Integration only where the UI is interactive.
  5. Add a server with typed handlers and Explicit Routes if you need request-time work.