Skip to content

zackchadwick/sveltekasten

 
 

Repository files navigation

📬 Briefkasten v2

GitHub issues GitHub Demo

  
🚧 Experimental Svelte rewrite of Briefkasten 🚧

Note

This is the temporary repository for Briefkasten V2. I will move this code to the original ndom91/briefkasten repository as we get closer to GA release. However, if you'd like to help out, don't hesitate to file issues here, etc. For more info, check out this discussion post.

🚀 Getting Started

This is setup as a monorepo with (1) apps/web being a SvelteKit web application and (2) apps/backend being a Hono-based backend service. There are npm scripts in the root package.json to control all (most?) things.

  1. Clone the repository
$ git clone [email protected]:ndom91/sveltekasten.git && cd sveltekasten
  1. Install dependencies
$ pnpm install

This will install the dependencies for both apps.

  1. Both web and backend need separate .env files. Copy both .env.example files to .env, and open them with your favorite text editor to fill in your environment variables.
$ cd apps/web && cp .env.example .env
$ cd apps/backend && cp .env.example .env

In these environment variable files, make sure to at least fill in the DATABASE_URL, AUTH_SECRET, JWT_SECRET, WORKER_URL and one Auth.js authentication provider, so for example GITHUB_ID, GITHUB_SECRET. The rest of the environment variables depend on the services / features you want to use.

  1. Start the server!
// First time only
$ pnpm db:push

// dev
$ pnpm dev

// prod
$ pnpm build
$ pnpm start

🐋 Docker

The Docker setup is still a bit of a WIP, but has been simplified a bit.

  1. Run web and backend in the background
docker compose up -d
  1. Run web and backend and an additional postgres container
docker compose up --profile postgres -d
  1. Run web and backend containers with local code mounted in for development
docker compose -f docker-compose.local-dev.yml up -d

👷 Contributing

This project is open to all contributions. Please stick to the repo settings and I'll be happy to take a look at your issue / PR!

Note that this repository will be nuked relatively soon and all code will be moved to the main ndom91/briefkasten repository

📝 License

MIT

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 79.4%
  • Svelte 19.0%
  • JavaScript 1.2%
  • CSS 0.2%
  • Dockerfile 0.1%
  • Nix 0.1%