pacis

module
v0.7.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 20, 2026 License: MIT

README

Pacis

See the documentation

Introduction

Server-side rendering is back in style. It's fast, it's good for SEO, and users see content right away instead of waiting for JavaScript to load. But most SSR tools lock you into JavaScript and come with a ton of build tools you have to learn and maintain. This library lets you build server-rendered web apps with Go on the backend and modern frontend tooling on the frontend. Your routes, your business logic, your server rendering, all Go. Your frontend assets get bundled with Bun and Vite, so you get the best of both worlds without fighting two separate ecosystems. No Node runtime required to serve your app. Just one binary that includes everything.

Building web UIs in Go has always been clunky. You were stuck with basic templating or reinventing the wheel with string concatenation. This library changes that. You get composable components that feel natural to use, type-safe templates that catch mistakes before they hit production, and a development experience that doesn't waste your time. Hot reload means you see changes instantly. Streaming means your pages load faster. You can add caching where it actually matters instead of opt-out strategies from other frameworks.

Deployment is where this approach really shines. You bundle your frontend assets during build, then compile everything into one binary with your Go server. No runtime dependencies, no separate frontend and backend deployments, no configuration drift between dev and production. It deploys anywhere, cloud VM, Docker, Kubernetes, edge platforms. You get the safety of compiled code and the simplicity of one artifact to ship.

Installation

To install, and get started, your best bet is creating a new repository from Pacis' Github Template. Go ahead create yours and clone it to your local environment.

git clone <your-repository>

You can follow the simple readme guide in the template repository or follow this one.

Install Dependencies

Install your go and bun dependencies.

Pacis uses bun and vite for bundling your frontend assets. You can replace it with another package manager but the template heavily relies on it.

bun install
go mod download

Pacis also uses air and taskfile to streamline development and build processes. If you don't have them already, follow their installation guides:

Development

You are ready to run your development server. There is a task called dev already defined for you in the Taskfile.yml file.

task dev

Running this command will spin up a server on localhost port 8080. It will also run a vite dev server on port 5173.

The dev server actually runs on port 8081 but it is proxied to port 8080 with hot reloading using air. Check the .air.toml file for its configuration.

Directories

Path Synopsis
Package components provides utilities for manipulating HTML elements with custom properties, such as merging Tailwind CSS classes and handling child elements.
Package components provides utilities for manipulating HTML elements with custom properties, such as merging Tailwind CSS classes and handling child elements.
Package html provides a lightweight HTML rendering system for Go, allowing the construction and rendering of HTML nodes and elements in a composable and type-safe manner.
Package html provides a lightweight HTML rendering system for Go, allowing the construction and rendering of HTML nodes and elements in a composable and type-safe manner.
Code generated by pacis.
Code generated by pacis.
cmd command
pages module
Package server provides the core HTTP server implementation for the application, including environment configuration, middleware management, static asset handling, development server proxying, and graceful shutdown capabilities.
Package server provides the core HTTP server implementation for the application, including environment configuration, middleware management, static asset handling, development server proxying, and graceful shutdown capabilities.
font
Package font provides utilities for managing and generating Google Fonts URLs, including font weights, subsets, and display options.
Package font provides utilities for managing and generating Google Fonts URLs, including font weights, subsets, and display options.
i18n
Package i18n provides internationalization (i18n) support for the application, enabling the loading and rendering of localized messages using JSON translation files.
Package i18n provides internationalization (i18n) support for the application, enabling the loading and rendering of localized messages using JSON translation files.
middleware
Package middleware provides HTTP middleware utilities for handling color scheme preferences, locale selection, caching, logging, and gzip compression.
Package middleware provides HTTP middleware utilities for handling color scheme preferences, locale selection, caching, logging, and gzip compression.
ui module
x

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL