Skip to main content

What is Flowra?

Flowra is a modular Node.js framework built on Express. It gives teams a clear structure, a dependency-injected service container, and a CLI that scaffolds consistent code. You write plain JavaScript, keep Express semantics, and gain a framework that scales with your API.

At a glance

  • Express-compatible HTTP layer with familiar middleware and routing.
  • Module-first architecture that groups routes, controllers, services, and models.
  • Dependency injection through a container that resolves services by name.
  • Knex-powered data layer with multiple connection aliases.
  • CLI tooling for scaffolding, migrations, health checks, and cleanup.

Core building blocks

BlockPurposeWhere it lives
ModulesFeature slices containing routes, controllers, services, and modelsapp/Modules/
ContainerDependency injection and scoped module registrationapp/Bootstrap/Container/
HTTP bootstrapExpress setup, middleware, and routingapp/Bootstrap/server.bootstrap.js
ConfigurationEnvironment-driven config for app, DB, cache, loggingapp/Config/
CLIProject creation, generators, and dev utilitiesflowra (from flowra-cli)

A minimal module

Create a module with the CLI:

flowra make:module status

Flowra wires the module into app/Modules/modules.manifest.js and generates the boilerplate. A route file looks like this:

app/Modules/Status/status.routes.js
'use strict';

function registerStatusRoutes({ router, container } = {}) {
if (!router || !container) {
return router;
}

const controller = container.resolve('modules.status.controllers.main');
router.get('/status', controller.index.bind(controller));

return router;
}

module.exports = registerStatusRoutes;

The generated controller already calls the service layer, so you only need to update the service method to return meaningful data:

app/Modules/Status/Status.service.js
'use strict';

class StatusService {
async list() {
return {
ok: true,
uptime: process.uptime(),
node: process.version,
};
}
}

module.exports = StatusService;

Start the server and hit GET /status.

Next steps

Read Design Philosophy to understand the principles behind Flowra, or jump straight to Installation.