myfy-frontend
Frontend module for myfy with Tailwind 4, DaisyUI 5, Vite, and Jinja2.
Features
- 🎨 DaisyUI 5 - Complete component library
- ⚡ Tailwind 4 - Native CSS engine, faster builds
- 🔥 Vite - Lightning-fast HMR and bundling
- 📝 Jinja2 - Server-side template rendering
- 🌗 Dark Mode - Built-in theme switcher
- 🚀 Zero Config - Works out of the box
Installation
pip install myfy-frontend
Quick Start
from myfy.core import Application
from myfy.web import WebModule
from myfy.frontend import FrontendModule, render_template
from myfy.web import route
# Add the frontend module
app = Application(auto_discover=False)
app.add_module(WebModule())
app.add_module(FrontendModule())
# Create a route
@route.get("/")
async def home():
return render_template("home.html", title="Welcome")
What Happens on First Run
- Detects missing
frontend/directory - Copies template files and configurations
- Installs Node.js dependencies (Tailwind 4, DaisyUI 5, Vite)
- Starts Vite dev server
- Ready to use!
Project Structure (After Init)
your-project/
├── frontend/
│ ├── css/
│ │ └── input.css # Tailwind imports
│ ├── js/
│ │ ├── main.js
│ │ └── theme-switcher.js
│ ├── templates/
│ │ ├── base.html # Base layout
│ │ └── components/ # DaisyUI macros
│ └── static/
│ └── dist/ # Built assets (gitignored)
├── package.json
├── vite.config.js
└── app.py
Creating Templates
{% extends "base.html" %}
{% from "components/navbar.html" import navbar %}
{% block content %}
{{ navbar(logo="MyApp") }}
<div class="hero min-h-screen bg-base-200">
<div class="hero-content text-center">
<h1 class="text-5xl font-bold">Hello DaisyUI 5!</h1>
<button class="btn btn-primary">Get Started</button>
</div>
</div>
{% endblock %}
Development vs Production
Development:
- Vite dev server on
localhost:3001 - Hot module replacement (HMR)
- Auto-reload on template changes
Production:
- Optimized CSS/JS bundles
- Asset hashing for cache busting
- Gzip compression
CLI Commands
# Initialize frontend (manual)
uv run myfy frontend init
# Build for production
uv run myfy frontend build
# Start dev server
uv run myfy frontend dev
License
MIT
Release files for myfy-frontend 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| myfy_frontend-0.1.2.tar.gz | 17.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| myfy_frontend-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 44.8 kB
Release files / myfy_frontend-0.1.2.tar.gz
| Download URL | myfy_frontend-0.1.2.tar.gz |
|---|---|
| Size | 17.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
95bc00b9ad8fcdc201ab179f388be47f82e85ab46511208d9141db36fc40469f
|
|
BLAKE2b-256 checksum How to use checksums |
f3a78cd4657f6f2e051bee053ee94a3e10a46a579103c92034c821f90b8be6b8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 16, 2025.
Transparency logRelease files / myfy_frontend-0.1.2-py3-none-any.whl
| Download URL | myfy_frontend-0.1.2-py3-none-any.whl |
|---|---|
| Size | 27.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a9e73eb17574cab9130f2977868fe026e407a0f944713142b9562d5ab9685757
|
|
BLAKE2b-256 checksum How to use checksums |
af470b6d2e5919f31460960e9477e8aa048cf47bc7be6bfd7549b4c74b28aa51
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 16, 2025.
Transparency log