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_TOKENis set, it will clone the user'sdotfilesrepository and run itsinstall.shafter creating the container. See jifalops/dotfiles for an example. - Local shell history is persisted when rebuilding the container.
-
Sets up a backend
API_URLthat 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
mainto 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-pagesbranch first or let the.github/workflows/deploy.ymlworkflow do it for you. - Install the Dev Containers extension for VS Code to develop within the configured environment.
- For seamless integration:
- Set the
TZandGITHUB_TOKENenvironment variables on the host (example). - Have a
dotfilesrepo with aninstall.shscript that sets up your environment. See jifalops/dotfiles for an clonable example.
- Set the
