For developers

Generated code you would have written yourself

For the CTOs and developers on your side: the software we build with Fractal is a conventional, layered Python codebase, readable, testable and yours. We regenerate as often as the model changes; your own code stays put.

Custom code survives

Write your own logic where the generator leaves room

The generator owns the boilerplate; you own the business rules. Command handlers are scaffolded into a custom folder for you to fill in, and anything you change inside a generated file goes between FRACTAL custom markers. A three-way merge keeps both on every regeneration, so a model change never costs you your own work.

custom/domain/invoice/commands/send.py python
@ApplicationContext.register_command_handler
class SendInvoiceCommandHandler(CommandHandler):
    """Scaffolded from the Send command on Invoice. The body is yours."""

    command = SendInvoiceCommand

    def handle(self, command: SendInvoiceCommand):
        invoice = command.entity
        self.context.email_service.send(
            email=invoice.client_email,
            template="invoice_sent",
            parameters={"number": invoice.number},
        )
        return invoice


# Inside a generated file, a hand-written region looks like this:
# FRACTAL custom begin fc-a3f9c1 keep our extra check
# ...your code...
# FRACTAL custom end fc-a3f9c1
custom/domain/invoice/commands/send.py

Built the way you would build it

No proprietary runtime and no black box: just a well-structured project that happens to be generated.

  • DDD layers

    Domain, application and infrastructure are separate. Entities, value objects, commands and queries map one-to-one onto code you can read and reason about.

  • Regeneration that keeps your code

    Change the model and regenerate. Generated files follow the model; your custom regions are merged back in, so regeneration is a routine step, not a risk.

  • A CLI for everything

    Everything you do in the studio can also be done from the command line. The fractal CLI inspects and changes models, generates projects and rolls out deployments, so the whole flow is scriptable.

  • MCP, both ways

    The studio itself has an MCP server, so we can use an AI assistant while modelling. Add the MCP module to an app you generate and it gets one too, so assistants can operate it. More on AI integration

  • Tests included

    Generated code comes with tests for the generated behaviour, so you start from a green suite and add tests for your own logic.

  • Own your repo

    The output is a normal Git repository on your own GitHub. Review it, branch it, run it locally and deploy it however you like.

How the code is layered

A generated codebase follows a clean, layered architecture: the domain at the centre, the application layer around it, adapters for the API and storage on the outside, and the portal on top. Dependencies point inward, so business rules never depend on a framework or a database. Next to each layer sits a custom folder for your own code, which the generator leaves alone on every regeneration.

The layers of a generated codebase: portal, adapters, application and domain, with dependencies pointing inward and a custom/ folder alongside each layer.

From model change to production

A change starts in the model in Studio. Fractal generates the new version on a clean lineage and merges it into your repository with a three-way merge, so your own changes stay in place. From there your normal CI takes over: tests, container images and deployment. Studio then compares what runs in each environment with the model and flags any drift.

From Studio to production: model change, generation on the vanilla lineage, 3-way merge into your repository, CI, container images and deployment, with drift detection back to Studio.

For the team that will own the code

We build your software with Fractal; the code is yours. That matters most to the people who have to live with it: the CTO or developer evaluating what we deliver, and the team that will read, run and extend it after handover.

Because the model is the source, taking over a project is easier. A new developer reads the model to understand the domain, then the code to see the details. Generated groundwork such as authentication, admin screens, endpoints, emails, background jobs and deployment looks the same everywhere, so your team can focus on the domain logic. And when a change is needed six months later, the model changes, the code is regenerated and your custom code is merged back in.

Want to see what you would be getting? Book a demo and we walk through the generated code together.

See the generated code for yourself

In a demo we model a small domain live, generate it and walk through the code, the portal and the MCP server together.

Book a demo