code-snippet-sharing is a SvelteKit full-stack boilerplate that builds a Pastebin-like CRUD app while showcasing production support tooling such as unit tests, E2E tests, CI/CD, Docker, error tracking, and structured logging.
What is code-snippet-sharing?
code-snippet-sharing is an open-source SvelteKit application that functions as a simple Pastebin clone: users sign in with Google, create code snippets, browse all snippets with filtering and sorting, and view details. The project accepts authentication credentials and snippet content as inputs, and produces a paginated, sortable snippet library stored in PostgreSQL. It was created by developer nodeexx as a learning sandbox to experiment with SvelteKit and supporting services. The README describes it as a "total overkill" example that originally started as a simple CRUD app and grew into a kitchen sink of integrations.
What makes code-snippet-sharing stand out?
- Playwright E2E and API testing — automated tests cover the main happy paths for both the user interface and the API endpoints.
- Vitest unit tests — separate server and client test suites, run with
npm run test:unit:nodeandnpm run test:unit:dom, plus a:coveragesuffix for reports. - CI/CD via GitHub Actions and Northflank Pipelines — deployment is automated through Northflank, with linting and tests run in the pipeline.
- Comprehensive linting setup — centralized configuration across the repo, with
npm run lint:fixto auto-fix issues. - Dockerized local development — PostgreSQL runs in Docker Compose while the app runs via Vite, with separate scripts for migrations and seeds.
- Observability integrations — Sentry for error tracking with source map upload, PostHog for product analytics, and Roarr for structured logging, all controlled through environment variables.
- Production hardening — includes maintenance mode during deployments, graceful server shutdown, a healthcheck API endpoint, and global error handling.
- Client-side progressive enhancement — the client works without enabled JavaScript with some exceptions.
Who is code-snippet-sharing for?
- SvelteKit learners — use it to see how a full-stack CRUD app fits together, from Google OAuth to Prisma database queries.
- Developers building testing setups — copy the Playwright E2E/API test structure and Vitest unit test split into server and DOM environments.
- Teams launching a snippet-sharing product — start from a working codebase with sign-in, snippet CRUD, pagination, filtering, and soft delete.
- Engineers evaluating production SvelteKit — study the environment-variable pattern that wires Sentry, PostHog, Roarr, and maintenance mode.
What can you do with code-snippet-sharing?
- Launch a Pastebin-like service — signed-in users can create and edit snippets; page visitors can view and search the public library.
- Learn testing workflows — explore how unit tests are split by environment and how Playwright covers both UI and API happy paths.
- Set up a deployment pipeline — follow the Northflank and GitHub Actions configuration to ship the app with migrations and source maps.
How does the development workflow work?
The README documents a concrete local setup: install Node.js, Docker, and Docker Compose; create .env.local and .env.playwright files; run npm ci and install Playwright browsers. npm run dev boots PostgreSQL in Docker and the SvelteKit app through Vite with the database automatically migrated. Running scripts/stack/local/infra/stack-only/seed.js applies seed data, and npm run lint:fix runs all linters.








