sveltekit-postgres-devcontainer Svelte Themes

Sveltekit Postgres Devcontainer

๐Ÿš€ SvelteKit + PostgreSQL Dev Container Template

๐Ÿš€ Quick Start

  1. Clone this repository:

    git clone https://github.com/digi4care/sveltekit-postgres-devcontainer.git
    cd sveltekit-postgres-devcontainer
    
  2. Create a new project (this will create it in the parent directory):

    ./create-svelte-project.sh my-new-project
    
  3. Open the new project in VS Code:

    cd ../my-new-project
    code .
    
  4. 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)

โœจ Features

  • โšก 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

๐Ÿ› ๏ธ Makefile Commands

The project includes a powerful Makefile to help you manage your SvelteKit project. Here are the most useful commands:

Project Creation

# 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-ons & Features

# 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

Development

# Install dependencies
make setup

# Start development server
make dev

# Build for production
make build

# Preview production build
make preview

Database

# 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.

๐Ÿ”„ Creating Additional Projects

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

Using the create script

# From the template directory
./create-svelte-project.sh another-project

๐Ÿ“ฆ Included Tools

  • Node.js (via nvm)
  • Deno
  • Bun
  • PostgreSQL client
  • Git
  • cURL
  • jq
  • GitHub CLI (authenticate with gh auth login)
  • and more...

๐Ÿ“ง Contact

Chris Engelhard - [email protected]

Project Link: https://github.com/digi4care/sveltekit-postgres-devcontainer

๐Ÿ™ Acknowledgments

Top categories

Loading Svelte Themes