How vgvengi/crm-full-stack works
Purpose and Shape
This is a small CRM-style dashboard with Companies and Contacts management views, plus dashboard widgets for tasks, meetings, and sales pipeline. It is split into a React/Vite frontend and a Node/TypeScript backend with database-backed resource routes.
Runtime Entry Points
• Frontend bootstraps React from frontend/src/main.tsx, renders the application shell in frontend/src/App.tsx, and defines page selection in frontend/src/routes/AppRoutes.tsx.
• Backend starts its HTTP server in backend/server.ts; database connectivity is centralized in backend/config/db.ts.
Frontend Application Shell
• The dashboard layout is the main UI composition boundary in frontend/src/layouts/dashboard/Dashboard.tsx.
• Navigation is represented by side-navigation and top-bar components, notably frontend/src/components/side-nav/SideNav.tsx and frontend/src/components/top-bar/TopBar.tsx.
• The UI uses local reusable primitives under frontend/@/components/ui/button.tsx and frontend/src/ui/tooltip.tsx; these are presentation infrastructure rather than domain ownership.
Companies Domain Flow
• The Companies page is rooted at frontend/src/pages/companies/Companies.tsx.
• Table-based display and row rendering are separated into frontend/src/pages/companies/components/CompaniesTable.tsx and frontend/src/pages/companies/components/CompaniesTableRow.tsx.
• Company creation/editing is represented by frontend/src/pages/companies/components/CompanyForm.tsx.
• Backend company HTTP handling is isolated in backend/routes/companies.routes.ts, forming the frontend-to-server domain boundary.
Contacts Domain Flow
• Contacts are rendered from frontend/src/pages/contact/Contacts.tsx and frontend/src/pages/contact/ContactsTable.tsx.
• Contact and related company edits have dedicated screens in frontend/src/pages/contact/EditContacts.tsx and frontend/src/pages/contact/EditCompanies.tsx.
• New-contact/account workflows are grouped under frontend/src/pages/contact/create-new/CreateNew.tsx and frontend/src/pages/contact/create-new/NewAccounts.tsx.
• Backend contact endpoints are owned by backend/routes/contacts.routes.ts.
Dashboard Modules
• The home/dashboard content begins at frontend/src/pages/home/Home.tsx.
• Domain widgets are independently composed for meetings, tasks, and pipeline: frontend/src/components/meetings/MeetingCard.tsx, frontend/src/components/tasks/Tasks.tsx, and frontend/src/components/sales-pipe-line/SalesPipeline.tsx.
• These appear to be frontend presentation modules; no corresponding backend routes are present in the supplied tree.
Data and Infrastructure Boundaries
• Browser navigation and component composition stay in the React frontend; resource persistence/API access should cross to the Node backend only through its Companies and Contacts routes.
• The backend database boundary is backend/config/db.ts; the specific database engine and ORM/driver are not identifiable from the supplied tree.
• Material runtimes are Vite/React/TypeScript in frontend/ and Node/TypeScript in backend/, with no external SaaS integrations visible.
Main entry points: AppRoutes.tsx App routes · Companies.tsx Companies page · companies.routes.ts Companies API · contacts.routes.ts Contacts API
Components 16
React frontend
Vite/React dashboard runtime.
- React bootstrap
frontend/src/main.tsx - Application shell
frontend/src/App.tsx - App routes
frontend/src/routes/AppRoutes.tsx - Dashboard layout · Main UI composition boundary.
frontend/src/layouts/dashboard/Dashboard.tsx - Navigation chrome · Side navigation and top bar.
frontend/src/components/side-nav/SideNav.tsx - Home dashboard
frontend/src/pages/home/Home.tsx - Dashboard widgets · Meetings, tasks, and sales pipeline widgets.
frontend/src/components/meetings/MeetingCard.tsx - Companies page
frontend/src/pages/companies/Companies.tsx - Companies table · Includes row rendering.
frontend/src/pages/companies/components/CompaniesTable.tsx - Company form
frontend/src/pages/companies/components/CompanyForm.tsx - Contacts page · Contacts table and edit screens.
frontend/src/pages/contact/Contacts.tsx - Contact/account workflow · New contact and account screens.
frontend/src/pages/contact/create-new/CreateNew.tsx
Node backend
HTTP API and database boundary.
- HTTP server
backend/server.ts - Companies API
backend/routes/companies.routes.ts - Contacts API
backend/routes/contacts.routes.ts - Database connection · Database engine is unspecified.
backend/config/db.ts
Connections 19
- React bootstrap → Application shell: renders
- Application shell → App routes: selects pages
- App routes → Dashboard layout: uses layout
- Dashboard layout → Navigation chrome: composes
- App routes → Home dashboard: routes to
- Home dashboard → Dashboard widgets: composes
- App routes → Companies page: routes to
- Companies page → Companies table: renders
- Companies page → Company form: creates and edits
- App routes → Contacts page: routes to
- Contacts page → Contact/account workflow: starts creation
- Companies page → Companies API: resource requests
- Company form → Companies API: mutations
- Contacts page → Contacts API: resource requests
- Contact/account workflow → Contacts API: creates contacts/accounts
- HTTP server → Companies API: registers
- HTTP server → Contacts API: registers
- Companies API → Database connection: persists
- Contacts API → Database connection: persists