You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* feat: Layer 2 WebView Follow Engine — LinkedIn In-App Connect + Session Management
* fix: resolve TypeScript compilation issues and restore settings navigation
* feat: WebView LinkedIn Connect Engine + Follow system (Section 6.9)
- Backend: followRoutes returns webview strategy for LinkedIn/Twitter platforms
- Backend: POST /api/follow/:platform/:targetUsername/log for telemetry
- Backend: DELETE /api/follow/:platform/:targetUsername/log to reset Done state
- Backend: public profile now returns followed:true for previously connected links
- Backend: auth improvements — encode mobile redirect URI in OAuth state
- Mobile: WebViewScreen — full LinkedIn JS injection engine with polling,
MutationObserver, visibilitychange, popstate, and injectedJSBeforeContentLoaded
- Mobile: DevCardViewScreen — premium UI, emoji icons, brand-colored buttons,
Done tile with long-press reset, GitHub browser fallback
- Mobile: HomeScreen — username search bar to view any DevCard profile
- Mobile: App.tsx — hash fragment token extraction for OAuth deep links
- Mobile: config.ts — auto-detects LAN IP via Expo Constants for Expo Go
- Mobile: Expo migration — index.js, metro.config.js, babel.config.js, app.json
- Tests: new follow.test.ts cases for webview strategy and log endpoint
- Docs: README updated with telemetry and fallback overlay details
- Config: docker-compose port 5433, .env.example LAN IP placeholders
* fix: address PR review comments from Harxhit
- prisma.ts: replace authenticate:any with proper typed signature
(request: FastifyRequest, reply: FastifyReply) => Promise<void>
- auth.ts: replace err as any with instanceof Error check in both
GitHub and Google OAuth catch blocks for type-safe error handling
- Skeleton.tsx: replace width/height as any with DimensionValue type
from react-native to preserve TypeScript safety
* fix: address remaining PR review comments from Harxhit
- connect.ts: replace err as any with instanceof Error check in
GitHub connect catch block (same pattern as auth.ts fix)
- MainTabs.tsx: extract WebViewConnect params into standalone exported
type WebViewConnectParams for reusability and future maintainability
- profiles.test.ts: replace mockPrisma as any with Pick<PrismaClient,'user'>
and unknown cast to preserve TypeScript safety in tests
DevCard implements a multi-layered Hybrid Follow Engine designed to connect platform professionals seamlessly while maintaining platform policy compliance.
Due to LinkedIn's modern API restrictions preventing programmatic connection requests, direct API follow (Layer 1) is not viable. Instead, the WebView Interaction Engine routes the action through a secure, native WebView:
19
+
20
+
1.**Routing Strategy**: The backend parses the connection request and returns `{ strategy: 'webview', url }` containing the resolved profile link.
21
+
2.**Session Persistence**: The mobile WebView loads the target profile URL using system-level OAuth cookie-sharing (`sharedCookiesEnabled={true}`), ensuring the user remains authenticated.
22
+
3.**DOM Introspection**: A lightweight JavaScript snippet is injected to continuously poll for the native LinkedIn 'Connect' button, smooth-scrolls it into view, and highlights it visually to encourage action.
23
+
4.**Interactive Send**: Users retain full control over actual connection request submission, adhering completely to platform terms of service.
24
+
5.**State Detection**:
25
+
- URL State Polling: The engine inspects URL transitions containing `invite-sent` or similar sub-routes.
26
+
- DOM Observation: The injected Javascript queries for structural indicators of successful invitation (e.g. "Pending" button state or toaster text) and posts a serialized message back to the native layer.
27
+
6.**Robust Fallback**: If network or WebView loading times out (>10s), the engine gracefully falls back to native deep links (`linkedin://profile?id={username}`) or launches the default browser with an interactive custom in-app overlay.
28
+
7.**Telemetry Logging**: Upon client-side success (detected via state changes or DOM indicators), the mobile app makes a `POST /api/follow/:platform/:targetUsername/log` request to the backend. This writes a record to the `FollowLog` database table for auditing and analytics tracking.
0 commit comments