How vuongnguyen333/trello-web works
Project type and purpose
• This is a full-stack Trello-style board application (a web front-end with a Node.js/MongoDB back-end).
• Users can create boards, drag & drop columns and cards, and perform CRUD operations via a REST API.
File structure
• Root files & config:
• package.json, package-lock.json, vite.config.js (build/config)
• .eslintrc.cjs, jsconfig.json (linting/IDE)
• Public assets: index.html, public/
• Front-end source (src/):
• main.jsx + App.jsx (entry point & root component)
• src/apis/ (API layer: request functions & mocks)
• src/redux/ (Redux store, slices & async requests)
• src/components/ (reusable UI components & menus)
• src/pages/ (page-level components, e.g., Auth, Boards)
• src/customHooks/ (React hooks)
• src/customLibraries/ (DndKitSensors for drag/drop)
• src/utils/ and theme.js (constants, formatters, styling)
README insights
• Front-end: React, Redux Toolkit, Vite
• Back-end (deployed separately): Node.js + MongoDB
Main components
a. Client (Browser) with React App
• Sub-components: UI Pages, Components, Custom Hooks, Redux Store
b. API Layer
• src/apis module (HTTP client, endpoints)
c. Back-end Service (Node.js/Express)
• Auth service
• Boards service (CRUD for columns/cards)
d. Database (MongoDB)
e. Optional: CDN or Static Asset Server (serving index.html and public/)
Relationships & data flows
• Browser → React UI → Redux actions → src/apis HTTP calls → Node.js API → MongoDB
• Response flows back: MongoDB → Node.js → Front-end → Redux store → UI updates
• Drag & drop events handled in UI (DndKitSensors) update state, then trigger API updates
Architectural patterns & design principles
• Separation of concerns:
• Presentation layer (React Components & Pages)
• State management (Redux Toolkit slices)
• API abstraction (src/apis)
• Persistence layer (MongoDB via Node/Express)
• Single-page application served over Vite dev server or static host
Technologies & frameworks
• Front-end: React, Redux Toolkit, Vite, DndKitSensors, CSS Modules (App.css)
• Back-end: Node.js, Express (implicit), Mongoose/MongoDB
• Misc: ESLint, jsconfig (path aliases)
Detail level
• Back-end’s major logical modules (authentication, board management)