velxio/backend/app
David Montero Crespo edd2ac32d5 feat: add optional extension hooks for private overlays
Three small, backwards-compatible hooks let anyone with private features
(velxio.dev's analytics, custom integrations, paid tiers, …) layer them
on top of the open-source build without forking files.

Backend (app/main.py):
- After standard router registration, try-import an optional `app.pro`
  module exposing `register_pro(app)`. ImportError is silently swallowed
  (the OSS image doesn't ship `app.pro`, so this is a no-op there).

Frontend:
- EditorToolbar: new optional `rightSlot` prop renders extra elements
  after the built-in right-group buttons (mirrors the existing
  `centerSlot` pattern).
- main.tsx: dynamic `import('@pro/index')` gated by VITE_PRO_BUILD env.
  When unset (OSS build), the branch is dead-code-eliminated and no pro
  chunk is emitted.
- vite.config.ts: `@pro` alias resolves to `src/__pro_stub__/` by default.
  Private builds set `VITE_PRO_BUILD=true` and `PRO_OVERLAY_PATH=<path>`
  to point at their real overlay tree.
- src/__pro_stub__/index.ts: 1-line no-op `mountPro` so TypeScript and
  Vite resolvers stay happy in OSS builds.

Verified: `npm run build:docker` succeeds; `npm test` passes 1161/1162;
the OSS bundle (43 MB) contains zero references to `__pro_stub__`,
`@pro`, or `pro/index` (verified via `grep dist/`).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-04 14:03:20 -03:00
..
api Merge pull request #137 from davidmonterocrespo24/esp32-cam 2026-05-02 22:40:06 -03:00
core feat: add admin management features and user role handling 2026-03-06 23:46:36 -03:00
database feat: implement user authentication and project management features 2026-03-06 10:14:50 -03:00
mcp feat: integrate MCP (Model Context Protocol) for agent compatibility 2026-03-11 15:29:55 +00:00
models feat: persist multi-board projects + add auto-save 2026-05-01 13:43:33 -03:00
schemas feat: persist multi-board projects + add auto-save 2026-05-01 13:43:33 -03:00
services fix(espidf): include non-utility subdirs for libs without src/ layout 2026-05-04 15:41:53 +02:00
utils feat(metrics): add usage analytics dashboard with country tracking 2026-04-25 19:47:40 -03:00
__init__.py feat: Implement Arduino Simulator with component management and simulation features 2026-03-03 00:20:49 -03:00
main.py feat: add optional extension hooks for private overlays 2026-05-04 14:03:20 -03:00