{"id":29771856,"url":"https://github.com/mastrojs/mastro","last_synced_at":"2025-07-27T07:02:39.010Z","repository":{"id":220397394,"uuid":"739028147","full_name":"mastrojs/mastro","owner":"mastrojs","description":"Minimal web framework for MPAs: no magic, no bundler, no client-side JS by default and no bloat. Runs as a VSCode extension in your browser (SSG), or on Deno (server and SSG).","archived":false,"fork":false,"pushed_at":"2025-07-24T17:04:53.000Z","size":307,"stargazers_count":32,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-24T17:05:59.381Z","etag":null,"topics":["deno","mpa","ssg","typescript","vscode-extension"],"latest_commit_sha":null,"homepage":"https://mastrojs.github.io","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mastrojs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"mb21"}},"created_at":"2024-01-04T15:54:51.000Z","updated_at":"2025-07-24T17:04:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"3d8fa307-a166-4230-b347-9d40be2640f7","html_url":"https://github.com/mastrojs/mastro","commit_stats":null,"previous_names":["mb21/mastro","mastrojs/mastro"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mastrojs/mastro","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mastrojs%2Fmastro","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mastrojs%2Fmastro/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mastrojs%2Fmastro/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mastrojs%2Fmastro/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mastrojs","download_url":"https://codeload.github.com/mastrojs/mastro/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mastrojs%2Fmastro/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267320244,"owners_count":24068525,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-27T02:00:11.917Z","response_time":82,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deno","mpa","ssg","typescript","vscode-extension"],"created_at":"2025-07-27T07:01:07.096Z","updated_at":"2025-07-27T07:02:38.944Z","avatar_url":"https://github.com/mastrojs.png","language":"TypeScript","funding_links":["https://github.com/sponsors/mb21"],"categories":[],"sub_categories":[],"readme":"# Mastro\n\nA *m*inimal take on an *Astro*-like MPA web framework. There are four parts to it:\n\n- [Static site generator running in your browser](https://mastrojs.github.io/guide/setup/) in a _VS Code for the Web_ extension.\n- The Mastro web framework (server and static site generator) – see below.\n- [Reactive Mastro](https://mastrojs.github.io/reactive/) – a tiny (2.8k min.gz) client-side reactive GUI library for your existing MPA or Mastro project.\n- [The Mastro Guide](https://mastrojs.github.io/) that shows you how to build and publish your first webside – using only a browser and a GitHub account.\n\n\n## Craft websites with care\n\n- **No bloat**: written in just [~700 lines](src/#readme) of TypeScript and with [minimal dependencies](deno.json), Mastro is a framework distilled to its essence. It loads fast even [within VS Code for the Web](https://mastrojs.github.io/guide/setup/) or the edge, like Deno Deploy (Node.js, Bun and Cloudflare Workers are in the works). If you ever outgrow it, simply fork and adjust it.\n\n- **No magic and no bundler**: full control over your HTML, CSS and JS. Nothing is auto-injected into your page. Mastro gives you composable functions, instead of complex tooling that messes with your code before it reaches the browser.\n\n- **No leaky abstractions**: while some JS meta-frameworks try to erase the boundary between client and server, Mastro makes it explicit which parts of your app run where and when.\n\n- **No client-side JavaScript** by default: create lean websites, that load blazingly fast. Leveraging native browser functionality instead of reinventing the wheel in JavaScript and [embracing an MPA architecture](https://mastrojs.github.io/reactive/why-reactive-mastro/).\n\n\n## How to run\n\n### _Visual Studio Code for the Web_ extension (SSG)\n\nFollow [The Mastro Guide's _Setup_ section](https://mastrojs.github.io/guide/setup/) to build and deploy your website to GitHub Pages for free – without ever leaving your browser.\n\n### Server or SSG with Deno on the command line\n\nIf you prefer the command line, after [installing Deno](https://docs.deno.com/runtime/getting_started/installation/), either run:\n\n    deno run -A jsr:@mastrojs/mastro@0.1.2/init\n\nor use the [template on GitHub](https://github.com/mastrojs/template-basic-deno). `cd` into the folder, then:\n\nStart the development server:\n\n    deno task start\n\nGenerate the static site:\n\n    deno task generate\n\nTo deploy the static site, [configure GitHub Pages](https://github.com/mastrojs/mastrojs.github.io/tree/main/.github/workflows/deploy.yml).\n\n#### Deploy server to production\n\n[Join Deno Deploy\u003csup\u003eEA\u003c/sup\u003e](https://docs.deno.com/deploy/early-access/) (Early Access) and set up a [new app](https://app.deno.com/mastrojs/~/new) with the following build configuration:\n\n- Framework preset: No Preset\n- Install command: `deno install`\n- Build command: blank\n- Dynamic App -\u003e Entrypoint: `server.ts`\n\n## Contribute\n\nDo you have an idea how Mastro could be improved? Something not working as expected? Don't hesitate to open [an issue](https://github.com/mastrojs/mastro/issues).\n\n\n## Alternatives\n\nThere are [many ways to build websites](http://localhost:4321/guide/why-html-css/#you-want-to-build-a-website).\nBut if we limit ourselves to JavaScript server frameworks and static site generators (SSG),\nhere is a list of projects with a somewhat similar philosophy in alphabetical order.\n(Are we missing one that should be on the list? Make a PR.)\n\n|                                  | Output      | Router       | Templating               |   Bundler           |\n| -------------------------------- | ----------- | ------------ | ------------------------ | ------------------- |\n| [Adonis](https://adonisjs.com)   | SSG         | programmatic | EdgeJS/Pug/Nunjucks      | optionally Vite     |\n| [Astro](https://astro.build)     | SSG/Server  | file-based   | Astro (JSX-like)         | Vite                |\n| [Brisa](https://brisa.build)     | SSG/Server  | file-based   | JSX                      | Bun build           |\n| [Eleventy](https://www.11ty.dev) | SSG         | file-based   | Liquid/Nunjucks/WebC etc | optional            |\n| [Elysia](https://elysiajs.com)   | Server      | programmatic | JSX                      | Bun build\n| [Enhance](https://enhance.dev)   | Server      | file-based   | html tagged template     | optionally esbuild  |\n| [Fresh](https://fresh.deno.dev)  | Server      | file-based   | JSX                      | optionally esbuild  |\n| [h3](https://h3.dev/)            | Server      | programmatic | -                        | -                   |\n| [Haunty](https://haunty.org)     | SSG         | file-based   | mustache-like            | -                   |\n| [Hono](https://hono.dev)         | SSG/Server  | programmatic | html tagged template     | optionally esbuild  |\n| Mastro                           | SSG/Server  | file-based   | html tagged template     | -                   |\n| [Nue](https://nuejs.org)         | SSG         | file-based   | custom                   | -                   |\n\nWhat we believe differentiates Mastro, is that it's even simpler and even more minimal than the others.\n\n\n## TODOs\n\n- Support Node.js and test on Bun, Cloudflare\n- Asset handling (on server startup / static site generation?)\n  - support something like CSS Modules? Then again, read [this great article by Heydon Pickering](https://www.smashingmagazine.com/2016/11/css-inheritance-cascade-global-scope-new-old-worst-best-friends/) if you want to be convinced otherwise.\n  - image transformations/resizing\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmastrojs%2Fmastro","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmastrojs%2Fmastro","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmastrojs%2Fmastro/lists"}