scrt-link-v2 Svelte Themes

Scrt Link V2

Scrt.link lets you share sensitive information online: End-to-end encrypted. Ephemeral. Open source.

scrt-link-v2

Version 2 - built with Svelte.

Live: v2.scrt.link

[!WARNING]
This is work-in-progress.

Developing


# 1. Install dependencies
pnpm install

# 2. Start DB (via Docker)
pnpm run db:start

# 3. Start sveltekit
pnpm run dev

# Run tests (unit and e2e)
pnpm test

Database

Using Drizzle with Postgres. Runs in Docker locally.

# You will need to set POSTGRES_URL in your production environment
# Reminder to myself: Using 5433 as port to not have conflict with local Postgres: https://stackoverflow.com/a/76448218

pnpm run db:start  # Start the docker container
pnpm run db:push # Update your database schema

# Local DB with Docker
docker compose up

Building

To create a production version of your app:

pnpm run build

Cron

We use Vercel Cron to cleanup secrets and files. See src/routes/api/v1/cron/+server.ts for more info.

You can trigger the cron job locally with:

curl --request POST \
     --url 'http://localhost:5173/api/v1/cron' \
     --header 'Authorization: Bearer API_SECRET_KEY'

UI / Components

https://www.shadcn-svelte.com/

# Install component (e.g. form)
pnpm dlx shadcn-svelte@latest add form

Translations / i18n

Translations are done with Paraglide.js by Inlang

# Edit your messages in messages/en.json
# Consider installing the Sherlock IDE Extension
# Visit /demo/paraglide route to view the demo
pnpm inlang:machine-translate # Machine translate missing keys
pnpm inlang:lint
pnpm inlang:editor # Opens visual editor

Authentication

Implementation based on Lucia

The following login methods are available:

  • Email & Password (with email verification & password reset)
  • OAuth with Google

Google OAuth Client

Redirect URI: /login/google/callback

Transactional Emails

šŸ“¦ Project
ā”œā”€ā”€ šŸ“‚ src
ā”‚ ā””ā”€ā”€ šŸ“‚ lib
ā”‚   ā””ā”€ā”€ šŸ“‚ emails # Email templates
ā”‚
ā”œā”€ā”€ šŸ“‚ routes
ā”‚ ā””ā”€ā”€ šŸ“‚ admin
ā”‚   ā””ā”€ā”€ šŸ“‚ email-previews # Preview emails (Only works on localhost )
ā”‚
ā””ā”€ā”€ šŸ“œ vite.config.ts # Tailwind setup

Workflows / E2E Testing

In order to ship with confidence we run a set of tests during and after the deployment. See playwright-tests-published.yml for more info.

Stack

  • SvelteKit
  • Tailwind CSS
  • PostgreSQL (Database)
  • Drizzle (ORM)
  • Inlang/Paraglide (i18n)

Infrastructure

License

MIT (Code)

CC BY-NC-ND (Creatives)

Top categories

Loading Svelte Themes