@open-commune/web
v0.2.5
Published
The Open Commune application: the admin interface and the server, on a single origin.
Downloads
1,048
Readme
@open-commune/web
The Open Commune application, published as a Nuxt layer: the admin screens, the public API routes, and the tRPC handler that binds them to @open-commune/core.
It is shipped as sources, not as a bundle — a Nuxt layer is compiled by the application that extends it, and that is what lets you override any page, component or route by placing a file of the same name in your own project.
Use it as it is
The published Docker image runs this layer unmodified. See the repository for self-hosting.
Extend it
npm install @open-commune/web// nuxt.config.ts
export default defineNuxtConfig({
extends: ['@open-commune/web'],
});Your project then holds only what it adds. Anything you place at the same path wins over the layer:
pages/…— your own screens, alongside the ones the layer bringsserver/api/…— extra routes, served from the same originserver/tasks/…andnitro.scheduledTasks— scheduled workcomponents/…— override a component by name
Run it with Bun: the database layer uses bun:sqlite, so bun --bun nuxt dev, not nuxt dev.
Known upstream issue. Nitro runs a layer's
scheduledTaskstwice (nitrojs/nitro#4155). Declare your cron entries in the top application, not in a layer.
Configuration
Environment is validated at startup by @open-commune/core; see .env.example in the repository for the full list.
One variable matters when you deploy a build rather than run it in place. Nitro inlines the core into its chunks, but the Drizzle migrations are files: the build drops them next to the server output, and the deployment points at them.
COMMUN_MIGRATIONS_DIR=/path/to/.output/drizzleLeave it unset in development — the layer resolves the folder from the
installed @open-commune/core. Unset in a deployment where node_modules is
gone, migrations are silently skipped and the first query fails on a missing
table.
Licence
AGPL-3.0-or-later.
