Skip to content

Repository files navigation

1DAY 1OTT

English · 한국어 · 日本語

A web service for logging the movies, TV shows, variety shows, anime, YouTube videos, and other content you watch each day, then visualizing your activity as a GitHub-style contribution graph.

Features

  • Log the date, content type, reaction, short note, and platform
  • Annual activity graph, streaks, and monthly and category statistics
  • Search with TMDB and fetch metadata from YouTube URLs
  • Shareable profiles with user-controlled public visibility
  • Email/password and Passkey authentication
  • Korean, English, and Japanese interfaces with light and dark themes
  • Import and export records in Markdown format

Architecture

This repository is a TypeScript monorepo managed with pnpm workspaces.

apps/web         React 19 + Vite frontend
apps/api         Cloudflare Worker using Hono, Better Auth, and Drizzle
packages/shared  Zod schemas, shared types, and pure utilities
docs             Feature specifications and implementation plans

In production, a single Cloudflare Worker handles /api/* requests and serves the Vite build output. Data is stored in Cloudflare D1. During local development, Vite proxies /api requests to wrangler dev.

Requirements

  • Node.js 24
  • pnpm 10.33.0

The pnpm version is pinned in the root package.json through the packageManager field.

Local Development

Install dependencies and prepare the local environment file.

pnpm install
cp apps/api/.dev.vars.example apps/api/.dev.vars
openssl rand -base64 32

Copy the output of the last command into BETTER_AUTH_SECRET in apps/api/.dev.vars. Set TMDB_API_TOKEN as well to enable TMDB search. .dev.vars is ignored by Git and must never be committed.

Apply the committed migrations to the local D1 database.

pnpm db:migrate:local

Start the API and web app in separate terminals.

pnpm dev:api
pnpm dev:web
  • Web: http://localhost:5173
  • API: http://localhost:8787
  • Health check: http://localhost:8787/health

Verification

pnpm test
pnpm typecheck
pnpm --filter @1ott/web build

API tests run against real, isolated D1 storage inside workerd.

Database Changes

Generate a new migration only after changing the Drizzle schema, then verify it locally.

pnpm db:generate
pnpm db:migrate:local

Commit the generated files under apps/api/migrations together with the source changes.

Cloudflare Deployment

Sign in to Cloudflare with Wrangler and create the D1 database.

pnpm --filter @1ott/api exec wrangler login
pnpm --filter @1ott/api exec wrangler d1 create 1ott-db

Add the returned database_id to apps/api/wrangler.jsonc, then register the production secrets.

pnpm --filter @1ott/api exec wrangler secret put BETTER_AUTH_SECRET
pnpm --filter @1ott/api exec wrangler secret put TMDB_API_TOKEN
pnpm --filter @1ott/api db:migrate:remote
pnpm run deploy

To deploy through GitHub Actions, configure these repository secrets:

  • CLOUDFLARE_API_TOKEN
  • CLOUDFLARE_ACCOUNT_ID

Configure the public repository variable VITE_GA_MEASUREMENT_ID with the Google Analytics 4 measurement ID (G-...). When omitted or invalid, the analytics code remains disabled and no Google script is loaded.

gh variable set VITE_GA_MEASUREMENT_ID --body "G-..." --repo arkjun/1day-1ott

Update the custom domain, BETTER_AUTH_URL, WEB_ORIGIN, and D1 binding in apps/api/wrangler.jsonc for your environment. A push to main runs CI, applies remote D1 migrations, and deploys to production after CI succeeds.

External Services

This service uses TMDB and the TMDB APIs but is not endorsed, certified, or otherwise approved by TMDB.

Contributing

Read AGENTS.md before making changes, then run the tests and type checks. Bugs and feature requests are welcome through GitHub Issues. Report security vulnerabilities or privacy concerns privately to support@1day1ott.com.

All contributors must follow CODE_OF_CONDUCT.md.

License

This project is released under the MIT License.

About

Movies, TV, variety, YouTube — log today's watch in one line. Your viewing habit, filling up green like a GitHub contribution graph.

Resources

Code of conduct

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages