-
Clone this repository:
git clone https://github.com/digi4care/sveltekit-postgres-devcontainer.git cd sveltekit-postgres-devcontainer
-
Create a new project (this will create it in the parent directory):
./create-svelte-project.sh my-new-project
-
Open the new project in VS Code:
cd ../my-new-project code .
-
Open in Dev Container:
- Press
F1
- Select "Remote-Containers: Reopen in Container"
- Wait for the container to build (first time may take a few minutes)
- Press
- ⚡ SvelteKit - Modern web framework (optional, install via Makefile)
- 🎨 Tailwind CSS - Optional CSS framework (install via Makefile)
- 🐘 PostgreSQL - Containerized database
- 🛠️ Dev Container - Pre-configured VS Code environment
- 🔌 Multiple Runtimes - nvm, Deno, and Bun support
- 🧪 Testing - Optional Vitest setup (install via Makefile)
- 🎯 Code Quality - ESLint & Prettier configured
The project includes a powerful Makefile to help you manage your SvelteKit project. Here are the most useful commands:
# Create a new Svelte project (interactive)
make create projectname
# Create a minimal TypeScript project
make create-minimal projectname
# Create a demo project with TypeScript
make create-demo projectname
# Create a library project with TypeScript
make create-library projectname
# Add Tailwind CSS
make add-tailwind
# Add Vitest for testing
make add-vitest
# Add Drizzle ORM
make add-drizzle
# Add ESLint
make add-eslint
# Add Storybook
make add-storybook
# Add Playwright for end-to-end testing
make add-playwright
# Add mdsvex for Markdown support
make add-mdsvex
# Install dependencies
make setup
# Start development server
make dev
# Build for production
make build
# Preview production build
make preview
# Start database container
make db-up
# Stop database container
make db-down
# Run database migrations
make db-migrate
Run make help
to see all available commands.
To create another project, you can either use the Makefile (recommended) or the create script:
# Create a new project with interactive setup
make create projectname
# Or create a specific type of project
make create-minimal projectname # Minimal setup
make create-demo projectname # Demo template
make create-library projectname # Library template
# From the template directory
./create-svelte-project.sh another-project
- Node.js (via nvm)
- Deno
- Bun
- PostgreSQL client
- Git
- cURL
- jq
- GitHub CLI (authenticate with
gh auth login
) - and more...
Chris Engelhard - chris@digi4care.nl
Project Link: https://github.com/digi4care/sveltekit-postgres-devcontainer
- Svelte
- Tailwind CSS
- VS Code Dev Containers
- All the amazing open-source projects that make this possible