Skip to content

Issue #3: [Feature] Implement database schema and replace all mock API routes #3

Description

@GoodnessJohn

Description:

Every API route in this repo returns hardcoded fake data. The database schema file is an empty stub (export {}). The database and Drizzle ORM are configured but entirely unused. The application cannot persist any user data, goals, transactions, or landlords between requests.

Work required:

Define the following Drizzle tables:

users — id, public_key, display_name, email, kyc_status, created_at
savings_goals — id, user_id, title, target_amount, current_amount, monthly_rent, deadline, landlord_id, status, created_at
transactions — id, user_id, type, amount, status, tx_hash, goal_id, description, created_at
landlords — id, user_id, name, wallet_address, email, property_address, rent_amount, due_day, auto_pay_enabled
notifications — id, user_id, title, message, type, read, created_at
auth_challenges — public_key, challenge, expires_at (for SEP-10 nonce tracking)
Replace each mock route handler with real Drizzle queries. Run migrations via drizzle-kit push or generate SQL migration files.

Acceptance criteria:

All tables defined in
schema.ts
drizzle-kit generate produces valid migration SQL
All 15 API route handlers replaced with real DB queries
No hardcoded mock data remains in route handlers
Integration tests cover the core CRUD operations

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions