How jhosuereymundo/punto-venta-g works
Project type and purpose
• This is an Angular front‑end application named ControlVentasFront, generated with Angular CLI v18.2.12.
• It implements Universal (SSR) via server.ts and main.server.ts, serving dynamic HTML from a Node/Express host.
• The app’s purpose is to manage sales control workflows: authentication, dashboards, sales (venta), purchases (compra), loans (prestamo), clients, products, suppliers, roles, users, etc.
File structure
• Top‑level files:
• angular.json, tsconfig*.json, package.json: Angular and TypeScript config
• server.ts, main.server.ts: Node/Express entry for server‑side rendering (SSR)
• proxy.conf.json: dev proxy for backend API
• src/app subdivided into:
• business/: feature modules (login, dashboard, gcliente, gproducto, gventa, etc.) following a route‑per‑module pattern
• core/: cross‑cutting concerns – guards (auth, admin) and core services (AuthInterceptor, AuthService)
• services/: wrappers around HTTP calls to backend REST endpoints (cliente.service.ts, venta.service.ts, etc.)
• models/: TypeScript interfaces/models representing domain entities
• shared/: UI components and utilities (header, footer, sidebar, layout, confirmdialog, notification)
• src/assets: static assets
• src/main.ts: client bootstrap, src/main.server.ts: server bootstrap for SSR
README for additional insights
• Standard Angular CLI project: dev server via ng serve, build via ng build, tests via ng test.
Detailed capture of essential elements
• AuthInterceptor intercepting outgoing HTTP calls and injecting JWT
• Guard flows (AuthGuard → allow/deny route activation)