Custom code and API, for when the visual builder isn't enough
Any list, record page or dashboard can be a widget of your own. Write code against the Megorix API when the builder isn’t enough.
- Lists, record pages and forms can be replaced by your own widgets — real components you open and edit in Dev Studio.
- Write React/TypeScript code against the Megorix API to build exactly what you need.
- Combine parts built visually with hand-written parts, in the same system.
Visual builder or custom code: when to choose each one
Start with what can be configured: entities and fields for the data, rules and workflows for the processes, and list, board or calendar views for everyday work. Code comes in when the screen or the logic you need doesn’t fit those pieces — and these are the cases where it pays off:
- A dashboard with the company’s own indicators — charts, totals and comparisons that no ready-made view shows.
- A record page, list or form designed for one specific task, in place of the screen Megorix generates from the fields.
- Server-side logic no rule covers: calculations across several entities, special validations, scheduled tasks.
- A connection to another program through its API, with the credentials stored encrypted.
How a React widget is built in Dev Studio, from draft to publish
Dev Studio is the Megorix code editor and runs in the browser, with nothing to install. A widget is a React component written in TypeScript, in one file or several.
- 1
Create the widget and choose where it appears: a page of the system, a dashboard, a section of a page, or in place of an entity’s list or record page.
- 2
Write the code with Megorix interface components — tables, forms, dialogs, tabs — and with functions that read and save records, upload files, generate PDFs or call an external system.
- 3
Watch the result in the preview, compiled in the browser as you type. When you save, the server compiles the code and checks the types.
- 4
Every save is a draft. When you publish, a version is kept — and any earlier version can be restored.
- Only administrators save and publish code; everyone else uses the result with the permissions they already have.
- Widgets also serve the website and online store: as a whole page, the header, the footer or a section inside a page built in the builder.
REST API, webhooks and custom integrations with other programs
The Megorix REST API gives access to the data of every module — list, search, create, update and delete records — to files and to PDF generation. Each API key acts as a service user, with that user’s roles, visibility rules and field permissions; it can have an expiry date and a list of allowed IP addresses. The documentation follows the OpenAPI format.
To connect to another program, Megorix stores the connection — HTTP, FTP or SFTP, with basic, token, API key or OAuth2 authentication — with the credentials encrypted. A mapping says what to send when something happens, for example when an order is confirmed, retries if the call fails and logs every delivery. The other system’s response can be written back to the record; in the other direction, inbound webhooks receive signed notifications.
That is how, at a haulage company, the details of a completed delivery go to the invoicing program, or how, at a repair shop, the number of the document issued is kept on the repair order. See the integrations MegaPC already has in place.
Developing the ERP with Claude, over MCP, with review before publishing
Connected to Megorix over MCP, Claude can create modules, entities and fields, widgets, rules, workflows and store pages from a description — if the person connecting it is an administrator and grants that permission. Everything it builds stays as a draft, in the test environment, until someone reviews and publishes it. Read more about AI in Megorix.
Common questions about custom code and the API
Yes — in Megorix, a list, a record page or a dashboard can be your own widget, written in React/TypeScript against the API, when the visual builder isn’t enough.
Yes, Megorix exposes an API you can use to build custom widgets or integrate with other systems.
In Megorix, parts built in the visual builder and hand-written parts coexist in the same system, without conflict.
Not any. A widget imports the Megorix modules, your company’s shared component library and a fixed set of libraries loaded when needed — for example recharts for charts, xlsx for spreadsheets or pdfmake for PDFs.
Yes: 120 requests per minute per key or token. Above that, the API answers with status 429 and says how long to wait before trying again. API access depends on the plan — the pricing table shows which plans include it.
Only administrators save and publish code. Every save stays a draft until it is published, every publish keeps a version, and any earlier version can be restored.
Yes. A widget can be a whole page of the website, the header, the footer, the homepage or a section inside a page built in the builder.
Also in Megorix
Ready to shape Megorix around your business?