lix

module
v0.0.0-...-4778944 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2026 License: MIT

README

lix

lix is my personal go web-framework -- it's a work in progress.

It is inspired by phoneix, rails, and other frameworks.

Similar to phoenix and rails it makes heavy use of generators for scaffolding.

While it provides a nice fascade over the libraries it uses, you can still access them directly.

The big libraries that lix is built on top of are:

  • github.com/echo (http router)
  • github.com/starfederation/datastar (front-end reactivity)
  • github.com/a-h/templ (template engine)
  • entgo.io/ent (orm - still an open question as to whether or not to use it)
  • github.com/tailwindlabs/tailwindcss (css framework)
  • github.com/air-verse/air (live rebuilding)
  • daisyui5 (css framework)
  • sqlite3 (database - no support for others yet)

CLI Usage

lix includes a CLI tool for project scaffolding and development:

lix new <AppName> [dir]   Create a new lix project
lix server                Run development server (same as bin/dev)
lix version               Show version
lix help                  Show help
Development Setup

To use the lix CLI during development, add a shell alias:

# Add to your .bashrc or .zshrc
alias lix='go run $(pwd)/cmd/lix'  # run from lix repo root

This ensures the CLI is recompiled on each run, picking up any changes.

Short term thoughts

  • move more code from the dev script into the lix library (we're aiming to give users the ability to run their own extra bits, but we want to be able to fix our own bugs)
  • lets also change it to lix server (with lix s) - why break from what people know? DONE

Long term thoughts

  • routebuilder Mount pattern for sub-module route registration (allowing feature modules to register their own routes)
  • better context extension pattern for project-specific data (e.g., DB client, custom config)
  • Something like phoneix live view could fairly easily be wired up on top of datastar and holding the process open with a websocket (would need broadcast)
  • changesets + flash + form helpers and validations would be amazing
  • need a db migration strategy if not using ent
  • an auth generator would be nice (maybe with passkey)
  • gen could have a top level file list that lets you specify specific files to skip based on template engine, this could also let you set permissions
  • lix dev could proxy requests to show compile errors (templ/tailwind/go) directly in the browser, similar to Phoenix's error overlay
  • for better error handling with proxying, could import templ package directly instead of shelling out to the CLI

Directories

Path Synopsis
Package changeset provides Phoenix-inspired data validation and change tracking.
Package changeset provides Phoenix-inspired data validation and change tracking.
cmd
lix command
Package gen is used to generate code for the lix g command.
Package gen is used to generate code for the lix g command.
Package goscripts provides entry points for project-local build scripts.
Package goscripts provides entry points for project-local build scripts.
urlsgen
Package urlsgen generates URL helper packages from route definitions.
Package urlsgen generates URL helper packages from route definitions.
web
Package web provides HTTP utilities for lix applications.
Package web provides HTTP utilities for lix applications.
form
Package form provides form helpers for template rendering with changeset integration.
Package form provides form helpers for template rendering with changeset integration.
templhelpers
Package templhelpers provides helper functions for use in templ templates.
Package templhelpers provides helper functions for use in templ templates.

Jump to

Keyboard shortcuts

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