A production-ready Astro starter template featuring the latest web technologies. Build lightning-fast websites with beautiful UI components, comprehensive tooling, and modern development practices.
π Live Demo | π¦ Use Template | π Web Vitals Analysis
Get your project running in under 60 seconds:
# Option 1: Use GitHub template (recommended)
# Click "Use this template" button on GitHub
# Option 2: Clone with degit
npx degit casoon/astro-v5-template my-project
cd my-project
# Install and configure
npm install
npm run setup # π Interactive template configuration
npm run dev
Open http://localhost:4321 - You're ready to build! π
Customize your template with the interactive setup:
npm run setup
Choose your features:
Component | Description | Features |
---|---|---|
Hero Section | Eye-catching landing area | Gradient backgrounds, CTA buttons, floating orbs |
Navigation | Responsive navbar | Mobile menu, theme toggle, glass effects |
Blog System | π Atlas-styled blog | Featured cards, glass effects, German localization |
BlogCard Component | π Flexible blog cards | 3 variants: default, featured, minimal with animations |
Cards | Flexible card system | 4 variants: default, glass, gradient, outline |
Forms | Contact & newsletter | Validation, API integration, success states |
Modal System | Dialog components | Backdrop blur, animations |
Toast Notifications | User feedback | Success, error, warning, info states |
SEO Component | Meta tag management | Open Graph, Twitter Cards, JSON-LD |
Web Vitals | Performance monitoring | Real-time metrics with debug overlay |
Technology | Version | Purpose |
---|---|---|
Astro | 5.14.1 | Static site generator with islands architecture |
Atlas Design System | 0.0.4 | π Glass effects, gradients, and modern UI components |
Tailwind CSS | 4.1.14 | Utility-first CSS framework |
Svelte | 5.39.8 | Reactive components with runes API |
TypeScript | 5.9.3 | Type safety and better DX |
Zod | 4.1.11 | Runtime type validation |
Biome | 2.2.5 | Fast linter and formatter |
astro-v5-template/
βββ π src/
β βββ π§© components/ # Reusable UI components
β β βββ π Hero.astro # Landing hero section
β β βββ π§ Navbar.astro # Navigation with theme toggle
β β βββ π Card.astro # Flexible card system
β β βββ π BlogCard.astro # π Atlas-styled blog cards
β β βββ π¨ GlassCard.astro # Glass effect cards
β β βββ π ContactForm.astro # Contact form with validation
β β βββ π§ Newsletter.astro # Newsletter signup
β β βββ π§ Modal.astro # Modal dialog system
β β βββ π Toast.astro # Notification toasts
β β βββ π SEO.astro # SEO meta tags
β β βββ π WebVitals.astro # Performance monitoring
β βββ π pages/
β β βββ π api/ # Server-side API routes
β β β βββ contact.ts # Contact form handler
β β β βββ newsletter.ts # Newsletter signup
β β β βββ hello.ts # API example
β β β βββ users.ts # Users API example
β β βββ π blog/ # π Atlas-enhanced MDX blog system
β β β βββ index.astro # Blog overview with Atlas cards
β β β βββ [...slug].astro # Blog posts with glass effects
β β βββ π index.astro # Homepage
β β βββ π contact.astro # Contact page
β β βββ π« 404.astro # Custom 404 page
β β βββ πΊοΈ rss.xml.js # RSS feed
β βββ π layouts/ # Page layouts
β β βββ BaseLayout.astro # Main layout template
β βββ π content/ # Content collections
β β βββ config.ts # Content config
β β βββ blog/ # Blog posts (MDX)
β βββ π¨ styles/ # Global styles
β βββ global.css # Global CSS
β βββ tailwind.css # Tailwind imports
βββ π setup.js # Interactive template setup
βββ βοΈ template.config.js # Template configuration
βββ π¦ package.json # Dependencies and scripts
---
## π οΈ Available Commands
### π **Development**
| Command | Description |
|---------|-------------|
| `npm run dev` / `npm start` | Start development server on port 4321 |
| `npm run setup` | π Interactive template configuration |
| `npm run clean` | Clean build artifacts and cache |
### π **Build & Deploy**
| Command | Description |
|---------|-------------|
| `npm run build` | Type-check and build for production |
| `npm run build:fast` | Build without type checking (faster) |
| `npm run preview` | Preview production build locally |
### π¨ **Code Quality**
| Command | Description |
|---------|-------------|
| `npm run format` | Format all code with Biome & Prettier |
| `npm run check` | Run all linting and format checks |
| `npm run type-check` | Run Astro TypeScript checks |
### π **Analysis & Maintenance**
| Command | Description |
|---------|-------------|
| `npm run lighthouse` | Generate Lighthouse performance report |
| `npm run update-deps` | Update all dependencies safely |
> **π‘ Pro Tip:** Use `npm run lighthouse` after building to analyze your site's performance, accessibility, and SEO metrics.
---
## π¨ Customization Guide
### π§ **Environment Setup**
1. Copy the environment template:
```bash
cp env.example .env
PUBLIC_SITE_NAME="Your Site Name"
PUBLIC_SITE_URL="https://yoursite.com"
PUBLIC_ENABLE_ANALYTICS="true"
PUBLIC_ENABLE_DARK_MODE="true"
Tailwind Configuration:
src/styles/tailwind.css
for custom theme variablesComponent Styling:
<!-- Example: Custom hero with your brand colors -->
<Hero
title="Your Brand Message"
subtitle="Your compelling description"
ctaText="Get Started"
ctaLink="/contact"
/>
Blog Posts:
.mdx
files to src/content/blog/
---
title: "Your Post Title"
description: "Post description"
date: 2024-01-01
author: "Your Name"
tags: ["tag1", "tag2"]
---
Pages:
.astro
files in src/pages/
src/layouts/
src/components/
Form Handlers:
// src/pages/api/custom-form.ts
export async function POST({ request }) {
const data = await request.formData();
// Process your form data
return new Response(JSON.stringify({ success: true }));
}
Platform | Deploy Button | Features |
---|---|---|
Vercel | Zero-config, edge functions, analytics | |
Netlify | Form handling, split testing | |
Cloudflare Pages | Manual setup | Global CDN, Workers integration |
# Build for production
npm run build
# The 'dist' folder contains your built site
# Upload this folder to any static hosting provider
Set these in your deployment platform:
PUBLIC_SITE_URL=https://yourdomain.com
PUBLIC_SITE_NAME=Your Site Name
PUBLIC_ENABLE_ANALYTICS=true
The template includes real-time performance monitoring:
Enable debug mode during development:
<WebVitals debug={true} />
For advanced analysis: π AuditMySite Studio
# Generate performance report
npm run lighthouse
# Report saved as lighthouse-report.html
<Hero
title="Welcome to My Site"
subtitle="Build something amazing"
ctaText="Get Started"
ctaLink="/contact"
secondaryCtaText="Learn More"
secondaryCtaLink="/about"
/>
<!-- Default Card -->
<Card
title="Feature Name"
description="Feature description"
href="/learn-more"
tag="New"
/>
<!-- Glass Effect Card -->
<Card
variant="glass"
title="Premium Feature"
description="Enhanced with glass effects"
/>
<!-- Gradient Card -->
<Card
variant="gradient"
title="Featured Content"
description="Eye-catching gradient background"
/>
<!-- Featured Blog Post -->
<BlogCard
title="Getting Started with Atlas"
description="Learn the Atlas Design System"
date="2024-01-01"
author="Your Name"
image="/blog/image.jpg"
slug="getting-started"
tags={["Astro", "Atlas", "Tutorial"]}
variant="featured"
/>
<!-- Default Blog Post -->
<BlogCard
title="Another Great Post"
description="More awesome content"
date="2024-01-02"
slug="another-post"
variant="default"
/>
<!-- Minimal Blog Post -->
<BlogCard
title="Quick Tip"
date="2024-01-03"
slug="quick-tip"
variant="minimal"
/>
// Success notification
window.showToast('Form submitted successfully!', 'success');
// Error notification
window.showToast('Something went wrong', 'error');
// Info notification
window.showToast('Please check your email', 'info', 5000);
<SEO
title="Page Title"
description="Page description for search engines"
image="/og-image.jpg"
type="article"
publishedTime="2024-01-01"
author="Author Name"
/>
---
## π€ Contributing
We welcome contributions! Here's how you can help:
### **Reporting Issues**
- π [Report bugs](https://github.com/casoon/astro-v5-template/issues/new?template=bug_report.md)
- π‘ [Request features](https://github.com/casoon/astro-v5-template/issues/new?template=feature_request.md)
- π¬ [Join discussions](https://github.com/casoon/astro-v5-template/discussions)
### **Development Setup**
```bash
# Fork and clone the repo
git clone https://github.com/your-username/astro-v5-template.git
cd astro-v5-template
# Install dependencies
npm install
# Start development server
npm run dev
# Make your changes and run tests
npm run build
npm run check
This project is licensed under the MIT License - see the LICENSE file for details.
Built with β₯οΈ by the Casoon team and contributors.
cs-glass
classes for modern glassmorphismFound a bug? Have a feature request? PRs welcome!
MIT License - feel free to use this template for any project!
Built with β€οΈ by the Astro community
β Star this repo if it helped you!