I · Prologue
Packages
On this page
Introduction
Marmeon is a set of packages that are released together. A new app depends on most of them already, and you add the others when you need what they bring. Each installed package registers itself through discovery, so adding one is a single command, in the version your app already has:
pnpm marmeon add redisWithout marmeon add (yarn, bun, a workspace), install it yourself: pnpm add -E @marmeon/redis@<version of your app>.
Every package has the same version as every other: upgrade them together. Each pins the others exactly, so one in another version
(pnpm add @marmeon/redis takes latest, which an app on a release candidate is not) brings a second copy of @marmeon/core, and the package
manager's only sign is a warning about peers. -E saves the version exactly. A new app saves exactly by itself (saveExact: true in pnpm-workspace.yaml, save-exact=true in .npmrc for npm); an app that is older can set it too. marmeon check
finds a package in another version, and marmeon dev warns about it at the start. The release policy explains why.
What a new app has
pnpm create marmeon installs these packages:
| Package | What it brings | Read more |
|---|---|---|
@marmeon/core | The application, modules, service providers, the container, configuration, events and the clock. | Modules, container, providers, configuration, events |
marmeon | The command: dev, build, start, the generators and tinker. | Console, deployment |
@marmeon/router | Routes, invokable controllers, requests with schemas, route model binding and middleware. | Routing, controllers, requests, middleware |
@marmeon/http | Controllers, pages and their props, redirects, signed URLs, cookies, and the browser's side of every visit. | Responses, pages, URL generation |
@marmeon/server | The HTTP server, server rendering, health checks and the graceful stop. | Request lifecycle, health checks |
@marmeon/session | Sessions with their drivers, flash data and CSRF protection. | Session, CSRF protection |
@marmeon/encryption | Encryption with APP_KEY and key rotation, behind every cookie and session. | Encryption |
@marmeon/validation | The validation rules, with messages in the request's language. | Validation |
@marmeon/i18n | Translations, the request's language and formatting. | Localization |
@marmeon/database | Connections, migrations, table types, repositories, factories, transactions and pagination. | Database, repositories, migrations |
@marmeon/cache | The cache, atomic locks and rate limits. | Cache, rate limiting |
@marmeon/auth | Sign-in, password hashing and reset, the confirmation of an address, API tokens, policies and make:auth. | Authentication, authorization, starter kit |
@marmeon/mail | Mails as classes, queued sending and previews. | |
@marmeon/queue | Jobs, workers, retries and failed jobs. | Queues |
@marmeon/scheduler | Scheduled tasks. | Task scheduling |
@marmeon/storage | Disks on the local file system or S3, signed URLs and uploads. | File storage |
@marmeon/live | Live updates: pages reload their data when the server hints a change. | Real-time updates |
@marmeon/notifications | Notifications over mail, the database and live updates. | Notifications |
@marmeon/fetch | Outgoing HTTP requests that refuse addresses that are not public, with a fake for tests. | HTTP client |
@marmeon/log | The logger: readable in development, JSON in production. | Logging |
@marmeon/react | The React side: pages, layouts, <Link>, forms, islands and dialogs. | Pages, navigation, forms |
As dev dependencies, a new app has three more:
| Package | What it brings | Read more |
|---|---|---|
@marmeon/vite | The Vite plugin: the entries, the injection lists and the check that keeps server code out of the browser. | Asset bundling |
@marmeon/testing | createTestApp(), requests and assertions, the database refresh and the fakes. | Testing, fakes |
@marmeon/devtools | What the app did while you develop: requests, queries, jobs and mails. Development only. | Devtools |
Packages you add
| Package | What it brings | Read more |
|---|---|---|
@marmeon/redis | Redis connections for the cache, sessions, the queue and live updates. | Redis |
@marmeon/table | Data tables driven by the server: columns, sorting, filters, actions and CSV export. | Data tables |
@marmeon/chat-notifications | Chat messages to Slack, Discord and Teams through incoming webhooks, now or queued, with a fake for tests. | Chat notifications |
@marmeon/oauth | Social login: OAuth 2.0 and OpenID Connect providers you register by name, linked accounts and make:oauth. | Social login |
@marmeon/otel | OpenTelemetry traces of requests, queries, jobs and mails. | Observability |
Add one with marmeon add, which installs it at the version of your app:
pnpm marmeon add redisThe command takes the short name (redis) or the full one (@marmeon/redis), and no version. It does four things:
- It installs the package with your package manager (pnpm or npm, by your lockfile) at exactly the version of your app, as a
development dependency for
devtools,testingandvite. - It runs
marmeon discover, so the app finds the package's provider. - It copies the migrations of a package that ships some (
auth,cache,live,notifications,oauth,queue,session,storage) withmarmeon publish. That boots the app, so it needs a.envthe app boots with. - It prints the next step:
marmeon migrateafter a publish, and themarmeon docspage of each package.
marmeon add redis --dry-run prints the commands and changes nothing. If the install fails or you press Ctrl-C, package.json and
the lockfile are put back as they were; run pnpm install to bring node_modules back. A pnpm that stops because a dependency's
build script is not approved (ERR_PNPM_IGNORED_BUILDS) needs pnpm approve-builds first.
Once the install has finished, its files stay as it left them, even when a later step fails: when the package manager installed another
version than your app's (a release the package manager holds back for its first day, for example), or when discover or publish
fails. The command then says what to run.
marmeon add refuses when it cannot be sure of the result: your framework packages are not all in one version, one comes from a
workspace, a path or a patch rather than the registry, the package is listed only under peerDependencies, the app is part
of a workspace, it has no lockfile or one of another package manager, package.json cannot be read, or anything else the command
names. It then says what to change. With yarn or bun, or in a workspace, install the package yourself at the version of your
app (pnpm add -E @marmeon/redis@<version of your app>) and run marmeon discover, and marmeon publish <package> for a package
with migrations.
A package that needs a library of its own names the exact install command when the library is missing. The deployment page lists them.
The creator
create-marmeon is the package behind pnpm create marmeon. It writes a new app and is not a dependency of it. The
installation page covers its questions and options.