A typical Domino Brix app uses a multi-module Maven layout. The structure below mirrors the sample app while keeping everything generic so you can map it to your own project.
The root aggregates backend, frontend, shared, and feature modules under one build.
@BrixPresenter
public class AdminPresenter extends Presenter<AdminView> {
@Override
public Set<String> getRoles() {
return Set.of("admin");
}
@Override
public Authorizer getAuthorizer() {
return RolesAllowedAuthorizer.INSTANCE;
}
}
pom.xml aggregates all top-level modules.The backend module is the deployed server artifact (Quarkus or similar).
<app-name>-shared for DTOs and events.The frontend module boots the GWT/J2CL application.
App implements EntryPoint).BrixComponentInitializer services.Brix.get().start(...) with startup tasks.Shared code used by both backend and frontend.
Each feature lives under its own folder with a three-module structure.
SecurityContext sc = (SecurityContext) Brix.get().getCoreComponent().core().getSecurityContext();
sc.setUser(new MyUser());
sc.setUnauthorizedAccessHandler(() -> window.alert("Access denied"));
Presenter logic and routing live here.
@BrixPresenter classes, routing, and presenter state handling.*Impl presenters and routing classes.Concrete views and wiring are implemented here.
@UiView classes with Domino UI widgets and layouts.@BrixComponent classes that register the feature.*_UiView classes and initializer services.Shared types between feature frontend and UI.
BrixComponentInitializer services.A simplified dependency view keeps shared code flowing into backend and frontend while features stay modular.
public class DepartmentAuthorizer implements Authorizer {
@Override
public boolean isAuthorized(IsSecurityContext context, HasRoles hasRoles) {
return context.isAuthenticated()
&& context.getUser().getAttributes().get("department").ifTypeIs(String.class, dept -> {
return dept.equals("engineering");
});
}
}
BrixComponentInitializer_ServiceLoader.load().Brix.get().init(...) and Brix.get().start(...).<app-name>-backend, <app-name>-frontend, <app-name>-shared.<feature>-frontend, <feature>-ui, <feature>-shared under a feature aggregator.