Skip to main content

Briques Python prêtes à l'emploi pour vos interfaces de données

Project description

Blueprint Modular

Open-source React component library for business applications.

Blueprint Modular is a production-grade UI framework built for data-intensive apps. 75+ components designed for dashboards, KPI tracking, production monitoring, and enterprise tooling — all accessible through a single bpm.* API.

npm install @blueprint-modular/core

Why Blueprint Modular

Most UI libraries give you buttons and inputs. Blueprint Modular gives you the building blocks of business intelligence:

  • Metricsbpm.metric, bpm.metricRow with delta tracking and automatic color coding
  • Data tablesbpm.table with search, pagination, sort, and custom cell renderers
  • Chartsbpm.plotlyChart wrapping Plotly.js with zero configuration
  • Modalsbpm.modal with a predictable conditional rendering pattern
  • Navigationbpm.sidebar, bpm.tabs, bpm.breadcrumb
  • Formsbpm.input, bpm.selectbox, bpm.numberInput, bpm.toggle, bpm.datePicker
  • Feedbackbpm.badge, bpm.spinner, bpm.emptyState, bpm.alert

All components share a single import, a consistent prop API, and a unified design language.


Quick start

import { bpm } from '@blueprint-modular/core'
import '@blueprint-modular/core/dist/style.css'

export default function Dashboard() {
  return bpm.container({
    children: (
      <>
        {bpm.pageHeader({ title: 'Production Dashboard' })}
        {bpm.metricRow({
          children: (
            <>
              {bpm.metric({ label: 'TRS', value: '87.4%', delta: 2.1, deltaLabel: 'vs last week' })}
              {bpm.metric({ label: 'Output', value: '12 480', delta: -340, deltaLabel: 'units' })}
              {bpm.metric({ label: 'Downtime', value: '2h 14m' })}
            </>
          )
        })}
      </>
    )
  })
}

Installation

npm

npm install @blueprint-modular/core

Import

// Always import as a namespace — never destructure
import { bpm } from '@blueprint-modular/core'
import '@blueprint-modular/core/dist/style.css'

Tailwind (required for bpm.tabs and bpm.badge)

// tailwind.config.js
module.exports = {
  content: [
    './app/**/*.{ts,tsx}',
    './components/**/*.{ts,tsx}',
    './node_modules/@blueprint-modular/core/dist/**/*.{js,mjs}',
  ],
  safelist: [
    { pattern: /^bpm-tabs-/ },
    { pattern: /^bpm-badge-/ },
  ],
}

Component reference

Full reference at blueprint-modular.com/llms.txt — machine-readable format designed for LLM-assisted development.

Layout

Component Description
bpm.container Root page wrapper
bpm.pageHeader Page title + subtitle + actions
bpm.card Content card with optional title
bpm.section Labeled section within a page
bpm.sidebar Collapsible navigation sidebar
bpm.tabs Tab navigation with content panels

Data display

Component Description
bpm.metric Single KPI with label, value, delta
bpm.metricRow Responsive row of metrics
bpm.table Searchable, sortable, paginated table
bpm.plotlyChart Plotly.js chart wrapper
bpm.timeline Chronological event list
bpm.badge Status indicator

Forms

Component Description
bpm.input Text input
bpm.numberInput Numeric input with min/max
bpm.selectbox Dropdown selector
bpm.toggle Boolean switch
bpm.datePicker Date selector
bpm.button Action button (primary / secondary / outline)

Feedback

Component Description
bpm.modal Dialog overlay
bpm.spinner Loading indicator
bpm.emptyState Empty list placeholder
bpm.alert Inline alert message

Critical rules

// ✅ Correct
import { bpm } from '@blueprint-modular/core'

// ❌ Never destructure
import { bpm.modal } from '@blueprint-modular/core'

// ✅ Modal — always conditional, always inside return()
{isOpen && bpm.modal({ isOpen: true, onClose, title: 'Edit', children: <></> })}

// ❌ Never after return() or outside JSX
const modal = bpm.modal({ ... }) // wrong

// ✅ Charts — always bpm.plotlyChart
{bpm.plotlyChart({ data: traces, layout: {}, height: 300 })}

// ❌ Never bpm.lineChart / bpm.barChart / bpm.areaChart

LLM-friendly

Blueprint Modular is designed to be used with AI code generation tools.


Validated at scale

Blueprint Modular is used in production at NXTFOOD (food processing, ~120 employees) for operational dashboards, production monitoring, and internal tooling.


Stack

Language TypeScript
Framework React 18
Styling CSS Modules + Tailwind CSS
Charts Plotly.js
Package @blueprint-modular/core on npm
Version 0.1.52

Related projects

Project Description
Blueprint Maker AI app builder — prompt → Next.js app using bpm.*
Blueprint Monitor AI teleprompter for video calls
Blueprint Market Vertical app gallery with Stripe

Convergence gate

A single command validates the entire component surface — types, build, doc sync, smoke render, and prop-surface snapshot:

npm run gate
Check What it verifies
tsc --noEmit TypeScript types in packages/core/src/ compile without errors
vite build Library bundles (dist/index.mjs, dist/index.js, dist/style.css) build cleanly
Doc sync public/llms.txt and lib/generated/bpm-components.json match what the generators would produce today
Smoke render Every bpm.* export mounts with minimal props without throwing
Prop-surface snapshot The prop names for every component match the committed snapshot — any removal/rename = FAIL (θ-additive guarantee)

When to run it: before any PR, after adding/modifying a component, after regenerating docs.

When a check is red:

  • tsc / vite build failures → fix the type error or build config.
  • Doc sync failure → run python scripts/generate-llms-txt.py && python scripts/generate-bpm-components-json.py then re-commit.
  • Smoke render failure → the component throws with minimal props; update packages/core/gate/fixtures.ts with the correct minimal props, or fix the component bug.
  • Prop snapshot failure → a prop was removed/renamed. If intentional, run npx vitest run gate/ --update-snapshots from packages/core and commit the updated snapshot.

MCP connector (read-only)

A public, read-only MCP server exposes the component catalogue to Claude, ChatGPT (developer mode) and any MCP host over Streamable HTTP — same deployment, same source of truth as the site. Built to pass a directory review: readOnlyHint tools, cursor pagination, structured/actionable errors, clean output (catalogue data only), per-IP rate limiting.

  • Endpoint : POST /api/mcp (no auth — the catalogue is public)
  • Tools : list_components, search_components, get_component, suggest_composition
  • Pages : docs /mcp · privacy /privacy · health GET /api/health
  • Source of truth : generated from bpm-components.json + llms.txt via npm run generate:mcp-registry (never hand-authored)

Add it in Claude via Settings → Connectors → Add custom connector, URL https://blueprint-modular.com/api/mcp. Full details — tools, params, local testing, MCP Inspector — in docs/MCP_CONNECTOR.md. Directory submission copy: SUBMISSION.md.


License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

blueprint_modular-0.1.52.tar.gz (76.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

blueprint_modular-0.1.52-py3-none-any.whl (80.7 kB view details)

Uploaded Python 3

File details

Details for the file blueprint_modular-0.1.52.tar.gz.

File metadata

  • Download URL: blueprint_modular-0.1.52.tar.gz
  • Upload date:
  • Size: 76.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for blueprint_modular-0.1.52.tar.gz
Algorithm Hash digest
SHA256 622e4cbb71c27f4610357fd31144b58b8348d0fbd76f738e452646286aaf2194
MD5 aa9300931a976fa77612745dac710fdb
BLAKE2b-256 79dc184a8375b2a29f167188563632e9ab59ac4cf8bb511f7ea1f25055e05323

See more details on using hashes here.

File details

Details for the file blueprint_modular-0.1.52-py3-none-any.whl.

File metadata

File hashes

Hashes for blueprint_modular-0.1.52-py3-none-any.whl
Algorithm Hash digest
SHA256 9b9406b32bd294e6df7b8e78e356590bd08c5f8bf8631322b4e971d10d54b64e
MD5 154ab3d20f553b6f5d013897998dfc08
BLAKE2b-256 c285a864d427daa449ad1a04beb8c92c4c3b530211743a3112302d7af8b26a0b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page