{"id":25949778,"url":"https://github.com/jipok/jalpine","last_synced_at":"2026-03-04T06:33:29.061Z","repository":{"id":279607280,"uuid":"939362390","full_name":"Jipok/JAlpine","owner":"Jipok","description":"Proof of concept integration of Go + Alpine.js for building SPAs with JSON APIs. No Node.js, no build steps, just a clean developer experience. Features Todo app demo.","archived":false,"fork":false,"pushed_at":"2025-03-07T16:35:02.000Z","size":26,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-07T17:32:10.521Z","etag":null,"topics":["alpinejs","go","golang","lightweight","microframework","no-npm","proof-of-concept","reactive","todo"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Jipok.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-26T12:22:52.000Z","updated_at":"2025-03-07T16:35:05.000Z","dependencies_parsed_at":"2025-02-26T13:33:04.019Z","dependency_job_id":"ff1d60f9-5430-4235-995b-67779b5c6b6b","html_url":"https://github.com/Jipok/JAlpine","commit_stats":null,"previous_names":["jipok/jalpine"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Jipok/JAlpine","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jipok%2FJAlpine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jipok%2FJAlpine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jipok%2FJAlpine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jipok%2FJAlpine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Jipok","download_url":"https://codeload.github.com/Jipok/JAlpine/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jipok%2FJAlpine/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263484397,"owners_count":23473753,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["alpinejs","go","golang","lightweight","microframework","no-npm","proof-of-concept","reactive","todo"],"created_at":"2025-03-04T12:29:04.417Z","updated_at":"2025-09-26T11:50:46.320Z","avatar_url":"https://github.com/Jipok.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JAlpine: A Go + Alpine.js Micro-Framework\n\n\u003e [!IMPORTANT]\n\u003e **Proof of Concept: Alternative Alpine.js Usage**  \n\u003e \n\u003e This project demonstrates an **experimental approach** to Alpine.js usage. While Alpine.js was designed primarily for enhancing server-rendered HTML (as used with Laravel Livewire or go templ), JAlpine repurposes it as a SPA framework with JSON API communication.\n\u003e\n\u003e This architectural pattern diverges from Alpine's intended use case but explores its potential for lightweight Go-backed SPAs without complex frontend tooling. Consider it an interesting experiment rather than a production-ready solution.\n\u003e\n\u003e *This README was generated with Anthropic Claude 3.7 Sonnet.* Sorry for that\n\nJAlpine is a lightweight micro-framework that seamlessly integrates Go on the backend with Alpine.js on the frontend. It provides a simple yet powerful way to build interactive web applications with minimal boilerplate.\n\nDEMO: https://alpine.jipok.ru/\n\n## Features\n\n- **Zero-build frontend** - No Node.js, webpack, or complex build setup required\n- **Server-side template handling** with dynamic includes and hot-reloading\n- **Automatic dependency management** for external libraries (Alpine.js, Tailwind CSS)\n- **Component-namespaced data binding** between server and client\n- **Integrated AJAX helpers** via Alpine.js magic methods\n- **Form validation** using go-playground/validator\n- **Hot code reload detection** with automatic client refresh\n\n## How It Works\n\nJAlpine brings together the simplicity of Alpine.js with the performance of Go:\n\n1. **Backend**: Go handles routing, data persistence, and HTML template rendering\n2. **Frontend**: Alpine.js provides reactive data binding and DOM manipulation\n3. **Integration**: JTemplate connects the two worlds with automatic data synchronization\n\nThe framework handles the complexities of:\n\n- Downloading and managing frontend dependencies\n- Injecting scripts and styles into HTML\n- Processing template includes and component definitions\n- Synchronizing component state between server and client\n\n## Demo Todo Application\n\nThe included Todo app demonstrates JAlpine's capabilities:\n\n- Create, toggle, and delete todos\n- Filter todos by status (all, active, completed)\n- Clear completed todos\n- Server-side validation\n- Real-time UI updates without page reloads\n- Automatic version checking for hot reloads\n\n### Installation\n\n1. Clone this repository:\n   ```\n   git clone https://github.com/yourusername/jalpine.git\n   cd jalpine\n   ```\n\n2. Run the application:\n   ```\n   go run *.go\n   ```\n\n3. Open your browser at [http://localhost:8080](http://localhost:8080)\n\n## Technical Details\n\n### Core Components\n\n#### JTemplate\n\nThe template engine handles:\n- Dynamic file includes (`\u003c% include file %\u003e`)\n- Source mapping for debugging\n- Alpine.js component integration\n- Version tracking for hot reloads\n\n#### Static Library Management\n\nAutomatically downloads and manages:\n- Alpine.js core and plugins\n- Tailwind CSS\n- Other frontend dependencies\n\n#### AJAX Integration\n\nProvides seamless API communication through Alpine.js magic methods:\n- `$get(url)`\n- `$post(url, data)`\n- `$put(url, data)`\n- `$patch(url, data)`\n- `$delete(url, data)`\n\n`data` is optional\n\n### Directory Structure\n\n```\n├── static/              # Auto-generated frontend dependencies\n├── index.html           # Main template\n├── main.go              # Application entrypoint and routes\n├── template.go          # Template engine implementation\n├── helpers.js           # Client-side helpers\n└── data.db              # BuntDB database file (auto-created)\n```\n\n## Why Use JAlpine?\n\nJAlpine is perfect for:\n\n- Small to medium web applications\n- Projects that need rapid development\n- Teams that prefer Go on the backend\n- Developers who want Alpine.js simplicity without complex frontend tooling\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjipok%2Fjalpine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjipok%2Fjalpine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjipok%2Fjalpine/lists"}