deno-frontend

Build server-rendered frontends in Deno with Fresh, islands, and Preact.

Updated Dec 28, 2023
One-click install
npx skills add https://github.com/Immanuel-Detmold/cafe --skill deno-frontend-immanuel-detmold
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: deno-frontend
Source: https://github.com/Immanuel-Detmold/cafe/tree/main/.agents/skills/deno/deno-frontend
Command: npx skills add https://github.com/Immanuel-Detmold/cafe --skill deno-frontend-immanuel-detmold

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Build server-rendered frontends in Deno using Fresh, islands, and Preact, simplifying routing, component islands, and styling workflows.

Core Features & Use Cases

  • Fresh 2.x frontend development with route handlers, islands, and server components
  • Migration guidance from Fresh 1.x to 2.x, including updated imports and patterns
  • Tailwind CSS integration and Preact usage for modern UI development
  • End-to-end examples for building and styling server-rendered pages with islands
  • Clear guidance for dev tooling (vite) and project structure in Deno projects

Quick Start

Create a new Fresh project with deno run -Ar jsr:@fresh/init and start adding routes, islands, and Tailwind styling

Frequently Asked Questions about deno-frontend

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a server-rendered frontend in Deno using Fresh and Preact?

Build server-rendered frontends in Deno using Fresh by leveraging route handlers, islands, and Preact components. Create a new project with deno run -Ar jsr:@fresh/init, then define routes and islands to structure your application architecture.

How do I migrate a Fresh 1.x project to Fresh 2.x?

Migrate Fresh 1.x projects to 2.x by updating imports and adopting new patterns like single-context handlers and Vite-based development configuration. The migration involves adjusting route handlers and server components to align with the updated Fresh 2.x architecture.

Does Fresh 2.x work with Tailwind CSS for styling islands and server components?

Yes, Fresh 2.x works with Tailwind CSS for styling islands and server components. Integrate Tailwind CSS into your Deno project to style modern UI elements, ensuring scalable frontend architectures across your server-rendered pages.

What is the best way to structure routes and islands in a Deno Fresh project?

Structure routes and islands in a Deno Fresh project by using route handlers for server-side logic and Preact islands for client-side interactivity. This pattern ensures scalable frontend architectures by isolating hydration to specific interactive components.

Can I use Vite for development configuration in a Fresh 2.x Deno project?

Yes, you can use Vite for development configuration in a Fresh 2.x Deno project. Fresh 2.x supports Vite-based development configuration to manage static assets, streamline dev tooling, and ensure proper project structure setup.

When should I use islands architecture instead of full client-side rendering in Deno?

Use islands architecture in Deno instead of full client-side rendering when you need server-rendered pages with selective interactivity. This approach hydrates individual Preact components, reducing JavaScript payload and improving initial page load performance.