Skip to content

fix: resolve TS build errors and implement mobile auth token storage#199

Open
mramansayyad wants to merge 1 commit into
Dev-Card:mainfrom
mramansayyad:fix/typescript-build-and-auth-storage
Open

fix: resolve TS build errors and implement mobile auth token storage#199
mramansayyad wants to merge 1 commit into
Dev-Card:mainfrom
mramansayyad:fix/typescript-build-and-auth-storage

Conversation

@mramansayyad
Copy link
Copy Markdown

Summary

This PR fixes all TypeScript compilation errors inside the @devcard/backend and @devcard/mobile workspace projects, and completes the TODO placeholders in AuthContext.tsx to persist authentication tokens in React Native using AsyncStorage.

Closes #198

Changes Made

1. Backend (apps/backend)

  • connect.ts: Direct import/call of encrypt from ../utils/encryption.js and randomBytes from node crypto.
  • analytics.ts & connect.ts: Declared route query/parameter types directly on fastify route methods (e.g., app.get<{ Querystring: ... }>) for cleaner type inference.
  • auth.ts & connect.ts: Pino error logs updated to app.log.error({ err }, '...') for proper type resolution.
  • profiles.test.ts: Cast mockPrisma as any in test decorator.

2. Mobile (apps/mobile)

  • AuthContext.tsx: Completed the token load/save/clear flow using @react-native-async-storage/async-storage.
  • MainTabs.tsx: Updated imports of ConnectPlatformsScreen and ViewsScreen to named imports.
  • SettingsScreen.tsx: Added useNavigation hook.
  • Skeleton.tsx: Adjusted prop types to use DimensionValue from React Native.

Verification

  • Both backend and mobile compile without errors via tsc.
  • All backend unit tests run and pass (44 passed in Vitest).

@Harxhit
Copy link
Copy Markdown
Collaborator

Harxhit commented May 20, 2026

@mramansayyad I am closing this PR as the issue is not assigned to you please wait for issue to get assigned.

@Harxhit Harxhit added the gssoc:approved Required label for every approved PR. Gives the base +50 points and enables contribution tracking. label May 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc:approved Required label for every approved PR. Gives the base +50 points and enables contribution tracking.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: Resolve TypeScript build errors and implement mobile auth token storage

2 participants