Skip to content

What is MongoCamp? ​

MongoCamp is a REST API for MongoDB. It adds what a browser application needs on top of a plain database: users, roles and grants per collection, filters as text (Lucene), paging headers, file storage, import and export, and a stable OpenAPI contract.

This repository has three parts:

PackageWhat it is
@sfxcode/nuxt-mongocamp-serverThe Nuxt module: a generated OpenAPI client, composables for session auth and server-side API key auth, and optionally the embedded server.
@sfxcode/mongocamp-server-coreThe server core: the whole API as one web-standard fetch(Request): Promise<Response> handler. It is not tied to a framework.
apps/server (mongocamp-nitro-server)The standalone server: the core on Nitro 3, configured by environment variables, shipped as a Docker image.

Two ways to use the module ​

text
Embedded:   Browser ──▶ Nuxt app (Nitro) ──▶ /api/mongocamp-server/** ──▶ server core ──▶ MongoDB
External:   Browser ──▶ Nuxt app ─────────────────────────────▶ MongoCamp server ──▶ MongoDB
  • Embedded server (server.enabled: true): the API runs in the Nitro of your application under a prefix (/api/mongocamp-server by default). There is no second application to deploy. During server-side rendering, calls to it are answered in-process.
  • External server: the module is a client for a MongoCamp server at url. That can be the standalone image, or another Nuxt app that embeds the server.

Both modes use the same composables and the same generated client, so you can switch between them by changing configuration only.

Upgrading ​

Running an older MongoCamp server or a 1.x version of this module? The migration guides list every change and the steps for it.

Companion projects ​

Requirements ​

  • Node.js 24 (current LTS)
  • Nuxt 4.7 or later, building with Nitro 3 (the application declares nitro as a dependency)
  • MongoDB 6.0 or later (CI runs against MongoDB 7)

Released under the MIT License.