mobile mvp#38
Merged
Merged
Conversation
Owner
Author
|
set up mvp with fable 5 |
There was a problem hiding this comment.
Pull request overview
This PR expands the mobile app from a mock-data demo into a backend-connected MVP: aligning theme tokens with the web dark theme, wiring authenticated APIs/sockets, and adding several core product surfaces (home feed, listings browse, onboarding, profile, admin, payments). It also introduces an Offers feature across backend + web, and updates transaction/payment pricing to respect accepted offers.
Changes:
- Mobile: replace mock hooks/data with real API modules/types, add new screens (home, browse, auth/onboarding, notifications, offers/history, admin), and update UI components to match web styling/tokens.
- Backend: add Offers module/endpoints + Prisma model; update transactions/payments to price accepted offers.
- Web: add offers tabs/actions in purchase history and “make an offer” flow on listing detail.
Reviewed changes
Copilot reviewed 62 out of 74 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| mobile/theme/index.ts | Re-exports expanded theme tokens and documents dark-theme parity. |
| mobile/theme/colors.ts | Updates semantic palette tokens; adds category labels/colors; adds cream band tokens. |
| mobile/test-clerk.js | Adds a local debug script for Clerk module inspection. |
| mobile/package.json | Adds react-native-webview dependency for embedded map UI. |
| mobile/lib/types.ts | Expands mobile domain types to mirror backend/web. |
| mobile/lib/socket.ts | Updates socket connection to use handshake auth + authenticate event. |
| mobile/lib/auth.ts | Exposes Stripe publishable key from Expo env. |
| mobile/lib/api.ts | Expands API surface for users/listings/chat/posts/offers/transactions/payments/reviews/notifications/admin and adds getImageUrl. |
| mobile/hooks/useWarmUpBrowser.ts | Adds WebBrowser warm-up hook for OAuth flows. |
| mobile/hooks/useListings.ts | Removes mock listings hooks. |
| mobile/hooks/useConversations.ts | Removes mock conversations/messages hooks. |
| mobile/data/uicBuildings.ts | Adds UIC building dataset + default location for campus map. |
| mobile/data/mock.ts | Removes mock data used for demo-only flows. |
| mobile/components/ui/Pill.tsx | Adds “nav” tone and updates pill styling to match shadcn/web patterns. |
| mobile/components/ui/Button.tsx | Adds variants (outline/link) and updates colors to new semantic palette. |
| mobile/components/TransactionRow.tsx | Adds transaction list row component with status labeling/colors. |
| mobile/components/magicui/OrbitingCircles.tsx | Adds RN port of orbiting-circles animation. |
| mobile/components/magicui/Globe.tsx | Adds RN wireframe globe replacement for web cobe globe. |
| mobile/components/ListingCard.tsx | Updates card layout and adds wishlist swipe integration + seller rating/verification badges. |
| mobile/components/GlobalHeader.tsx | Adds global header with logo/search/create + wishlist/notification badges and socket listeners. |
| mobile/components/CategoryRail.tsx | Replaces category filter with nav-style rail that routes to browse/home/swipe. |
| mobile/components/CampusMap.tsx | Adds Mapbox WebView-based campus map component. |
| mobile/app/wishlist.tsx | Adds wishlist screen backed by /listings/wishlist. |
| mobile/app/sign-up.tsx | Adds Clerk sign-up + email code verification flow. |
| mobile/app/sign-in.tsx | Adds Clerk sign-in + Google OAuth flow and routes into the app. |
| mobile/app/settings.tsx | Adds preferences screen that updates user notification/safety settings. |
| mobile/app/purchase-history.tsx | Adds purchase history (buying/selling) using transactions API. |
| mobile/app/profile/[id].tsx | Replaces mock public profile with backend profile, follow, message, and reviews. |
| mobile/app/onboarding.tsx | Adds onboarding gate + profile completion flow. |
| mobile/app/offers.tsx | Adds offers screen with sent/received/meetups tabs using transactions offers endpoint. |
| mobile/app/notifications.tsx | Adds notifications screen with filters and socket refresh. |
| mobile/app/listings/index.tsx | Adds browse/search screen that calls listings endpoints and uses CategoryRail. |
| mobile/app/listings/[id]/edit.tsx | Adds listing edit/delete screen with category/status pickers. |
| mobile/app/listings/[id].tsx | Removes the old mock-based listing detail route file. |
| mobile/app/checkout/[id].tsx | Updates checkout to load listing via API and integrate Stripe Payment Sheet. |
| mobile/app/chat/[conversationId].tsx | Updates chat thread to load via API, use socket events, and handle read receipts/replies. |
| mobile/app/admin/users.tsx | Adds admin users management screen (warn/ban). |
| mobile/app/admin/reports.tsx | Adds admin reports review screen (resolve/dismiss). |
| mobile/app/admin/index.tsx | Adds admin dashboard with stats and navigation. |
| mobile/app/add-product.tsx | Updates create-listing flow with AI autofill, location, and payment option toggles. |
| mobile/app/(tabs)/wishlist.tsx | Removes wishlist tab implementation that used mock “saved” behavior. |
| mobile/app/(tabs)/swipe.tsx | Replaces mock swipe deck with backend feed + swipe commit calls. |
| mobile/app/(tabs)/profile.tsx | Replaces mock profile with backend-driven profile + payouts connect + activity links + admin entry. |
| mobile/app/(tabs)/listings.tsx | Removes old listings tab that depended on mock hooks. |
| mobile/app/(tabs)/home.tsx | Adds new home tab with sections (recommended/hot/viewed/new) and hero banner. |
| mobile/app/(tabs)/chat.tsx | Updates chat inbox to use backend inbox endpoint and socket refresh. |
| mobile/app/(tabs)/_layout.tsx | Reworks tab layout: home/community/match/chat/profile. |
| mobile/app/_layout.tsx | Adds auth + onboarding routing bridge and optional StripeProvider wrapping. |
| frontend/app/purchase-history/page.tsx | Extends purchase history UI to include offers sent/received and offer actions. |
| frontend/app/listings/[id]/page.tsx | Adds “make an offer” modal, existing-offer state, and cancel-offer action. |
| backend/src/modules/transactions/transactions.service.ts | Uses accepted offer price when creating direct-reservation transactions. |
| backend/src/modules/payments/payments.service.ts | Uses accepted offer price when creating Stripe PaymentIntents. |
| backend/src/modules/offers/offers.service.ts | Adds Offers domain logic including create/accept/reject/cancel and inbox queries. |
| backend/src/modules/offers/offers.module.ts | Registers Offers module and dependencies. |
| backend/src/modules/offers/offers.controller.ts | Adds authenticated HTTP endpoints for offers. |
| backend/src/modules/offers/dto/create-offer.dto.ts | Adds DTO validation for creating offers. |
| backend/src/modules/chat/chat.module.ts | Exports ChatService for use by OffersService. |
| backend/src/app.module.ts | Wires OffersModule into the NestJS app. |
| backend/prisma/schema.prisma | Adds Offer model/status enum and links offers to users/listings; adds Role.MODERATOR. |
Files not reviewed (1)
- mobile/package-lock.json: Generated file
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+68
to
+91
| let conversation = await this.prisma.conversation.findFirst({ | ||
| where: { | ||
| listingId: listing.id, | ||
| members: { | ||
| every: { | ||
| userId: { in: [dbUser.id, listing.sellerId] } | ||
| } | ||
| } | ||
| } | ||
| }); | ||
|
|
||
| if (!conversation) { | ||
| conversation = await this.prisma.conversation.create({ | ||
| data: { | ||
| listingId: listing.id, | ||
| members: { | ||
| create: [ | ||
| { userId: dbUser.id }, | ||
| { userId: listing.sellerId } | ||
| ] | ||
| } | ||
| } | ||
| }); | ||
| } |
Comment on lines
+11
to
+18
| const building = useMemo(() => { | ||
| if (!locationName) return defaultLocation; | ||
| return uicBuildings.find(b => b.name === locationName || b.shortName === locationName) || defaultLocation; | ||
| }, [locationName]); | ||
|
|
||
| const lat = building.coordinates ? building.coordinates[1] : building.lat; | ||
| const lng = building.coordinates ? building.coordinates[0] : building.lng; | ||
|
|
| <body> | ||
| <div id="map"></div> | ||
| <script> | ||
| mapboxgl.accessToken = '${token}'; |
| }); | ||
|
|
||
| const buildings = ${buildingsJson}; | ||
| const targetName = "${locationName || ''}"; |
Comment on lines
86
to
+106
| export const categoryColors: Record<string, string> = { | ||
| HOUSING: palette.catRead, | ||
| DORM: palette.catRead, | ||
| SUBLEASE: palette.catRead, | ||
| CLOTHES: palette.catEdit, | ||
| SCHOOL: palette.catGrep, | ||
| LEISURE: palette.catThinking, | ||
| ACCESSORIES: palette.catDone, | ||
| SERVICES: palette.catGrep, | ||
| OTHER: palette.catNeutral, | ||
| }; | ||
|
|
||
| export const categoryLabels: Record<string, string> = { | ||
| DORM: 'Dorm', | ||
| SUBLEASE: 'Sublease', | ||
| CLOTHES: 'Clothing', | ||
| SCHOOL: 'School', | ||
| LEISURE: 'Leisure', | ||
| ACCESSORIES: 'Accessories', | ||
| SERVICES: 'Services', | ||
| OTHER: 'Other', | ||
| }; |
| onboardingComplete?: boolean; | ||
| isEduVerified?: boolean; | ||
| stripeAccountLinked?: boolean; | ||
| role?: 'USER' | 'ADMIN'; |
Comment on lines
+1
to
+2
| const clerk = require('@clerk/clerk-expo'); | ||
| console.log(Object.keys(clerk).filter(k => k.includes('SignIn'))); |
- Add hero banner and filter dropdowns to listing categories - Fix community filter bar and add anonymous post mode - Fix community post images not loading (switch to RN Image for S3 URLs) - Remove bottom navbar and consolidate top navbar on home page - Restore hooks and fix syntax errors
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.