Links: Beta Instance | Docs
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.
This is setup as a monorepo with (1) apps/web
being a SvelteKit web application and (2) apps/backend
being a Hono-based API. There are npm scripts in the root package.json
to control most things.
- Clone the repository
$ git clone git@github.com:ndom91/sveltekasten.git && cd sveltekasten
- Install dependencies
$ pnpm install
This will install the dependencies for both apps.
- Both
web
andbackend
need separate.env
files. Copy both/apps/{web,backend}/.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 AUTH_GITHUB_ID
, AUTH_GITHUB_SECRET
. The rest of the environment variables depend on the services / features you want to use.
- Start the server!
// First time only; apply the schema to your database
$ pnpm db:push
// dev
$ pnpm dev
// prod
$ pnpm build
$ pnpm start
You can run the entire stack yourself via Docker, there are multiple variants depending on if you want to self-host everything or want to rely on some cloud services.
docker-compose.yml
- Containers for the frontend and backend components of the applicationdocker-compose.storage.yml
- Additionalpostgres
andminio
containers for a database and object storage. You can skip this container if you want to use a hosted database provider and an S3-compatible object storage provider, for example.
- Run web and backend in the background
docker compose up -d
- Run web and backend and additional database and object storage containers
docker compose -f docker-compose.yml -f docker-compose.storage.yml up -d
- Run web and backend containers with local code mounted in for development
docker compose -f docker-compose.local-dev.yml up -d
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
MIT