A modern full-stack website boilerplate using Strapi as a headless CMS and SvelteKit as the frontend framework.
Follow these steps to get your local environment up and running.
git clone https://github.com/your-username/your-repo.git
cd your-repo
Both the Strapi backend and SvelteKit frontend require their own .env
files.
You have two options:
chmod +x create-envs.sh
./create-envs.sh
This script will:
.env
files for both /strapi
and /app
cp strapi/.env.sample strapi/.env
cp app/.env.sample app/.env
strapi/.env
: Contains database, secret keys, and S3 configurationapp/.env
: Contains public URLs and GraphQL endpointEach app has its own package.json
. Run the following from the root or their directories.
cd strapi
npm install
npm run develop
cd ../app
npm install
npm run dev
.
โโโ app/ # SvelteKit frontend
โ โโโ .env # Frontend env config
โโโ strapi/ # Strapi backend (CMS)
โ โโโ .env # Backend env config
โโโ create-envs.sh # Script to generate .env files
โโโ README.md
Command | Description |
---|---|
npm run develop (Strapi) |
Run CMS in development mode |
npm run dev (SvelteKit) |
Start the frontend dev server |
nvm use |
Use Node.js version from .nvmrc |