/Pomoda

Demo app that combines the power of .NET minimal APIs, Razor components and HTMX

Primary LanguageC#

Pomoda (Pocket Movie Database)

A demo app created with .NET Minimal APIs, Razor Components and HTMX (light-heartedly coined as the MARCH-stack).

The project aims for a minimalistic approach to creating a client-server web application.

The apps front-end is a simple HTML/CSS/JS-file combo, which is hosted by the .NET backend API as static files.

The front-end is augmented with HTMX, which it uses to call the backend API. The backend responds with HTML fragments, using Razor Components as HTML templates. HTMX dynamically replaces the DOM elements returned from the backend API, making the application feel like a SPA (no full page loads/refreshes).

Try the live demo at pomoda.azurewebsites.net.


The project folder structure aims to be straight-forward and easy to understand:

Pomoda/Frontend
  /Components
    Razor components for HTML templating
  index.html
    Main page of our application
  styles.css
    CSS styles for the front end
  scripts.js
    Simple JS for UI effects

Pomoda/Backend
  /Endpoints
    HTTP endpoints for the front-end to call
  /Middleware
    Middleware for processing HTTP traffic
  /Services
    Services for fetching data from 3rd party APIs etc.

Pomoda/Shared
  /Models
    Common data models/DTOs
  /Utils
    Common utility methods, helpers etc.