Unleash Your Inner Web Ninja with the HALT Stack đĨˇ
Enter the realm of web development where HTMX, AlpineJS, Laravel, and Tailwind CSS form a formidable alliance to accelerate your coding skills like a caffeine-fueled, deadline-driven programmer!
Enter the realm of web development where HTMX, AlpineJS, Laravel, and Tailwind CSS form a formidable alliance to accelerate your coding skills like a caffeine-fueled, deadline-driven programmer!
HTMX: Meet the HTML Crusader! This featherlight library allows you to build cutting-edge, dynamic Web applications without being overwhelmed by a flood of JavaScript frameworks.
AlpineJS: Immerse yourself in the Zen of JavaScript with this minimalist framework, ideal for building interactive elements with a simplicity that even your grandmother could decipher.
Laravel: Behold Laravel, the PHP juggernaut! Build unyielding backends with elegant syntax, powerful tools, and a community friendlier than a congregation of cuddly kittens.
Tailwind CSS: Beautify your applications with Tailwind CSS, the utility-centric CSS maestro that makes responsive, maintainable, and customizable designs a breeze.
Love the supercharged power of the HALT stack? We encourage you to check out each of our stellar tools - HTMX, AlpineJS, Laravel, and Tailwind CSS. Dive deeper into their brilliance, take advantage of their capabilities, and if you like what you see (and we bet you will), consider supporting their creators.
Your support will not only ensure the continued growth and improvement of these amazing tools, but will also help fan the flames of innovation in the web development world. So, why wait? Explore the awesomeness of HALT's components and help us keep the web development universe expanding at the speed of light!
Before creating a Laravel project, you need to make sure that PHP and Composer are installed on your local machine. You will also need to install Node and NPM.
After installing PHP and Composer, you can create a new Laravel project using Composer's
create-project
command:
$ composer create-project laravel/laravel example-halt-app
$ cd example-halt-app
To install HTMX, Alpine.js, Tailwind CSS and its peer dependencies, run the following command:
$ npm install -D htmx.org alpinejs tailwindcss postcss autoprefixer
Run the init command to create both tailwind.config.js
and
postcss.config.js
:
$ npx tailwindcss init -p
In the tailwind.config.js
file, add the paths to all your
template files.
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
"./resources/**/*.blade.php",
"./resources/**/*.js",
],
theme: {
extend: {},
},
plugins: [],
}
In your ./resources/css/app.css
file, add the @tailwind
directives for each of Tailwind's layers.
@tailwind base;
@tailwind components;
@tailwind utilities;
Import Alpine.js and Htmx into your
bundle, then initialize them in ./resources/js/app.js
.
import Alpine from 'alpinejs'
import Htmx from 'htmx.org'
window.Alpine = Alpine
window.Htmx = Htmx
Alpine.start()
Use npm run dev
to run your build process.
$ npm run dev
Make sure your compiled CSS and JS are included in the
.
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
@vite('resources/css/app.css')
@vite('resources/js/app.js')
</head>
<body>
<h1 class="text-3xl font-bold underline">
Hello world!
</h1>
</body>
</html>
After you have created the project and installed all the libraries, use Laravel's Artisan CLI
serve
command to start local development:
$ php artisan serve
Once you have started the Artisan development server, your application will be available at http://localhost:8000.
We'd be remiss if we didn't take a moment to thank the wonderful organizations that keep the HALT stack ship running smoothly. Thanks to their unwavering support, we're able to continue brewing the perfect potion of HTMX, AlpineJS, Laravel, and Tailwind CSS that you all love.