How suzeai/be_fe_ltw works
Project type and purpose
• This is a full-stack web application:
• Frontend (“fe” folder) built with React (create-react-app)
• Backend (“be” folder) built with Node.js/Express
• Persistence via a database (likely MongoDB given the “photoModel.js” and schema files)
• External service integration with Cloudinary for image storage
• JWT-based authentication
File structure
• Top-level separation: “be” (backend) and “fe” (frontend)
• Backend (“be”):
• config/ – middleware and third-party configs (auth, Cloudinary, error handling)
• controller/ – request handlers for photos and users
• db/ – connection, data loading script, models, and local “images” folder for seeding
• model/ – API response wrapper
• routes/ – Express routers for Admin, Photo, User
• index.js – Express app setup and server start
• Frontend (“fe”):
• public/ – host page and manifest
• src/ – React components, global CSS, custom Axios instance for API calls
• components/ – feature folders (Home, LoginRegister, PhotoDetail, TopBar, UploadPhoto, UserComments, UserDetail, UserList, UserPhotos)
• Deployment/config files: .env in both layers, package.json, and gitignored files
Extract additional insights from README
• Instructions to install and run backend and frontend
• Screenshots for key views: home, profile, comments
Detail
– Capture all controllers and routers as separate nodes
– Show middleware (JWT auth, error handling) as filters on the API layer
– Include the custom axiosCustom instance in the Frontend zone
– Highlight environment variables (.env) feeding into both Frontend and Backend