Coder Social home page Coder Social logo

hypefx's Introduction

Hypefx - Build Simple SPA's using Go and HTMX

Framework to build Web Apps using Go and HTMX.

Feature Overview

  • CLI which provides:
    • Boilerplate Code generation for Scaffolding a Go + HTMX + Tailwind Project
    • File Based routing which (can be opted out of).
    • Static and Incremental Site generation.
    • Adding a lightweight headless UI component library.
  • Uses Echo for serving HTTP requests, rendering pages and middleware.
  • Uses Templ for templating UI Components in Go.

Installation

go install github.com/harish876/hypefx  // release build
go install --build=test github.com/harish876/hypefx // test build

Verify the installation by using the below command.

hypefx --version

Example

Use the generate commnd to scaffold a new project.

hypefx generate [go_module_name]

This generates a project structure with the necessary dependencies and runs the go mod init command to initialize the go project. Run the commands on the console output to install and setup the dependencies.

Run this command to generate the routes.

hypefx build routes

This creates a routes.go file with routes according to your file structure defined in your app directory.

Now add the below line in your cmd/main.go. ( I plan to automate this step in the future)

package main

import (
	"github.com/labstack/echo/v4"
)

func main() {
	app := echo.New()
	app.Static("/", "assets")

    //Add this line as below
    routes.RegisterRoutes(app)

    app.Logger.Fatal(app.Start(":42070"))
}

Future Plans

  1. This is very much a WIP but...
  2. I have a lot of cool stuff planned for this, I want to remove many small bugs in the code and improve code quality.
  3. Make nightly builds and automate a few of these manual processes listed under the "Usage" section.
  4. Improving file-based routing by baking it into the dev server, removing multiple dependency commands, and integrating them into one.
  5. Add a ton of batteries for common utilities found in web apps and things I use in my day-to-day life.

Use issues for everything

  • For a small change, just send a PR.
  • For bigger changes open an issue for discussion before sending a PR.
  • PR should have:
    • Test case
    • Documentation
    • Example (If it makes sense)
  • You can also contribute by:
    • Reporting issues
    • Suggesting new features or enhancements
    • Improve/fix documentation

hypefx's People

Contributors

harish876 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.