Introduction to Fullstack

Welcome to the Harpia App Guides! While Harpia’s core enables you to build incredibly fast, lightweight API microservices, its true capabilities shine when you embrace its Monolithic Architecture.

Harpia’s Fullstack mode is a batteries-included, fully-featured environment designed to help you build robust web applications without the headache of gluing together dozens of third-party libraries.

The Monolithic Advantage

In an era of distributed microservices and complex front-end SPA frameworks, choosing a well-structured monolithic architecture often results in significantly improved developer velocity, simpler deployments, and a more coherent mental model.

With Harpia Fullstack, you get:

  • Centralised Codebase: Your routing, business logic, database schemas, and view templates live in a single, cohesive repository.
  • Batteries Included: Authentication, Database ORM (Prisma), Mailer, Job Scheduling, and WebSocket support are pre-configured out of the box.
  • Server-Side Rendering (SSR): Deliver lightning-fast HTML directly from the server using the integrated template engine, ensuring excellent SEO and immediate First Contentful Paint (FCP).
  • Native Hot Reload: Enjoy a modern developer experience with automatic client-side hot reloading that refreshes your browser instantly when you modify views or CSS.

The Module System

Harpia Fullstack organises your application into a highly structured Module System. Instead of scattering files across generic root directories, your code is grouped by domain (e.g., users, auth, products).

Each module encapsulates its own:

  • Controllers: Handle HTTP requests and orchestrate the response.
  • Services: Contain the core business logic.
  • Repositories: Manage database interactions.
  • Validations: Define schema validation rules for incoming request data.
  • Views: Store HTML templates specific to that domain.

This vertical slice architecture ensures that your monolith remains maintainable, decoupled, and easy to navigate, no matter how large it scales.

What’s Next?

If you haven’t already, you can scaffold a new monolithic application using the CLI:

bun create harpia-app my-app --fullstack

Explore the guides in this section to learn how to harness the full power of the framework, starting with understanding the Modules architecture.