read-track

command module
v0.0.0-...-f83d065 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 20, 2024 License: MIT Imports: 3 Imported by: 0

README

Read Track

build

A minimal personal reading list inspired by blog post from Thomas Pain.

You may deploy your own Read Track instance and track read from different devices.

Features

  • Simple API Endpoints with easy-to-setup bookmarklet and iOS shortcut.
  • Multiple verb support: read, skim, unread, and skip.
  • Designated for single user with Auth0 login.
  • Dashboard with statistical data.

Dev

  1. Register an Auth0 account and create an application.
  2. Setup .env according to .env.example. Make sure all the env vars are ready.
  3. Run (DB is auto migrated):
    script/run.sh
    

Deploy

We only support fly.io right now. And DB is stored in fly volumes.

Deploy with fly.io
  1. Install fly.io cli:

    brew install flyctl
    
  2. Setup env inside fly.toml:

    [env]
      INSTANCE = "<instance-name>"
      PORT = "8080"
      MODE = "production"
      TIMEZONE = "Asia/Shanghai"
      HTTP_PORT = ":8080"
      DB_PROVIDER = "sqlite"
      DB_NAME = "/data/read-track-production.db"
    
  3. Setup secrets with fly secrets:

    fly secrets set HTTP_TOKEN="your-secrets"
    fly secrets set AUTH0_DOMAIN='YOUR_DOMAIN'
    fly secrets set AUTH0_CLIENT_ID='YOUR_CLIENT_ID'
    fly secrets set AUTH0_CLIENT_SECRET='YOUR_CLIENT_SECRET'
    fly secrets set AUTH0_CALLBACK_URL='http://YOUR_DOMAIN/callback'
    fly secrets set AUTH0_USER_ID='YOUR_USER_ID'
    
  4. Deploy:

    fly deploy
    

License

MIT

Documentation

Overview

package main serves read track API

Directories

Path Synopsis
internal
app
Package app serves
Package app serves
model
Package model .
Package model .

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL