Data Model

TablePurpose
usersid (UUID), email (unique), password_hash (nullable for OAuth), email_verified, name, image
verification_tokensidentifier (verify:<email> or reset:<email>) + token + expires
token_usageuser_id, day (date), tokens_in, tokens_out, cost_usd — unique on (user_id, day)
applicationsid, user_id (FK), company, title, description, applied_at, status, analysis (JSONB), analysis_hash, suggested_profiles (JSONB), suggested_profiles_updated_at, timestamps

Application status enum: savedappliedinterviewingoffer / rejected / withdrawn.

CV text is never persisted. Only the SHA256 hash and the structured analysis are stored.