An independent distribution for Astro 7

Astro
Add what you need.

A configured project, ready for your own source.
Choose integrations now, then add more as your site grows.

npx @samline/astro my-site

Create your project with npm, pnpm or Bun.

SSG by defaultAdd integrations laterEditable source

Choose a setup task

Create a project

Create a projectSetup example

Start with the core configuration and a simple homepage. Optional integrations are omitted until you choose to add them.

Where to run it
The parent folder where you keep your projects.
Before you start
Node 22.23.4 or newer, with your chosen package manager available. Use a new or empty folder named my-site.

npm

Terminal
npx @samline/astro my-site --minimal --deploy static --locale en-us

pnpm

Terminal
pnpm dlx @samline/astro my-site --minimal --deploy static --locale en-us

Bun

Terminal
bunx @samline/astro my-site --minimal --deploy static --locale en-us

What you get

The installer creates my-site with Astro, Tailwind, local fonts, SEO components, a homepage and English dictionaries. Dependency installation uses the selected manager; add --package-manager npm, pnpm or bun to choose explicitly.

Files added or configured
my-site/
  astro.config.mjs
  src/layouts/Main.astro
  src/sections/Home/
  src/i18n/dictionaries/en-us/
  public/img/  public/docs/  public/video/

No server adapter is installed. This project builds files for static hosting; server features need a compatible adapter and runtime.

What to do next

Run cd my-site, then the development command in the generated README (npm run dev, pnpm run dev or bun run dev). Edit src/sections/Home/index.astro to build your homepage.

Read the setup guide

Add Fields

Add FieldsSetup example

Add Astro components for native form controls, together with @samline/forms and @samline/formatter. You still create the form section and choose its submission handler.

Where to run it
Your generated project root: the folder containing package.json and astro.config.mjs.
Before you start
A project created by this modular installer. Create the project in the first recipe before running add.

npm

Terminal
npx @samline/astro add fields

pnpm

Terminal
pnpm dlx @samline/astro add fields

Bun

Terminal
bunx @samline/astro add fields

What you get

Form, Input, Select and the other Fields components, their styles and API docs, plus the package usage guide in src/forms. Both package dependencies are included.

Files added or configured
src/components/Fields/
src/forms/README.md
src/i18n/dictionaries/<your-locale>/forms/

Dependencies: @samline/forms, @samline/formatter

To add the packages and usage guide without the Fields components, run npx @samline/astro add forms and decline Fields when prompted.

What to do next

Read src/components/Fields/README.md, then compose Form, Input and Button inside your own section. Add labels to your dictionaries and connect an Action or endpoint before expecting submission to work.

Read the setup guide

Add content

Add contentSetup example

Register a collection named articles with a schema and local sample data. This prepares content to query; you still build the article list and pages.

Where to run it
Your generated project root: the folder containing package.json and astro.config.mjs.
Before you start
A project created by this modular installer. The collection name articles must not conflict with your own source.

npm

Terminal
npx @samline/astro add content --source local --collection articles

pnpm

Terminal
pnpm dlx @samline/astro add content --source local --collection articles

Bun

Terminal
bunx @samline/astro add content --source local --collection articles

What you get

src/content.config.ts registers articles. The example stores locale, a dictionary copy key, a date and a draft flag in JSON, with display text in the content dictionary. It works offline.

Files added or configured
src/content.config.ts
src/content/articles/
  README.md
  index.ts
  data/

Choose API, Strapi, Shopify or another service when content lives elsewhere. Those examples need your source schema, credentials and explicit activation.

What to do next

Open src/content/articles/README.md for the getCollection example. Query articles from your content section, resolve the sample copy key through the dictionary, then replace the example with your project’s content model.

Read the setup guide

Use these commands to create a project or add integrations. Choose your package manager, then follow the setup guide for the generated files.

Choose your deployment target

Static Vercel Netlify Cloudflare Custom
01 / What the starter includes

Less setup.
A clear starting point.

Only what you select

Choose optional integrations in the wizard. Features you omit leave out their source, dependencies and configuration.

Clear UI composition

Pages compose a layout, sections and reusable components. Section handles spacing; Box handles width. Component API docs stay beside the source.

Add integrations later

Run add from a generated project to include a missing integration. The installer checks supported structures and reports conflicts before applying the planned files.

A language you choose

Start in English, Spanish for Mexico or Spanish for Spain. Custom languages use empty dictionaries; later additions follow your project’s current keys.

Configured tools

Astro 7, TypeScript, Tailwind 4, Prettier and local fonts. Choose npm, pnpm or Bun for dependencies, and Node.js or Bun for project scripts.

Astro stays Astro

@samline/astro prepares the project and integration examples. Astro provides routing, rendering, islands, Actions and Content Collections; learn those APIs in its official docs.

02 / Optional integrations

Choose the setup. Configure your services.

The wizard includes only the features you choose. Later, use add in the generated project. Service credentials, business rules and production testing remain part of your project.

Presentation

Themes · PageLoader · Icons

Add light/dark theme controls, a PageLoader with a changeable animation, or Font Awesome SVG icons.

Input

Forms + Formatter · Fields

@samline/forms and @samline/formatter install together. Include Fields if you also want Astro templates for form controls.

Identity

Better Auth

Prepare external REST identities, OAuth/OIDC or project-owned PostgreSQL. You supply the provider settings, access rules and account interface.

Privacy

GTM + consent · CAPTCHA

GTM includes cookie consent. CAPTCHA offers Turnstile or reCAPTCHA v2. Configure your container, consent choices and provider keys before use.

Content

Local · API · CMS

Use local files or an API, Strapi, Shopify or custom-service example. Remote sources offer build-time or live loading and require your configuration.

Server examples

Actions · SMTP mail

Actions includes a basic example. Mail includes an SMTP sender and contact Action. Running them requires a compatible server adapter.

03 / Create, run, extend

Create your project. Then build with Astro.

Choose your package manager and run the command from the folder that will contain your project. The wizard guides you through deployment, languages and integrations.

Read installation instructions
1

Choose

npm

Terminal
npx @samline/astro my-site --package-manager npm --runtime node

pnpm

Terminal
pnpm dlx @samline/astro my-site --package-manager pnpm --runtime node

Bun

Terminal
bunx @samline/astro my-site --package-manager bun --runtime bun
2

Run

Choose the tab matching your tools. The installer normally installs dependencies; if you use --no-install, run your selected manager’s install command first.

npm

Terminal
cd my-site
npm run dev

pnpm

Terminal
cd my-site
pnpm run dev

Bun

Terminal
cd my-site
bun run dev

Read our docs for installer choices, generated files and component usage. Follow the linked Astro docs for framework behavior.

Read what the distribution configures
04 / Three setup examples

Create a project.
Add its next feature.

Create the static project first. Run the other commands from its root to add Fields or local content. The examples page explains each result and next step.

Create a project

Create a static project

Start with the core configuration and a simple homepage. Optional integrations are omitted until you choose to add them.

Read this setup example
Terminal
npx @samline/astro my-site --minimal --deploy static --locale en-us
Add Fields

Add form controls to an existing project

Add Astro components for native form controls, together with @samline/forms and @samline/formatter. You still create the form section and choose its submission handler.

Read this setup example
Terminal
npx @samline/astro add fields
Add content

Add a local articles collection

Register a collection named articles with a schema and local sample data. This prepares content to query; you still build the article list and pages.

Read this setup example
Terminal
npx @samline/astro add content --source local --collection articles
Read the setup examples
05 / More by samline

More for your site. Made by samline.

Packages for interfaces, forms, motion and everyday utilities. Explore their documentation and use them in this starter or another project.

  • Interface

    Drawer

    Sliding panels for menus, search and contextual content.

    • Focus management
    • Gestures
    • Open and close APIs
  • Motion

    Ticker

    Moving content with playback controls and accessibility features.

    • Playback controls
    • JavaScript and HTML
    • Accessible motion
  • Feedback

    Notify

    Toast notifications for status updates, promises and custom messages.

    • Semantic messages
    • Promise feedback
    • Custom content
  • Forms

    Forms

    Form state and validation for your interface, with optional Astro field templates.

    • Form state
    • Validation
    • Works with Formatter
  • Forms

    Autocomplete

    An accessible combobox for search suggestions and selecting options.

    • Keyboard navigation
    • ARIA combobox
    • Framework agnostic
  • Forms

    Formatter

    Format inputs and display values, with separate formatted and raw outputs.

    • Input formatting
    • Intl helpers
    • Date tools
  • Motion

    Counter

    Count numbers up as they scroll into view, with easing, decimals and Intl formatting, while the final value stays in the HTML.

    • Final value in the HTML
    • Intl formatting
    • Reduced motion safe
  • Timing

    Debounce

    debounce, throttle and rafThrottle with cancel, flush and pending.

    • debounce, throttle, rAF
    • cancel, flush, pending
    • React, Vue and Svelte
  • Motion

    Horizontal Scroll

    Pin a section and move its content sideways as the page scrolls down, with keyboard focus, media queries and a native scroll fallback.

    • Sticky, no hijacking
    • Keyboard focus follows
    • Native swipe fallback
  • Viewport

    Is Visible

    Enter and leave callbacks for many elements on shared IntersectionObservers.

    • Enter and leave
    • Shared observers
    • React, Vue and Svelte
  • Motion

    Reveal

    Reveal elements as they scroll into view with CSS effects, cascades, repeat and a CSS-only scrub mode, without hiding what is already on screen.

    • Never hides what is in view
    • Cascades and repeat
    • CSS-only scrub
  • Navigation

    Scroll Spy

    Highlight the link of the section in view for tables of contents and one-page menus, with aria-current, click locking and scroll containers.

    • aria-current built in
    • Steady on click
    • Long tables of contents
  • Navigation

    Scroll To

    Smooth scrolling to anchors and elements with offsets for fixed headers, alignment, easing, focus and history, in the page or any container.

    • Header offsets
    • Focus follows
    • Promise on arrival
  • Text

    String

    camelCase, kebab-case, slugify, accents, truncate and initials on one Unicode-aware word splitter.

    • Unicode-aware words
    • slugify, cases, truncate
    • Server and browser
  • Interface

    Theme

    Light, dark and system themes without a flash, with a remembered choice, live system changes, other tabs and accessible controls.

    • No flash on load
    • Light, dark or system
    • In sync across tabs
06 / Common questions

Before you start. What to expect.

What does @samline/astro add to Astro?

It creates an Astro 7 project with shared configuration, typed translation dictionaries, reusable components and the optional integrations you choose. You edit the generated source in your own repository. Astro still provides routing, rendering, Server Islands, Actions and Content Collections; its official documentation explains those APIs.

Understand the starter
What will I see when I run a new project?

The interactive wizard proposes the Welcome demo: Home and a second page with a shared header, navigation and footer. The navigation marks the current page. Themes and a language picker appear only when selected. Use --minimal, or choose none in the feature prompt, for a core homepage without the demo.

Explore the starter demo
Can I choose npm, pnpm or Bun?

Yes. Choose npm, pnpm or Bun for dependencies and Node.js or Bun for scripts. The wizard lists tools available on your computer; unattended commands use --package-manager and --runtime. Your choices are recorded in the generated project and respected by later additions. Node 22.23.4 or newer is required by the installer.

Check requirements and first steps
Can I add an integration after creating the site?

Yes. Run npx @samline/astro add inside a project created by this modular installer and choose the missing feature. Use --dry-run to inspect the changes. The installer preserves unrelated code and stops when files or registrations conflict. Adding the Welcome demo later keeps your current homepage and supplies a separate demo route.

See what each integration adds
Which hosting target should I choose?

Vercel is the default. You can also choose pure static hosting, Netlify, Cloudflare Workers or a custom Node server. The installer prepares the matching configuration and adapter where needed; it does not deploy anything. Choose according to the runtime your selected integrations require, particularly authentication, live content and SMTP.

Compare deployment targets
Can static pages use authentication or other server features?

Yes, prebuilt public pages can use Server Islands with a compatible Astro adapter. Active Actions, protected routes and live content also need server execution. Pure static hosting has no runtime for them; inactive examples must be configured with a backend before use. Adding one server feature does not require turning the entire site into SSR.

Understand static and server execution
What is the difference between Forms and Fields?

Forms installs both @samline/forms and @samline/formatter for form state, validation and formatting. Fields is an optional set of Astro templates for controls, labels, hints and errors. You can use the packages with your own markup, or add Fields later. A complete form still needs its owning section and a submission handler.

Build a form with Fields
Does installing Mail create a working contact form?

Mail includes the server SMTP service and its Contact Action example. It does not create a contact page or send messages immediately. Supply SMTP settings, enable sending and connect your form to the Action on a compatible server target. CAPTCHA is a separate choice; when installed with Mail, its server verification is connected to the contact example.

Configure contact submissions
Can content come from an API, Strapi or Shopify?

Yes. Choose local files, a generic REST or GraphQL API, Strapi, Shopify Storefront or a custom service. The installer includes only that source’s schema, loader and read example. Local content works offline. Remote examples require your configuration and explicit activation. Build-time loading produces static content; live loading needs an adapter and a request-time consumer.

Choose a content source
How do languages and translated URLs work?

Choose en-us, es-mx, es-es or a custom locale during setup. Adding a language later mirrors the project’s current dictionary keys with empty translations and leaves it inactive until completed. This does not translate posts or CMS records. When equivalent pages use different slugs, supply their actual translation relationship for navigation and SEO.

Set up dictionaries and translated destinations
Can users live in Laravel or another external backend?

The optional authentication source supports an external REST identity service, OAuth/OIDC or project-owned users through Better Auth. Adapt the provider contract and configure sessions, permissions and protected operations for your application. Installing the source does not create an account interface, configure a database or run migrations.

Configure the authentication boundary
How do I update Astro or the generated source?

Use Astro’s official upgrade tool for Astro and installed official integrations, starting with a dry run. Review other dependencies separately. A newer @samline/astro generator can create projects or add missing features; it does not merge changes into previously copied source. There is currently no automatic base-source update command.

Follow the update workflow
Can I use this starter for client or commercial projects?

The original installer and starter source are MIT licensed. Included dependencies, fonts, icons and third-party skills retain their own terms and notices. Keep the applicable notices when distributing their material. The generated application belongs to your project; the installer does not assign a license to your independently authored application.

Read the distribution license notes
Can I create a project without interactive questions?

Yes. Use --minimal for the core, or --yes with explicit deployment, language and feature flags. Set --package-manager and --runtime to choose tools explicitly. Use --no-install when dependency installation belongs to a separate step, and --dry-run to inspect planned changes. The command reference lists the available flags.

Read the command options
Start with the installation guide

Choose your setup. Build your site.

See what gets generated, how to run it and where to edit.

These docs cover @samline/astro. Framework guides link directly to Astro.

Read the distribution docs