How allanrye9/piitrade-videos works
Piitrade Videos is a short-video social product with mobile and web clients backed by an Express API. The principal mobile workflow lets guests browse and watch the feed; signed-in users can upload and interact, while uploads are processed and videos become available through the service. Visual search is a distinct discovery path, and the web client also provides share links, legal pages, and administration. The graph preserves documented capabilities, but several backend route implementations and client screens were not sampled; those links rely on README documentation rather than claims of source inspection.
Main entry points: index.ts Express API · App.tsx Mobile shell · visualSearch.ts Visual search route · main.tsx Web routes
Components 29
Mobile app
- Mobile shell
mobile/src/App.tsx - Feed and playback
mobile/src/screens/FeedScreen.tsx - Action sheets
mobile/src/sheets - Session and app state
mobile/src/state/AppContext.tsx - Mobile upload
mobile/src/sheets/UploadSheet.tsx - Mobile API client
mobile/src/api.ts
Web app
- Web routes
frontend/src/main.tsx - Web feed
frontend/src/App.tsx - Web authentication
frontend/src/components/AuthGate.tsx - Web upload manager
frontend/src/uploadManager.ts - Web discovery
frontend/src/components/DiscoverPage.tsx - Share and legal pages
frontend/src/components/VideoPermalinkPage.tsx - Admin dashboard
frontend/src/admin/AdminDashboard.tsx - Web API client
frontend/src/api.ts
API and domain
- Express API
backend/src/index.ts - Video routes
backend/src/routes/videos.ts - Authentication
backend/src/routes/auth.ts - Profiles and accounts
backend/src/routes/profile.ts - Social interactions
backend/src/routes/account.ts - Notifications
backend/src/routes/notifications.ts - Visual search route
backend/src/routes/visualSearch.ts - Image similarity
backend/src/lib/phash.ts - Image identification
backend/src/lib/aiSearch.ts - Marketplace search
backend/src/lib/marketplace.ts
Data and media
- Prisma database
backend/src/db.ts - Media storage
backend/src/lib/r2.ts
Other components
- Viewer
- Marketplace service
- AI identification service
Connections 33
- Viewer → Mobile shell: opens
README.md - Mobile shell → Feed and playback: renders
mobile/src/App.tsx - Mobile shell → Action sheets: dispatches
mobile/src/App.tsx - Mobile shell → Session and app state: provides state
mobile/src/App.tsx - Feed and playback → Mobile API client: requests feed
mobile/src/screens/FeedScreen.tsx - Action sheets → Session and app state: uses state
mobile/src/sheets/AuthSheet.tsx - Mobile upload → Mobile API client: uploads video
mobile/src/sheets/UploadSheet.tsx - Mobile API client → Express API: calls API
README.md - Web routes → Web feed: routes to
frontend/src/main.tsx - Web routes → Share and legal pages: routes to
frontend/src/main.tsx - Web routes → Admin dashboard: routes to
frontend/src/main.tsx - Web feed → Web upload manager: registers handler
frontend/src/App.tsx - Web upload manager → Web API client: uploads video
frontend/src/uploadManager.ts - Web feed → Web API client: requests feed
frontend/src/App.tsx - Web authentication → Web API client: authenticates
frontend/src/components/AuthGate.tsx - Web API client → Express API: calls API
README.md - Express API → Video routes: mounts
backend/src/index.ts - Express API → Visual search route: mounts
backend/src/index.ts - Express API → Authentication: mounts
backend/src/index.ts - Express API → Profiles and accounts: mounts
backend/src/index.ts - Express API → Social interactions: mounts
backend/src/index.ts - Express API → Notifications: mounts
backend/src/index.ts - Visual search route → Image identification: identifies image
backend/src/routes/visualSearch.ts - Visual search route → Marketplace search: searches products
backend/src/routes/visualSearch.ts - Visual search route → Image similarity: computes similarity
backend/src/routes/visualSearch.ts - Image identification → AI identification service: queries
- Marketplace search → Marketplace service: searches
- Viewer → Web routes: opens
README.md - Viewer → Web discovery: discovers videos
README.md - Viewer → Action sheets: requests actions
README.md - Session and app state → Mobile API client: loads profile
mobile/src/state/AppContext.tsx - Video routes → Prisma database: uses persistence
- Video routes → Media storage: stores media