How tearcake/picassa works
Picassa is a Pinterest-inspired visual-content application. Users authenticate, browse or search pins, open a post, and can create pins in an editor, organize them into boards, comment, like, save, and follow users. The frontend routes and components call a Node/Express API whose controllers operate on MongoDB models; pin creation also uploads transformed images to ImageKit. The graph preserves documented features whose implementations were not sampled, but marks those connections unverified rather than inferring their call paths.
Main entry points: main.jsx Route application · index.js Express application · pin.controller.js Pin service · createPage.jsx Pin creation
Components 32
Frontend experience
- Route application
frontend/src/main.jsx - Home and search
frontend/src/routes/homepage/homepage.jsx - Search page
frontend/src/routes/searchPage/searchPage.jsx - API client
frontend/src/utils/apiReq.js
Content and creation
- Pin gallery
frontend/src/components/gallery/gallery.jsx - Gallery item
frontend/src/components/galleryItem/galleryItem.jsx - Pin creation
frontend/src/routes/createPage/createPage.jsx - Image editor
frontend/src/components/editor/Options.jsx - Editor state
frontend/src/utils/editorStore.js - Pin detail page
frontend/src/routes/postpage/postpage.jsx - Comments view
frontend/src/components/comments/comments.jsx - Image rendering
frontend/src/components/image/image.jsx
Identity and social
- Authentication page
frontend/src/routes/authPage/authPage.jsx - Auth state
frontend/src/utils/authStore.js - Profile and boards
frontend/src/routes/profilePage/profilePage.jsx
API services
- Express application
backend/index.js - Pin routes
backend/routes/pin.route.js - Pin service
backend/controllers/pin.controller.js - User routes
backend/routes/user.route.js - User service
backend/controllers/user.controller.js - Comment routes
backend/routes/comment.route.js - Comment service
backend/controllers/comment.controller.js - Board routes
backend/routes/board.route.js - Board service
backend/controllers/board.controller.js - JWT verification
backend/middlewares/verifyToken.js
MongoDB models
- Pins
backend/models/pin.model.js - Users
backend/models/user.model.js - Boards
backend/models/board.model.js - Comments
backend/models/comment.model.js - Social interactions
backend/models
Other components
- Visitor or user
- ImageKit
Connections 47
- Visitor or user → Route application: opens
frontend/src/main.jsx - Route application → Authentication page: routes to
frontend/src/main.jsx - Route application → Home and search: routes to
frontend/src/main.jsx - Route application → Pin creation: routes to
frontend/src/main.jsx - Route application → Pin detail page: routes to
frontend/src/main.jsx - Route application → Profile and boards: routes to
frontend/src/main.jsx - Route application → Search page: routes to
frontend/src/main.jsx - Authentication page → API client: submits credentials
frontend/src/routes/authPage/authPage.jsx - Authentication page → Auth state: sets user
frontend/src/routes/authPage/authPage.jsx - Home and search → Pin gallery: renders
frontend/src/routes/homepage/homepage.jsx - Search page → Pin gallery: renders
frontend/src/routes/searchPage/searchPage.jsx - Pin gallery → Gallery item: renders pins
frontend/src/components/gallery/gallery.jsx - Pin gallery → Pins: requests pin pages
- Pin creation → Image editor: renders editor
frontend/src/routes/createPage/createPage.jsx - Pin creation → Editor state: reads editor state
frontend/src/routes/createPage/createPage.jsx - Pin creation → API client: submits pin
frontend/src/routes/createPage/createPage.jsx - Image editor → Editor state: updates options
frontend/src/components/editor/Options.jsx - Pin detail page → Comments view: renders comments
frontend/src/routes/postpage/postpage.jsx - Pin detail page → API client: loads post data
frontend/src/routes/postpage/postpage.jsx - Profile and boards → Pin gallery: renders user pins
frontend/src/routes/profilePage/profilePage.jsx - Profile and boards → API client: loads profile
frontend/src/routes/profilePage/profilePage.jsx - API client → Express application: HTTP requests
- Express application → Pin routes: mounts routes
backend/index.js - Express application → User routes: mounts routes
backend/index.js - Express application → Comment routes: mounts routes
backend/index.js - Express application → Board routes: mounts routes
backend/index.js - Pin routes → Pin service: dispatches
backend/routes/pin.route.js - User routes → User service: dispatches
backend/routes/user.route.js - Comment routes → Comment service: dispatches
backend/routes/comment.route.js - Board routes → Board service: dispatches
backend/routes/board.route.js - Pin routes → JWT verification: protects endpoints
backend/routes/pin.route.js - User routes → JWT verification: protects endpoints
backend/routes/user.route.js - Comment routes → JWT verification: protects endpoints
backend/routes/comment.route.js - Pin service → Pins: queries and creates
backend/controllers/pin.controller.js - Pin service → Users: populates user
backend/controllers/pin.controller.js - Pin service → Social interactions: reads and updates
backend/controllers/pin.controller.js - Pin service → ImageKit: uploads transformed media
backend/controllers/pin.controller.js - User service → Users: creates and queries
backend/controllers/user.controller.js - User service → Social interactions: manages follows
backend/controllers/user.controller.js - Comment service → Comments: queries and creates
backend/controllers/comment.controller.js - Comment service → Users: populates commenter
backend/controllers/comment.controller.js - Board service → Boards: queries boards
backend/controllers/board.controller.js - Board service → Pins: counts and finds pins
backend/controllers/board.controller.js - Gallery item → Image rendering: renders media
- Visitor or user → Profile and boards: follows users
- Visitor or user → Pin detail page: likes and saves
- Visitor or user → Pin creation: organizes into boards