Skip to content
manual

Architecture ​

Baseline employs a decoupled architecture to ensure separation of concerns and to minimize architectural friction, allowing you to focus on application logic rather than infrastructure complexity.

The Decoupled Model ​

The architecture is split into two distinct layers:

  1. Backend: A Node.js server providing a REST API. It handles all CRUD operations, authentication, and business logic.
  2. Frontend: A Single Page Application (SPA) that consumes the REST API to provide a highly interactive user interface.

By decoupling these layers, Baseline aligns with the Philosophy of prioritizing developer velocity and minimizing the overhead associated with complex, monolithic frameworks.

Why SPA instead of SSR? ​

While Server-Side Rendering (SSR) is a valid approach for specific scenarios, Baseline is purpose-built as an SPA to provide a predictable, lightweight development experience.

1. Reduced Complexity ​

Implementing SSR introduces significant architectural overhead. You must manage the frontend framework on both the client and the server, and you must handle 'hydration'—the process of synchronizing client-side state with server-rendered HTML. Baseline avoids these complexities to ensure a streamlined development loop.

2. Optimized Performance for Applications ​

For interactive, application-centric projects, the SPA model is highly efficient:

  • Asset Caching: Once the initial frontend assets are cached in the browser, subsequent navigation is nearly instantaneous.
  • Minimal Payloads: Subsequent interactions only require lightweight JSON payloads via the API, rather than full HTML document reloads, ensuring a highly responsive user interface.

3. Intentional Use Cases ​

The choice of architecture depends heavily on the goal of your project.

Use Case Guidance: SEO and Accessibility

If your primary requirement is Search Engine Optimization (SEO) or accessibility for users without JavaScript, an SPA may not be the optimal choice.

  • Use Baseline (SPA) for: Highly interactive web applications, dashboards, and SaaS products where user experience and responsiveness are paramount.
  • Use SSR (e.g., Laravel, Symfony) for: Content-heavy websites like blogs, news sites, or CMS platforms where public-facing SEO is the primary driver.