Skip to content
/ mastro Public

Minimal web framework for MPAs: zero client-side JS by default and no bundler required.

Notifications You must be signed in to change notification settings

mb21/mastro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mastro

A minimal take on an Astro-like MPA web framework.

🚧 While the Mastro server framework is still a work in progress, the client-side part is already very usable: see Reactive Mastro.

Philosophy

  • No magic. Easy to understand codebase using simple JS functions wherever possible. Favour small, composable functions.

  • Zero client-side JavaScript by default.

  • No build step or bundler by default.

  • Minimal dependencies (see deno.json)

  • File-based routing: routes/ contains files with handler functions and that's the only way. No .md files with layout frontmatter property, no .astro-like-frontmatter-magic, no .html files, etc.

  • JSON and HTML route handlers are uniform. A handler takes a Request object (and no props, and hopefully no context).

  • Server components are simple JS functions that by convention take a props object.

  • For client-side components, see Reactive Mastro.

How to run

cd examples/blog/

Start dev server:

deno run start

Generate static site:

deno run generate

TODOs

  • Fully implement src/generate.ts (SSG) and src/server.ts (dev and maybe also prod server)

  • publish as package or packages

  • Asset handling (on server startup / static site generation?)

  • docs

About

Minimal web framework for MPAs: zero client-side JS by default and no bundler required.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published