Loading...

Getting Started with Goilerplate

This is the recommended setup for using Goilerplate in your Go projects.

Quick Start

  1. Set up your Go project:

    Create a new Go project or use an existing one. Initialize it with go mod init.

  2. Install Templ:

    Follow the Templ installation guide to set up Templ in your project.

  3. Set up Templ, Air, and Tailwind:

    Use the Templ live reload guide to create a Makefile and set up Air and Tailwind CSS.

  4. Configure Tailwind:

    Copy the provided tailwind.config.js and place it in your project root.

  5. Set up Tailwind CSS input:

    Create an input.css file in your project's CSS directory and copy the content from our input.css.

  6. Include Alpine.js:

    Add the Alpine.js script to your HTML head section as described in the Alpine.js documentation.

  7. Using Goilerplate components:

    Create a components folder in your project. Copy Goilerplate component code from our components documentation into .templ files in this folder.

  8. Start development:

    Run make dev to start your development environment.

  9. Change theme (optional):

    If you want to change the theme, visit the shadcn theme customizer, adjust the theme to your liking, and copy the generated CSS into your input.css file.

Next Steps

Explore our components documentation for more examples. Copy and customize these to fit your needs!