How vidhiu/mern_app_docker works
This repository combines a public SaaS-style site with an admin dashboard and an Express/MongoDB backend. The user-facing flow spans public pages and sign-in, then dashboard views for products, orders, inventory, users, and account settings; backend routes protect product and order operations and controllers persist domain records. The sampled code confirms several UI compositions and backend dispatches. The frontend API client’s server target and several unsampled dashboard integrations are not shown, so those connections are left unverified.
Main entry points: page.tsx Account settings · AuthModal.tsx Auth modal · productRoutes.js Product routes · api.ts API client
Components 34
Public site
- Home page
app/(public)/page.tsx - Features page
app/(public)/features/page.tsx - About page
app/(public)/about/page.tsx - Contact page
app/(public)/contact/page.tsx - Hero content
components/Hero.tsx - Feature content
components/Features.tsx - About content
components/About.tsx - Navigation
components/Navbar.tsx - Footer
components/Footer.tsx
Authentication
- Auth modal
components/AuthModal.tsx - Login form
components/LoginForm.tsx - Signup form
components/SignupForm.tsx - Login endpoint
backend/server.js - Token middleware
backend/middleware/authMiddleware.js
Dashboard
- API client
lib/api.ts - Dashboard overview
app/dashboard/page.tsx - Product management
app/dashboard/products/page.tsx - Product table
app/dashboard/products/ProductTable.tsx - Add product
app/dashboard/products/AddProductModal.tsx - Edit product
app/dashboard/products/EditProductModal.tsx - Order management
app/dashboard/orders/ordersPage.tsx - Inventory management
app/dashboard/inventory/InventoryTable.jsx - User management
app/dashboard/users/page.tsx - User table
app/dashboard/users/UserTable.tsx - Add user
app/dashboard/users/AddUserModal.tsx - Account settings
app/dashboard/settings/page.tsx - Profile view
components/dashboard/settings/ProfileView.tsx - Edit profile
components/dashboard/settings/EditProfileForm.tsx - Change password
components/dashboard/settings/ChangePasswordForm.tsx
Backend domain
- Product routes
backend/routes/productRoutes.js - Product operations
backend/controllers/productController.js - Product records
backend/models/Product.js
Backend platform
- Express server
backend/server.js
Other components
- Visitor
Connections 27
- Visitor → Home page: opens
README.md - Visitor → Features page: opens
README.md - Visitor → About page: opens
README.md - Home page → Hero content: renders
app/(public)/page.tsx - Features page → Feature content: renders
app/(public)/features/page.tsx - About page → About content: renders
app/(public)/about/page.tsx - Visitor → Contact page: opens
README.md - Navigation → Auth modal: opens
- Auth modal → Login form: renders
components/AuthModal.tsx - Auth modal → Signup form: renders
components/AuthModal.tsx - Login form → Login endpoint: submits to
- Login endpoint → Express server: served by
backend/server.js - Express server → Product routes: mounts
backend/server.js - Product routes → Token middleware: guards
backend/routes/productRoutes.js - Product routes → Product operations: dispatches
backend/routes/productRoutes.js - Product operations → Product records: queries
backend/controllers/productController.js - Dashboard overview → API client: fetches counts
app/dashboard/page.tsx - Order management → API client: uses
app/dashboard/orders/ordersPage.tsx - API client → Express server: requests
- Product management → Product table: renders
app/dashboard/products/page.tsx - Product management → Add product: opens
app/dashboard/products/page.tsx - Product table → Edit product: renders
app/dashboard/products/ProductTable.tsx - User management → User table: renders
app/dashboard/users/page.tsx - User management → Add user: opens
app/dashboard/users/page.tsx - Account settings → Profile view: renders
app/dashboard/settings/page.tsx - Account settings → Edit profile: renders
app/dashboard/settings/page.tsx - Account settings → Change password: renders
app/dashboard/settings/page.tsx