axzilla / goilerplate-quickstart

Quickstart for Goilerplate - Modern UI Components for Go & Templ
https://goilerplate.com
MIT License
7 stars 0 forks source link

Goilerplate Quickstart - Jump Start Your Go & Templ UI Project

This repository provides a quickstart template for projects using Goilerplate, a modern UI component library for Go and Templ. Get a head start on your project with a pre-configured environment and example setup.

Prerequisites

Ensure you have the following installed:

Quick Setup

  1. Clone the Repository

    git clone https://github.com/axzilla/goilerplate-quickstart.git
    cd goilerplate-quickstart
  2. Install Go Dependencies

    go mod tidy
  3. Install Templ

    go install github.com/a-h/templ/cmd/templ@latest
  4. Start the Development Server

    make dev

    This command will use npx to run Tailwind CSS, so no separate npm install is needed.

  5. View Your Project Open your browser and navigate to http://localhost:7331

Development Workflow

Customization

Using Goilerplate Components

This quickstart is pre-configured to use Goilerplate. To use Goilerplate components:

  1. Import Goilerplate in your Templ files:

    import "github.com/axzilla/goilerplate/pkg/components"
  2. Use components in your Templ templates:

    @components.Button(components.ButtonProps{Text: "Click me"})

Refer to the Goilerplate documentation for a full list of available components and their usage.

Troubleshooting

Contributing

Contributions to improve this quickstart template are welcome. Please feel free to submit issues or pull requests.

License

This quickstart project is open-source and available under the MIT License.


Happy coding with Goilerplate! We're excited to see what you build. If you create something cool, consider sharing it with the community!