astro-v5-template Svelte Themes

Astro V5 Template

Production-ready Astro 5 starter template with Tailwind CSS v4, Atlas Design System, Svelte 5, and ready-to-use components

πŸš€ Astro V5 Template - Modern Web Starter

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


⚑ Quick Start

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! πŸŽ‰

🎁 What's New in This Version

  • πŸš€ Astro 5.14.1 - Latest features and performance improvements
  • 🎨 Atlas Design System - Beautiful glass effects, gradients, and animations
  • πŸ“ Enhanced Blog System - Atlas-styled blog cards with featured variants
  • 🎯 Improved UX - German localization and better accessibility
  • ⚑ Svelte 5.39.8 - Reactive components with runes API
  • πŸ“Š Web Vitals Monitoring - Built-in performance tracking
  • πŸ” SEO Optimized - Comprehensive meta tags and sitemaps

🎯 Features & Highlights

✨ Interactive Template Configuration

Customize your template with the interactive setup:

npm run setup

Choose your features:

  • πŸ“ Blog System - Full MDX blog with RSS feed
  • πŸ”Œ API Routes - Server-side endpoints for forms
  • πŸ“§ Newsletter - Email signup with validation
  • πŸ“ž Contact Form - Ready-to-use contact forms
  • 🎯 SEO Optimization - Meta tags and analytics

🏠 Production-Ready Components

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

πŸš€ Modern Tech Stack

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

βš™οΈ Developer Experience

  • ⚑ Instant Hot Reload - See changes immediately
  • πŸ› Pre-configured Linting - Biome + Prettier setup
  • πŸͺ Git Hooks - Auto-format on commit with Husky
  • 🎨 VS Code Ready - Extensions and settings included
  • πŸ”’ Type-Safe Environment - Validated with Zod schema
  • πŸ“‹ Performance Reports - Built-in Lighthouse integration

πŸ“¦ Project Structure

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
  1. Update your site configuration:
    PUBLIC_SITE_NAME="Your Site Name"
    PUBLIC_SITE_URL="https://yoursite.com"
    PUBLIC_ENABLE_ANALYTICS="true"
    PUBLIC_ENABLE_DARK_MODE="true"
    

🎨 Theming & Styling

Tailwind Configuration:

  • Edit src/styles/tailwind.css for custom theme variables
  • Modify color scheme in Tailwind's theme configuration
  • Use CSS custom properties for consistent theming

Component Styling:

<!-- Example: Custom hero with your brand colors -->
<Hero 
  title="Your Brand Message"
  subtitle="Your compelling description"
  ctaText="Get Started"
  ctaLink="/contact"
/>

πŸ“ Content Management

Blog Posts:

  • Add .mdx files to src/content/blog/
  • Use frontmatter for metadata:
    ---
    title: "Your Post Title"
    description: "Post description"
    date: 2024-01-01
    author: "Your Name"
    tags: ["tag1", "tag2"]
    ---
    

Pages:

  • Create .astro files in src/pages/
  • Use layouts from src/layouts/
  • Leverage components from src/components/

πŸ”Œ API Integration

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 }));
}

πŸš€ Deployment

Platform Deploy Button Features
Vercel Zero-config, edge functions, analytics
Netlify Form handling, split testing
Cloudflare Pages Manual setup Global CDN, Workers integration

Manual Deployment

# Build for production
npm run build

# The 'dist' folder contains your built site
# Upload this folder to any static hosting provider

Environment Variables for Production

Set these in your deployment platform:

PUBLIC_SITE_URL=https://yourdomain.com
PUBLIC_SITE_NAME=Your Site Name
PUBLIC_ENABLE_ANALYTICS=true

πŸ“Š Performance & Analytics

Built-in Web Vitals Monitoring

The template includes real-time performance monitoring:

  • LCP (Largest Contentful Paint)
  • FID (First Input Delay)
  • CLS (Cumulative Layout Shift)
  • FCP (First Contentful Paint)
  • TTFB (Time to First Byte)

Enable debug mode during development:

<WebVitals debug={true} />

For advanced analysis: πŸ” AuditMySite Studio

Lighthouse Integration

# Generate performance report
npm run lighthouse

# Report saved as lighthouse-report.html

πŸ“ Component Examples

Hero Section

<Hero 
  title="Welcome to My Site"
  subtitle="Build something amazing"
  ctaText="Get Started"
  ctaLink="/contact"
  secondaryCtaText="Learn More"
  secondaryCtaLink="/about"
/>

Card Variants

<!-- 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"
/>

πŸ†• BlogCard Component

<!-- 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"
/>

Toast Notifications

// 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 Component

<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

Pull Request Guidelines

  • Follow existing code style and conventions
  • Include tests for new features
  • Update documentation as needed
  • Keep commits atomic and well-described

πŸ“œ Documentation


βš–οΈ License

This project is licensed under the MIT License - see the LICENSE file for details.

What this means:

  • βœ… Commercial use - Use it for your business projects
  • βœ… Modification - Adapt it to your needs
  • βœ… Distribution - Share it with others
  • βœ… Private use - Use it in private projects

πŸ™ Credits & Acknowledgments

Built With

Performance Analysis

Community

Built with β™₯️ by the Casoon team and contributors.


⬆️ Back to Top

If this template helped you, please consider ⭐ starring the repo!


πŸ’‘ Tips & Best Practices

  1. Keep it Fast - Astro ships 0 JS by default. Add interactivity only where needed.
  2. Atlas Glass Effects - Use cs-glass classes for modern glassmorphism
  3. Blog Variants - Featured posts automatically use enhanced styling
  4. German Localization - Blog components include German text by default
  5. Type Everything - Full TypeScript support is configured
  6. Mobile First - All components are responsive by default
  7. Performance - Atlas effects are optimized for smooth animations

πŸ“– Documentation


🀝 Contributing

Found a bug? Have a feature request? PRs welcome!

  1. Fork the repository
  2. Create your feature branch
  3. Commit changes
  4. Push to the branch
  5. Open a Pull Request

πŸ“„ License

MIT License - feel free to use this template for any project!


Built with ❀️ by the Astro community

⭐ Star this repo if it helped you!

Top categories

Loading Svelte Themes