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:
- Prompt you for required environment values
- Generate
.env
files for both/strapi
and/app
- Copy the sample files:
cp strapi/.env.sample strapi/.env
cp app/.env.sample app/.env
- Open each file and fill in the values:
strapi/.env
: Contains database, secret keys, and S3 configurationapp/.env
: Contains public URLs and GraphQL endpoint
Each 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
- Strapi — Headless CMS for managing content
- SvelteKit — Frontend framework for building modern web apps
- PostgreSQL — Primary database
- S3-Compatible Storage — For media asset storage
.
├── 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 |