How nguyendinhhoai1207/24ct-nguyendinhhoai works
This repository combines an editable-page builder with a dashboard for managing work items. The builder workflow is to add and arrange UI blocks, edit their content and styling, preview the page, and export or save its layout; the dashboard workflow loads records and supports CRUD, status changes, analytics, and reset. The server exposes separate layout and item APIs, using MongoDB when connected and JSON-file fallback storage otherwise. The README documents builder capabilities not fully shown in the sampled client API, so those links are marked as documented rather than inferred from imports.
Main entry points: App.jsx Application Shell · layoutController.js Layout Controller · itemController.js Item Controller · server.js Express Server
Components 28
Page Builder
- Block Templates
client/src/data/defaultBlocks.js - Add Block Dialog
client/src/components/AddBlockModal.jsx - Builder Toolbar
client/src/components/Toolbar.jsx - Page Canvas
client/src/components/Canvas.jsx - Block Renderer
client/src/components/BlockRenderer.jsx - Inline Text Editor
client/src/components/EditableText.jsx - Property Inspector
client/src/components/PropertyPanel.jsx - Layout Export
client/src/components/ExportModal.jsx
Work Dashboard
- Application Shell
client/src/App.jsx - Dashboard View
client/src/components/DashboardTab.jsx - Item CRUD View
client/src/components/CrudTab.jsx - Analytics View
client/src/components/AnalyticsTab.jsx - Profile View
client/src/components/ProfileTab.jsx - Item Editor
client/src/components/ItemModal.jsx - Auth Dialog
client/src/components/AuthModal.jsx - Item API Client
client/src/services/api.js
API Routing
- Express Server
server/src/server.js - Item Routes
server/src/routes/itemRoutes.js - Layout Routes
server/src/routes/layoutRoutes.js - Item Controller
server/src/controllers/itemController.js - Layout Controller
server/src/controllers/layoutController.js
Persistence
- Item Model
server/src/models/Item.js - Layout Model
server/src/models/Layout.js - Database Connection
server/src/config/db.js - MongoDB
- Item JSON Fallback
server/data/fallback_items.json - Layout JSON Fallback
server/data/fallback_layouts.json
Other components
- User
Connections 28
- User → Application Shell: uses
client/src/App.jsx - Application Shell → Dashboard View: renders
client/src/App.jsx - Application Shell → Item CRUD View: renders
client/src/App.jsx - Application Shell → Analytics View: renders
client/src/App.jsx - Application Shell → Profile View: renders
client/src/App.jsx - Application Shell → Item Editor: renders
client/src/App.jsx - Application Shell → Auth Dialog: renders
client/src/App.jsx - Application Shell → Item API Client: calls item APIs
client/src/App.jsx - User → Add Block Dialog: adds blocks
README.md - Block Templates → Add Block Dialog: supplies templates
client/src/components/AddBlockModal.jsx - Block Templates → Builder Toolbar: supplies palettes
client/src/components/Toolbar.jsx - Page Canvas → Block Renderer: renders blocks
client/src/components/Canvas.jsx - Block Renderer → Inline Text Editor: uses editor
client/src/components/BlockRenderer.jsx - User → Property Inspector: styles blocks
README.md - User → Layout Export: exports layout
README.md - Item API Client → Express Server: requests items
- Express Server → Item Routes: mounts route
server/src/server.js - Express Server → Layout Routes: mounts route
server/src/server.js - Item Routes → Item Controller: dispatches
server/src/routes/itemRoutes.js - Layout Routes → Layout Controller: dispatches
server/src/routes/layoutRoutes.js - Item Controller → Item Model: reads and writes
server/src/controllers/itemController.js - Layout Controller → Layout Model: reads and writes
server/src/controllers/layoutController.js - Item Controller → Database Connection: checks status
server/src/controllers/itemController.js - Layout Controller → Database Connection: checks status
server/src/controllers/layoutController.js - Database Connection → MongoDB: connects
server/src/config/db.js - Item Controller → Item JSON Fallback: uses fallback
server/src/controllers/itemController.js - Layout Controller → Layout JSON Fallback: uses fallback
server/src/controllers/layoutController.js - Layout Controller → MongoDB: stores layouts
README.md