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 backend service. There are npm scripts in the root package.json
to control all (most?) things.
- Clone the repository
$ git clone [email protected]: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.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.
- Start the server!
// First time only
$ pnpm db:push
// dev
$ pnpm dev
// prod
$ pnpm build
$ pnpm start
The Docker setup is still a bit of a WIP, but has been simplified a bit.
- Run web and backend in the background
docker compose up -d
- Run web and backend and an additional postgres container
docker compose up --profile postgres -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