feat: Phase 0 walking skeleton — auth, Todoist integration, tip page
- Google OAuth2/PKCE flow via openid-client v6; session cookie (30-day) - Next.js middleware auth guard — redirects before any client render - Todoist OAuth2 connect/disconnect; REST v1 task fetch (today|overdue) - RandomPolicy recommender behind stable POST /recommend contract - Feedback endpoint (done/dismiss/snooze); marks task complete in Todoist - 30s in-memory task cache per user (~1ms recommend on cache hit) - Tip page: pure opacity fade-in (3.5s), fast fade-out (0.3s), no motion - "reading you…" loading text with breathe animation - PWA icons + manifest - Ports pinned: API=3078, web=3079; Caddy at o.alogins.net Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
import 'dotenv/config';
|
||||
import { config as dotenvConfig } from 'dotenv';
|
||||
// Load .env.local first (takes precedence), then .env as fallback
|
||||
dotenvConfig({ path: '../../.env.local', override: false });
|
||||
dotenvConfig({ path: '../../.env', override: false });
|
||||
|
||||
function require(name: string): string {
|
||||
const val = process.env[name];
|
||||
@@ -11,7 +14,7 @@ function optional(name: string, fallback: string): string {
|
||||
}
|
||||
|
||||
export const config = {
|
||||
PORT: parseInt(optional('PORT', '3001'), 10),
|
||||
PORT: parseInt(optional('PORT', '3078'), 10),
|
||||
NODE_ENV: optional('NODE_ENV', 'development'),
|
||||
DATABASE_PATH: optional('DATABASE_PATH', './data/oo.db'),
|
||||
|
||||
|
||||
Reference in New Issue
Block a user