A starting point for static websites, SPAs, and PWAs using Svelte 5 with adapter static.
-
A Node based dev-container for a consistent development environment.
- Based on Microsoft's devcontainer spec.
- Uses the host's timezone (
$TZ
) and Github CLI token ($GITHUB_TOKEN
). - If
$GITHUB_TOKEN
is set, it will clone the user'sdotfiles
repository and run itsinstall.sh
after creating the container. See jifalops/dotfiles for an example. - Local shell history is persisted when rebuilding the container.
-
Sets up a backend
API_URL
that changes between local development and production, and can easily be removed if building a static site. -
Integrated terminals when opened with VS Code:
- Runs unit tests and starts the dev server (
npm run dev
). - Runs integration tests and starts the preview server (
npm run preview
). - Spoofs a locally running backend by proxing
dummyjson.com
.
- Runs unit tests and starts the dev server (
-
GitHub Actions for:
- Running tests on PRs and changes to
main
. - Deploying
main
to GitHub Pages. - Previewing PRs in a Github Pages subdirectory.
- Running tests on PRs and changes to
-
Obfuscated builds, locally and deployed (
npm run build && npm run obfuscate
). -
Tailwind preconfigured with a simple light and dark theme.
-
A modern Ports and Adapters (hexagonal) architecture with a feature-based directory structure.
-
Core services baked in:
- Telemetry with Google Analytics 4, including a mock implementation.
- Advertising with Google AdSense, including a mock implementation.
- Logging.
- Base class for app errors.
-
Iconify icons integrated via unplugin-icons. Builds only the icons used.
-
Svelte 5 out of the box.
- Clone this repository / use this template.
- In your repository settings for GitHub Pages, choose
Deploy from a branch
.You may have to create the
gh-pages
branch first or let the.github/workflows/deploy.yml
workflow do it for you. - Install the Dev Containers extension for VS Code to develop within the configured environment.
- For seamless integration:
- Set the
TZ
andGITHUB_TOKEN
environment variables on the host (example). - Have a
dotfiles
repo with aninstall.sh
script that sets up your environment. See jifalops/dotfiles for an clonable example.
- Set the