How atalaymurat/my-app works
This repository is a business-management web application: users authenticate, then manage companies and contacts, product catalogs, offers, and price lists through a Next.js interface backed by an Express API and MongoDB models. The backend also proxies authentication and organization requests to separate services, and exposes PDF, scraping, uploads, reporting, logs, and health capabilities. The tree and excerpts establish the major feature areas; several route-to-controller and frontend-to-API links are not shown, so those connections are omitted.
Main entry points: routes/index.js API route registry · priceListController.js Price lists and snapshots · backend/index.js Express API · auth-proxy.js Auth proxy
Components 34
Web application
- Sign-in and session
frontend/context/authFunctions.js - Company management
frontend/components/company/CompanyPage.js - Contact management
frontend/components/contact/ContactPage.js - Offer workspace
frontend/components/offer/OfferPage.js - Catalog workspace
frontend/components/master/MasterPage.js - Price list workspace
frontend/components/priceList/PriceListPage.js - Admin and logs
frontend/app/shield/logs/page.jsx
API gateway
- Express API
backend/index.js - API route registry
backend/routes/index.js - Auth proxy
backend/routes/auth-proxy.js - Organization proxy
backend/routes/org-proxy.js
Sales domain
- Company records
backend/controllers/companyControl.js - Contact records and imports
backend/controllers/contactsControl.js - Offer lifecycle
backend/controllers/offerController.js - Quick offers
backend/controllers/simpleOfferController.js - Company store
backend/models/company/Company.js - Contact store
backend/models/contact/Contact.js - Offer store
backend/models/offer/Offer.js
Catalog and pricing
- Master products
backend/controllers/masterProductController.js - Product options
backend/controllers/optionsController.js - Product makes
backend/controllers/makesController.js - Price lists and snapshots
backend/controllers/priceListController.js - Master product store
backend/models/masterProduct/MasterProduct.js - Price list store
backend/models/priceList/PriceList.js - Snapshot store
backend/models/priceList/PriceListSnapshot.js
Operations
- PDF generation endpoints
backend/controllers/pdfController.js - Contact scraping
backend/controllers/scrape.js - File uploads
backend/controllers/uploadController.js - Statistics
backend/controllers/statsController.js - Application logs
backend/controllers/logsController.js - Logging transport
backend/config/logger.js - Service health checks
backend/utils/serviceHealthCheck.js
Other components
- Staff user
- Auth service
Connections 23
- Staff user → Sign-in and session: signs in
frontend/context/authFunctions.js - Sign-in and session → Auth proxy: requests auth
frontend/context/authFunctions.js - Auth proxy → Auth service: proxies requests
backend/routes/auth-proxy.js - Express API → API route registry: mounts API
backend/index.js - API route registry → Auth proxy: mounts auth
backend/routes/index.js - API route registry → Organization proxy: mounts organization
backend/routes/index.js - API route registry → Company records: mounts company routes
backend/routes/index.js - API route registry → Contact records and imports: mounts contact routes
backend/routes/index.js - API route registry → Master products: mounts catalog routes
backend/routes/index.js - API route registry → Product options: mounts option routes
backend/routes/index.js - API route registry → Product makes: mounts make routes
backend/routes/index.js - API route registry → Offer lifecycle: mounts offer routes
backend/routes/index.js - API route registry → Quick offers: mounts quick-offer routes
backend/routes/index.js - API route registry → Price lists and snapshots: mounts price-list routes
backend/routes/index.js - Company records → Company store: reads and writes
- Contact records and imports → Contact store: reads and writes
- Offer lifecycle → Offer store: reads and writes
backend/controllers/offerController.js - Master products → Master product store: reads and writes
backend/controllers/masterProductController.js - Price lists and snapshots → Price list store: reads and writes
backend/controllers/priceListController.js - Price lists and snapshots → Snapshot store: creates and updates
backend/controllers/priceListController.js - Price lists and snapshots → Master product store: loads products
backend/controllers/priceListController.js - Express API → Service health checks: runs checks
backend/index.js - Express API → Logging transport: logs runtime events
backend/index.js