Coder Social home page Coder Social logo

bnema / gkick Goto Github PK

View Code? Open in Web Editor NEW
12.0 1.0 0.0 261 KB

Go Echo HTMX Kickstart project

License: GNU General Public License v3.0

Go 42.54% JavaScript 49.78% Shell 0.20% CSS 2.89% HTML 4.59%
echo golang gotemplate htmx hyperscript tailwindcss

gkick's Introduction

Go Echo HTMX Kickstart project

Overview

This is my kickstart project for building web applications. The stack is minimalist and includes the following:

  • Embedding: Embed static folder and templates into the binary.
  • HTMX: Enables dynamic content updates without requiring a full page reload.
  • Hyperscript: Simplifies frontend interactivity with syntactic sugar.
  • Go Templates Rendering: HTML rendering with Go's standard library.
  • Tailwind CSS: Integrated for utility-first CSS styling (because i'm too lazy to write CSS).
  • Air for Hot Reloading: Enables a smooth development experience by automatically reloading the application on code changes.
  • Sanitize HTML: Sanitize HTML inputs with the bluemonday package.

The project also aims to maintain a structure that aligns with Golang's standard project layout.

Getting Started

Prerequisites

Installation

  1. Clone the repository.
    git clone https://github.com/bnema/kickstart-echo.git .
    
  2. Remove the .git folder and initialize a new one.
    rm -rf .git && git init
    
  3. Remove go.mod, go.sum and create a new project.
    rm go.mod go.sum && go mod init github.com/username/project
    
  4. Install package dependencies.
    go mod tidy
    
  5. Run Bun install for Tailwind CSS dependencies.
    bun install
    
  6. Execute Tailwind with Bun.
    bun run dev:css
    
  7. Create a .env at the root of the project (see .env.example).
  8. Run the Application (Air will rebuild and restart the application on code changes).
    air
    
  9. If the 2 previous commands are successful, you can run dev.sh who will run them in parallel.
    chmod +x dev.sh
    ./dev.sh
    
  10. Bonus: The superlazy, one-liner command.
    export MODULE_NAME=github.com/CHANGE_ME/I_MEAN_SERIOUSLY; git clone http://github.com/bnema/kickstart-echo.git . && go mod tidy && rm -rf .git && git init && rm go.mod go.sum && go mod init $MODULE_NAME && bun install && cp .env.example .env && chmod +x dev.sh && ./dev.sh
    

License

Under the GPL-3.0 license. Please see the LICENSE file for more details.

gkick's People

Contributors

bnema avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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.