Skip to content
Public template

About

Awesome projects don’t stay at the bottom of the hill β›°οΈπŸ

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

40 Commits

Folders and files

Repository files navigation

Billy-Bot

PocketGoat is a starter stack

Built with PocketBase, Go, Alpine.js, and Tailwindcss for rapid web development


Prerequisites

Install mise

mise is a polyglot tool version manager that ensures consistent development environments.

Use mise to install Go v1.24 or higher.

# Install mise (if not already installed)
curl https://mise.run | sh

# Trust the pre-existing configuration
mise trust

# Install all required tools
mise install

Install air

Air is a tool for automatically rebuilding and restarting go applications in development when changes are made to certain files.

# Install air
go install github.com/air-verse/air@latest

Initial Setup

1. Install Application Dependencies

# Install Go dependencies
go mod tidy

2. Run the Application

# Development mode with hot reloading
mise dev

The application will be available at http://127.0.0.1:8090

3. Create PocketBase Superuser

On first run, PocketBase will prompt you to create a superuser account. This account will have full access to the PocketBase admin panel at http://127.0.0.1:8090/_/

4. Configure Google OAuth

After creating your superuser account:

  1. Log in to the PocketBase admin panel
  2. Navigate to Settings β†’ Auth providers
  3. Enable Google OAuth provider
  4. Configure with your Google OAuth credentials:
    • Client ID: Your Google OAuth client ID
    • Client Secret: Your Google OAuth client secret

To obtain Google OAuth credentials:

  1. Go to Google Cloud Console
  2. Create a new project or select an existing one
  3. Enable the Google+ API
  4. Create OAuth 2.0 credentials
  5. Add authorized redirect URI: http://127.0.0.1:8090/api/oauth2-redirect

5. Configure Transactional Email Provider

To enable email functionality (password resets, verification emails, etc.):

  1. In the PocketBase admin panel, go to Settings β†’ Mail settings
  2. Configure your SMTP settings:
    • SMTP server: Your email provider's SMTP server
    • Port: Usually 587 for TLS or 465 for SSL
    • Username: Your SMTP username
    • Password: Your SMTP password
    • Use TLS: Enable for secure connection

Popular transactional email providers:

6. Configure File Storage (S3)

To enable integration with S3 compatible storage:

  1. In the PocketBase admin panel, go to Settings β†’ File storage
  2. Enable Use S3 Storage
  3. Configurate your S3 storage settings:
    • Endpoint: The host url
    • Bucket: The bucket name
    • Region: The region the storage is hosted
    • Access key: Access key from provider
    • Secret: Secret value from provider

Popular S3 File Storage providers

7. Configure Payment Provider

Consider Stripe No-Code integration

Project Structure

β”œβ”€β”€ main.go             # Main application entry point
β”œβ”€β”€ go.mod              # Go packages
β”œβ”€β”€ tailwind.css        # Source file for Tailwindcss related assets
β”œβ”€β”€ .air.toml           # Air Configuration
β”œβ”€β”€ mise.toml           # Mise configuration
β”œβ”€β”€ package.json        # Node packages (pnpm)
β”œβ”€β”€ templates/          # Templ templates
β”‚   β”œβ”€β”€ components      # Reusable UI fragments
β”‚   β”œβ”€β”€ icons           # SVG icons
β”‚   β”œβ”€β”€ layout          # Layouts for global elements
β”‚   └── pages           # Content served per route in main.go
β”œβ”€β”€ pb_data/            # PocketBase data (gitignored)
β”œβ”€β”€ pb_migrations/      # PocketBase migrations
β”œβ”€β”€ pb_public/          # Static files served by PocketBase
β”‚   β”œβ”€β”€ css/main.css    # Generated by Tailwind CLI
β”‚   └── images/         # Graphical assets
└── tmp/                # Temporary build files

Development

While mise dev is running any changes to .go, .templ, or other watched files (see .air.toml) will automatically rebuild and restart the application.

Template files (.templ) are automatically transpiled to Go code before building.

UI Architecture

The application uses Tailwindcss and DaisyUI styling, providing:

  • Full control over styling from template files
  • Responsive design with modern CSS features
  • No additional JS dependencies
  • Clean, semantic, and accessibility compliant HTML structure

UI interactivity is handled by Alpine.js, providing:

  • Reactive data binding
  • Component state management
  • Seamless integration with server-rendered templates

A note about icons:

In order to maintain a minimal pageload footprint while still providing a DRY solution for icon usage, SVGs are copied directly from lucide.dev and svgl.app and pasted into their own templ component as needed.

Production Deployment

Consider PocketHost.

License

MIT

About

Awesome projects don’t stay at the bottom of the hill β›°οΈπŸ

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages