npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

mosquitodb-wrapper

v6.9.4

Published

A Vue 3 component library that packages the MosquitoDB API (a vector-borne disease research platform) into an installable Vue plugin — UI shell, routing, state management, and service classes — for apps that need to manage projects, experiments, sites, fo

Readme

@mosquitodb/mosquitodb-wrapper

A Vue 3 component library that packages the MosquitoDB API (a vector-borne disease research platform) into an installable Vue plugin — UI shell, routing, state management, and service classes — for apps that need to manage projects, experiments, sites, forms, and data queries against MosquitoDB.

Installation

npm install @mosquitodb/mosquitodb-wrapper

Peer dependencies

The consuming app must provide these — they are externalized, not bundled:

npm install vue vue-router pinia axios quasar @quasar/extras

Quasar must be installed and registered in the host app, including the Dialog plugin:

import { Quasar, Dialog } from 'quasar'
app.use(Quasar, { plugins: { Dialog } })

Don't forget the stylesheet:

import '@mosquitodb/mosquitodb-wrapper/dist/style.css'

Quick Start

import { createApp } from 'vue'
import { MosquitoDB } from '@mosquitodb/mosquitodb-wrapper'
import '@mosquitodb/mosquitodb-wrapper/dist/style.css'

const app = createApp(App)

app.use(MosquitoDB, {
  title: 'My App',
  requireProject: true,
  requireExp: true,
  ignoreWrapper: false,
  routes: [
    // your app's own routes, mounted as children of the active project/experiment
  ],
})

app.mount('#app')

MosquitoDB.install() creates and registers its own Vue Router (hash history) and Pinia instance on the app. Do not create your own router or Pinia instance — the host app receives them through the plugin and consumes them via useMRouter() / useMRoute() and the exported store composables.

Plugin Options

| Option | Type | Default | Description | |---|---|---|---| | title | string | — | App title shown in the shell header | | requireProject | boolean | false | Force a project-selection screen before any route resolves | | requireExp | boolean | false | Force an experiment-selection screen (only applies if requireProject is true) | | ignoreWrapper | boolean | false | Bypass the MosquitoDb shell entirely; mount routes directly at root | | routes | RouteRecordRaw[] | [] | Consumer's own routes, injected as children of the lastRoute named route |

Routing modes

| requireProject | requireExp | ignoreWrapper | Behaviour | |---|---|---|---| | true | true | false | Root → MosquitoDb shell → SelectProjectAndExperiment/projects/:projectId/experiments/:expId → consumer routes | | true | false | false | Root → MosquitoDb shell → SelectProject/projects/:projectId → consumer routes | | false | — | false | Root → MosquitoDb shell → consumer routes directly | | — | — | true | Consumer routes mounted at root, no shell |

In every shell-backed mode, consumer routes are mounted as children of a route named lastRoute.

What's Exported

Plugin

  • MosquitoDB — the Vue plugin (see Quick Start)
  • useMRouter(), useMRoute() — wrappers around useRouter/useRoute for use inside consumer components

Stores (Pinia)

  • useAuthStore — current user, role checks (isAdmin, isSuperAdmin, isUser), password change
  • useProjectStore — project list/CRUD (call findAll() to populate)
  • useExperimentStore — experiment list/CRUD scoped to the active project
  • useApplicationStore — navigation menu items
  • usePreferenceStore — user preferences

Services

Each service wraps an axios instance and exposes findAll(filter, pagination), findOne(id), create(data), update(id, data), delete(id) (subset depending on resource):

ProjectService, ExperimentService, AuthService, SiteService, ApplicationService, SettingService, FormService, FormGroupService, FormTemplateService (alias of FormGroupTemplateService), DataQueryService, QueryExecutorService, DataFilterService, VisualizationService, BasemapService, GeoJSONService

Components

  • MDataFilter, MDataFilterDialog, MDataFilterPicker — data filter builder/picker
  • MDateRangePicker — date range input
  • MFormSelect, MFormFieldSelect — form/form-field pickers

Composables

  • useI18n() — i18n helper (English/Swahili)

Configuring the HTTP Client

Axios is configured once at app init via src/config.js's http.url (base URL) and http.timeout. All services read from the same shared axios instance, which attaches the Authorization: Bearer <token> header and shows a session-expired dialog (or falls back to window.confirm if the Quasar Dialog plugin isn't registered) on 401 responses.

State Management

The plugin owns its own Pinia instance — do not register a second one in the host app. The four stores above (useAuthStore, useProjectStore, useExperimentStore, useApplicationStore) and usePreferenceStore call into the services layer and use useQuasar().notify() for success/error toasts.

UI Framework

Built on Quasar 2.x with Material Icons. Primary brand color is #009551 (green). RTL is toggled via the QUASAR_RTL environment variable.

Development

npm run dev       # Vite dev server (entry: main.js, not src/index.js)
npm run build     # Library build → dist/ (ES + CJS bundles + style.css)
npm run preview   # Preview the production build

npm run build produces:

  • dist/mosquitodb-wrapper.es.js
  • dist/mosquitodb-wrapper.cjs.js
  • dist/style.css

Vue, Vue Router, Pinia, Quasar, and Axios are externalized in the library build — they are not bundled into dist/.

The @ import alias resolves to src/.

Project Structure

src/
  components/   Vue components (dialogs, pickers, the MosquitoDb shell)
  views/        Route-level views (project/experiment selection, etc.)
  stores/       Pinia stores
  services/     Axios-backed API service classes
  composables/  Reusable composition functions (i18n, etc.)
  i18n/         Translation strings (English/Swahili)
  router/       Router helpers
  utils/        Shared utilities
  index.js      Public plugin API — everything exported from the package

License

Published as @mosquitodb/mosquitodb-wrapper on npm.