//lifelogbyTahul

lifelog

all my data are belong to us

2
0
2
TypeScript

Install

Install packages with bun:

bun

For login, we have set up Github auth with Better Auth as an example.

  1. Create a new Github App
  2. Copy .env.example to .env
  3. Fill in GITHUB_CLIENT_ID and GITHUB_CLIENT_SECRET

Run

in three separate tabs:

bun docker up
bun zero
bun dev

to run tauri you can run this instead of bun dev:

bun dev:tauri

to reset all your data:

bun docker:start:clean

Tauri

If you’d like to build a desktop app you may want to use Tauri. You can remove it if you don’t need it.

Getting Tauri to handle auth in a sane way takes a bit of work, but we’ve set up most of it here for you. If you’re using OAuth, you don’t want to force your users to login via the Tauri window, as they will lack all saved credentials and be forced to memorize their password / not use passkeys, etc.

So instead we open the login link using target=“_blank” so it opens in their default browser, making for a smooth login experience. But that means you need to pass back the credentials to Tauri once logged in.

To do this, we added the deep-link plugin to Tuari, allowing for one-zero://domain style URLs to open with your native Tuari app. This allows for really nice hand-off.

On Mac though, you can’t use deep links in dev mode. So you’ll need to make a production build, drag it to your Applications folder, and run your app from there. We set up the production build to hit your same development server for now, so you can actually just use that built app as your main dev driver. It includes dev tools as you’d normally want, too. Once you set this up development is easy, and login has great UX.

[beta]v0.13.0