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.53.tar.gz (1.8 MB 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.53-py3-none-any.whl (1.8 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: blueprint_modular-0.1.53.tar.gz
  • Upload date:
  • Size: 1.8 MB
  • 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.53.tar.gz
Algorithm Hash digest
SHA256 6b3a5cf0f1a7682c4dc245b0964595d34aa7cf1724c48867fb05f01dd35b471c
MD5 779fb24b6d40851ab4636321c96aee15
BLAKE2b-256 a3830421278a0fdc7898a785910dd936b1cfef921a941d6f3998f0bf91bf57d4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for blueprint_modular-0.1.53-py3-none-any.whl
Algorithm Hash digest
SHA256 2d33f1de1488df06f21f1568b18c952cfda67d3c9d3d9f8a747e81edd03c2ac7
MD5 b927a254f3aca03e57de7c0f9ff5ef2b
BLAKE2b-256 6ec639387f4b86ca49045553ebe60db58750a8ebc178d6199f346c7bb5544b3d

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