Skip to content

🐱 kirby-htmx-alpine-tailwind | Kirby CMS + Vite Kit using Htmx, AlpineJs and TailwindCSS and set up for continous deployment on dokku/heroku PaaS.

License

Notifications You must be signed in to change notification settings

34N0/kirby-htmx-alpine-tailwind

Β 
Β 

Repository files navigation

🐱 kirby-htmx-alpine-tailwind

This template is a scaffold for fully managed sites with Kirby CMS as the backend and modern lightweight clients leveraging Htmx and AlpineJs.

Features

  • ⚑️ Uses Vite tooling with the kirby-vite plugin.
  • πŸ”„ Live Reloading for Kirby templates, snippets, content, and more.
  • πŸ“‚ Kirby CMS Public folder structure.
  • πŸ₯° Htmx, AlpineJs, and TailwindCSS for HTML-driven development.
  • 🌎 Fully managed site template including Kirby's flat-file DB engine.
  • πŸ‹ Easy & instant Git-based deployment on a Dokku PaaS.
  • πŸ€ Optional Git-based CI, including Git-based production backups.

Getting Started

Prerequisites

Before you begin, ensure you have the following prerequisites:

Installation

  1. Clone this repository:

    git clone https://github.com/your-username/your-repo.git
    cd your-repo
    npm install
    composer install
  2. Configure any necessary environment variables or settings.

Development

To start a local development server:

npm run dev

This command will start both the PHP server for Kirby CMS and the Vite development server. Ensure that the necessary ports (e.g., 8888) are open and not conflicting with other services.

Backend

Access the Kirby CMS admin panel at /panel and the development site at http://localhost:8888.

Deployment

Requirements

Run the build script and copy the content of this repository into the endpoint directory.

Apache

This repository provides a configured .htaccess file. Using Nginx or a different web server is possible but not recommended.

Security

The site is designed to not loose any functionality with JavaScript disabled to offer strong backward compatibility and functionality with high-security clients (i.e., TOR Browser's highest security setting). To fully understand the security benefits and limitations of this template, research the involved technologies.

Headers

With the debug setting disabled in the Kirby configuration, the site will set hardened security HTTP headers.

You can edit the headers in the header.php snippet.

Panel

It's further recommended to setup the path to the administration panel to something else than /panelin the kirby configuration.

The recommended panel setup (3FA) would be:

  1. Secret path to the panel
  2. Strong password
  3. Additional Authentication Factors (Email, TOTP)
Permissions

Setup strong user permissions setup in the administration panel.

SMTP

If you want to send emails from the site (e.g., from a form) it's recommended to setup a postfix SMTP server configured with loopback_only and DANE security level.

To configure kirby to send emails using the SMTP server, refer to the kirby dokumentation.

Dokku

To deploy your application using Dokku, follow these general steps:

  1. Set up a Dokku instance and configure it.
  2. Add your Dokku server as a remote:
git remote add <remote-app-prod> dokku@your-server:<remote-app>

Deploy your application:

git push <remote-app-prod> prod

For more details on deploying with Dokku, refer to the Dokku documentation.

Contributing

Feel free to open issues or pull requests for improvements, bug fixes, or new features.

About

🐱 kirby-htmx-alpine-tailwind | Kirby CMS + Vite Kit using Htmx, AlpineJs and TailwindCSS and set up for continous deployment on dokku/heroku PaaS.

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Languages

  • PHP 58.3%
  • JavaScript 23.6%
  • CSS 17.4%
  • Procfile 0.7%