How adambudzinak/asos_projekt works
InstaLite is a photo-sharing social application: users register or sign in, then browse feeds and profiles, follow people, and interact with photos through comments, reactions, and reposts. The React client calls an Express API; protected routes dispatch to domain controllers, which use Prisma for persistence. The README documents PostgreSQL as the database. The graph preserves the documented product areas, but some frontend-to-API links are dashed because the excerpts do not establish their implementation-level wiring.
Main entry points: router.ts User API routes · server.ts Express server · PhotoModal.tsx Photo interactions · Profile.tsx Profile
Components 28
Web client
- App session
frontend/src/App.tsx - Sign in and register
frontend/src/index/AuthScreen.tsx - Home navigation
frontend/src/user/home-screen/HomeScreen.tsx - Feed browser
frontend/src/user/feed/Feed.tsx - People search
frontend/src/user/people/People.tsx - Profile
frontend/src/user/profile/Profile.tsx - User profile
frontend/src/user/people/UserProfile.tsx - Photo interactions
frontend/src/common/PhotoModal.tsx - Followers view
frontend/src/common/FollowersModal.tsx - Reaction details
frontend/src/common/ReactionsModal.tsx - Photo upload
frontend/src/common/UploadModal.tsx - HTTP client
frontend/src/auth/CrossOrigin.tsx
API and identity
- Express server
backend/src/server.ts - Guest authentication
backend/src/index/controller/guest.ts - Token and passwords
backend/src/index/controller/auth.ts - Route protection
backend/src/index/middleware/protect-route.ts - User API routes
backend/src/user/router.ts
Social activity
- User and avatar
backend/src/user/controller/user.ts - Follow relations
backend/src/user/controller/follow.ts - Photo comments
backend/src/user/controller/comment.ts - Photo reactions
backend/src/user/controller/reaction.ts - Photo reposts
backend/src/user/controller/repost.ts
Photos and feeds
- Photo management
backend/src/user/controller/photo.ts - Feeds and tags
backend/src/user/controller/feed.ts - Upload handling
backend/src/user/middleware/multer-config.ts
Persistence
- Prisma client
backend/src/database.ts - PostgreSQL
Other components
- User
Connections 39
- User → App session: uses
frontend/src/App.tsx - App session → Sign in and register: shows signed out
frontend/src/App.tsx - App session → Home navigation: shows signed in
frontend/src/App.tsx - Sign in and register → HTTP client: submits credentials
frontend/src/index/AuthScreen.tsx - Home navigation → Feed browser: renders
frontend/src/user/home-screen/HomeScreen.tsx - Home navigation → People search: renders
frontend/src/user/home-screen/HomeScreen.tsx - Home navigation → Profile: renders
frontend/src/user/home-screen/HomeScreen.tsx - Feed browser → Photo interactions: opens photo
frontend/src/user/feed/Feed.tsx - People search → User profile: opens profile
frontend/src/user/people/People.tsx - User profile → Photo interactions: opens photo
frontend/src/user/people/UserProfile.tsx - Profile → Photo interactions: opens photo
frontend/src/user/profile/Profile.tsx - Profile → Photo upload: opens upload
frontend/src/user/profile/Profile.tsx - Photo interactions → Reaction details: opens details
frontend/src/common/PhotoModal.tsx - Photo interactions → HTTP client: requests photo actions
frontend/src/common/PhotoModal.tsx - Feed browser → HTTP client: requests feeds
frontend/src/user/feed/Feed.tsx - Profile → HTTP client: requests profile data
frontend/src/user/profile/Profile.tsx - User profile → Followers view: shows followers
frontend/src/user/people/UserProfile.tsx - Express server → Guest authentication: routes sign-in
backend/src/server.ts - Express server → Route protection: protects API
backend/src/server.ts - Express server → User API routes: mounts API
backend/src/server.ts - Route protection → User API routes: permits requests
backend/src/server.ts - Guest authentication → Token and passwords: uses auth helpers
backend/src/index/controller/guest.ts - User API routes → User and avatar: dispatches user routes
backend/src/user/router.ts - User API routes → Follow relations: dispatches follow routes
backend/src/user/router.ts - User API routes → Photo management: dispatches photo routes
backend/src/user/router.ts - User API routes → Upload handling: handles uploads
backend/src/user/router.ts - User API routes → Photo comments: dispatches comment routes
backend/src/user/router.ts - User API routes → Photo reposts: dispatches repost routes
backend/src/user/router.ts - User API routes → Feeds and tags: dispatches feed routes
backend/src/user/router.ts - User API routes → Photo reactions: dispatches reaction routes
backend/src/user/router.ts - User and avatar → Prisma client: queries data
backend/src/user/controller/user.ts - Follow relations → Prisma client: queries data
backend/src/user/controller/follow.ts - Feeds and tags → Prisma client: queries data
backend/src/user/controller/feed.ts - Photo reactions → Prisma client: queries data
backend/src/user/controller/reaction.ts - Prisma client → PostgreSQL: persists records
README.md - Sign in and register → Express server: calls auth endpoints
- Feed browser → Express server: calls feed endpoints
- Profile → Express server: calls profile endpoints
- Photo interactions → Express server: calls photo endpoints