A high-performance, enterprise-grade web application boilerplate built with Astro 5, Svelte 5, and Tailwind CSS v4.
This repository hosts a high-performance, enterprise-grade web application boilerplate built with Astro 5. It is architected for scalability, hybrid rendering, and visual content management.
The project combines the raw performance of Astro's server-side rendering (SSR) with Svelte 5's next-generation reactivity for interactive islands. It features a robust UI system based on Tailwind CSS v4 and Shadcn/UI architecture, all powered by Storyblok as a Headless CMS.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
Get up and running in less than 5 minutes.
To successfully run this project, you will need the following installed on your development machine:
# Node.js v20.0.0 or higher (LTS recommended)
node -v
# pnpm v9.x (Strictly enforced via CI)
pnpm -v
Follow this step-by-step series of examples to get your development environment running.
1. Clone the Repository
Start by cloning the repository to your local machine.
git clone \[https://github.com/adammerrill/AstroJS-template.git\](https://github.com/adammerrill/AstroJS-template.git)
cd AstroJS-template
2. Install Dependencies
This project uses pnpm to ensure strict dependency management and faster installation.
pnpm install
3. Environment Configuration
Create a .env file in the root directory by copying the example file.
cp .env.example .env
You must configure the following variables in your new .env file. These are required for the astro.config.mjs loader and Storyblok integration:
\# Base URL used for sitemap generation and canonical URLs
SITE\_URL="http://localhost:4321"
\# Storyblok Access Token (Found in Storyblok: Settings \-\> Access Tokens \-\> Preview)
STORYBLOK\_TOKEN="your\_storyblok\_preview\_token\_here"
4. Sync Content Types
Synchronize your local Astro types with your integrations (like Storyblok) to ensure type safety.
pnpm astro sync
5. Start the Development Server
Launch the local development server with Hot Module Replacement (HMR).
pnpm dev
You can now access the application at http://localhost:4321.
If you need to test the application on a mobile device connected to the same network, use the host command:
pnpm dev:host
This system employs a robust testing strategy combining End-to-End (E2E) testing with static analysis and coding style checks.
We use Playwright for E2E testing to simulate real user interactions across multiple browsers and device viewports.
To run the full test suite using our custom CI wrapper (which handles server lifecycle and reporting):
pnpm test
This command executes scripts/ci-wrapper.ts, which:
If you want to debug tests with the interactive UI:
pnpm test:e2e:ui
We use a combination of ESLint, Prettier, TypeScript, and a custom Style Auditor to ensure code quality.
Linting & Type Checking:
\# Run ESLint
pnpm lint
\# Run TypeScript Type Check
pnpm typecheck
\# Run Astro Template Check
pnpm check
Style Risk Audit:
We include a custom static analysis tool (audit-styles.js) that scans the codebase for high-risk CSS patterns, such as inline styles or excessive use of Tailwind arbitrary values (e.g., w-[53px]).
node audit-styles.js
The project follows a strict modular architecture:
/
βββ public/ \# Static assets (favicons, robots.txt)
βββ src/
β βββ assets/ \# Optimized assets (SVGs, Images)
β βββ components/ \# UI Components (Header, Footer, Shadcn primitives)
β βββ layouts/ \# Global layouts (Layout.astro)
β βββ lib/ \# Utilities (cn helper for Tailwind)
β βββ pages/ \# Astro routes & Storyblok \[...slug\] entry point
β βββ storyblok/ \# Svelte components mapped to CMS blocks
β βββ styles/ \# Global CSS, Tailwind directives, & Theme vars
βββ astro.config.mjs \# Configuration for Integrations & Vercel Adapter
βββ components.json \# Shadcn/UI configuration
βββ package.json \# Project dependencies
The project is pre-configured for Vercel serverless deployment via the @astrojs/vercel adapter.
The astro.config.mjs is already set up to use vercel() as the adapter, ensuring SSR functions work correctly in the serverless environment.
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us. (Note: File to be created).
We use SemVer for versioning. For the versions available, see the tags on this repository.
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE file for details.