Skip to content

What is Mayari? ​

Luau isn't just for Roblox anymore. Thanks to standalone runtimes like Zune, Lune, and Lute, we can finally use the language we love to build real-world CLI tools and backend web servers.

But let’s be real: building a web server from scratch in Luau gets tedious fast. Having to manually parse requests, wire up custom routing logic, and figure out how to keep your project from becoming a massive 1,000-line file isn't fun.

That’s where Mayari comes in. Inspired by modern web frameworks like Next.js, Mayari brings filesystem-based routing and a modular structure to Luau so you can focus on building APIs rather than boilerplate.

How It Works ​

With Mayari, your file structure is your API. You don't need to write code to map URLs to handler functions, just drop your route.luau files into src/app and let Mayari do the heavy lifting:

  • src/app/route.luau -> /
  • src/app/users/route.luau -> /users
  • src/app/users/[id]/route.luau -> /users/123
  • src/app/docs/[...ids]/route.luau -> /docs/a/b/c

Key Highlights ​

  • Filesystem Routing: Folders equal endpoints. No messy route registration code needed.
  • Runtime Starter Support: Jump in using Zune, Lune, or Lute. Mayari relies on shared standard libraries (task, net, process) to keep bootstrapping smooth across runtimes.
  • Attribute Middleware System: Keep business logic clean with built-in Guards for access control, Interceptors for response formatting, and Validators for request body checks.
  • Ember-Powered Tooling: Built to work effortlessly with Ember for quick package and dependency management.

NOTE ON RUNTIME AGNOSTICISM

While Mayari makes starting across runtimes easy, full cross-runtime compatibility isn't 100% seamless once you start using runtime-specific features (like Zune FFI). Once you commit to those, your app will stick to that specific runtime.

Quick Look ​

Creating a route handler in Mayari is as straightforward as exporting functions named after HTTP methods:

luau
local common = require("common")

local response = common.response

local Home = {}

-- Handles GET requests sent to this endpoint
function Home.Get()
    return response.json({ msg = "Hello, Mayari!" })
end

return Home

Why use Mayari? ​

Whether you're building a web backend for your Roblox game, spinning up a custom dashboard, or just experimenting with Luau outside of the engine, Mayari saves you from reinventing the wheel. You get a clean, standardized structure right out of the box.