Skip to content

fix: Migrate API to Turso, fix Vercel deployment, fix app TS errors#10

Merged
jhjdev merged 1 commit intomainfrom
fix/vercel-turso-migration
Mar 6, 2026
Merged

fix: Migrate API to Turso, fix Vercel deployment, fix app TS errors#10
jhjdev merged 1 commit intomainfrom
fix/vercel-turso-migration

Conversation

@jhjdev
Copy link
Owner

@jhjdev jhjdev commented Mar 6, 2026

Summary

Prepares the API for Vercel serverless deployment and fixes all TypeScript build errors in the mobile app.

API changes

  • Migrate MongoDB → Turso (@libsql/client) — edge-native, no connection pool issues
  • SQL schema for users and receipts tables (auto-created on first connect)
  • Export serverless handler for @vercel/node (dual-mode: serverless + local dev)
  • Fix vercel.json — version 2, remove invalid env block
  • Add missing deps: @fastify/rate-limit, fastify-plugin
  • Dynamic Swagger host (VERCEL_URL or localhost)
  • Fix security.tsgetResponseTime()elapsedTime (Fastify 5)

App changes

  • Fix broken import paths in App.tsx (./app/./)
  • Remove non-existent selectUser import in UsersScreen
  • Fix user.email → city/country display in BeaconsScreen
  • Fix thumbColorthumbTintColor in CreateUserScreen
  • Fix missing style reference in StatsScreen
  • Fix headers type mismatch in API service
  • Rename mongodb.serviceapi.service throughout
  • Add .env.example

Required Vercel env vars

  • TURSO_DATABASE_URL
  • TURSO_AUTH_TOKEN
  • API_KEY

Co-Authored-By: Oz oz-agent@warp.dev

API changes:
- Migrate from MongoDB to Turso (@libsql/client)
- Add SQL schema for users and receipts tables
- Export serverless handler for Vercel deployment
- Fix vercel.json (version 2, remove invalid env block)
- Add missing deps: @fastify/rate-limit, fastify-plugin
- Make Swagger host dynamic (VERCEL_URL or localhost)
- Fix security.ts getResponseTime → elapsedTime (Fastify 5)

App changes:
- Fix broken import paths in App.tsx (./app/ → ./)
- Fix non-existent selectUser import in UsersScreen
- Fix user.email reference in BeaconsScreen (not on User type)
- Fix thumbColor → thumbTintColor in CreateUserScreen
- Fix missing commonStyles.loadingText in StatsScreen
- Fix headers type mismatch in api service
- Rename mongodb.service → api.service, MongoDBService → ApiService
- Add .env.example

Co-Authored-By: Oz <oz-agent@warp.dev>
@jhjdev jhjdev merged commit a035826 into main Mar 6, 2026
4 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant