How alfredocoj007-sketch/farmacia-frontend works
FrontendFarmacia is an Angular pharmacy-management interface. Users sign in, enter a guarded shell, and work through sales, inventory and operational workflows; feature services exchange data with an external API. The routes document product areas not sampled in source, while service-call details are shown only where supported by excerpts. The backend’s internal behavior is outside this repository.
Main entry points: auth.service.ts Authentication service · app.routes.ts Feature routes · auth.interceptor.ts Auth interceptor · main.ts Angular bootstrap
Components 22
Application entry
- Angular bootstrap
src/main.ts - Feature routes
src/app/app.routes.ts - Application shell
src/app/layout/shell/shell.ts
Identity and access
- Login screen
src/app/features/login/login.ts - Authentication service
src/app/core/services/auth.service.ts - Route guards
src/app/core/guards/auth.guard.ts - Role guard
src/app/core/guards/role.guard.ts - Auth interceptor
src/app/core/interceptors/auth.interceptor.ts
Sales and orders
- Sales
src/app/features/ventas/ventas.ts - Cash management
src/app/features/cajas/cajas-list/cajas-list.ts - Call-center orders
src/app/features/call-center/pedidos-list/pedidos-list.ts
Inventory operations
- Product catalog
src/app/features/productos/productos-list/productos-list.ts - Lots and kardex
src/app/features/lotes/lotes-list/lotes-list.ts - Branch transfers
src/app/features/transferencias/transferencias-list/transferencias-list.ts
Business administration
- Branches
src/app/features/sucursales/sucursales-list/sucursales-list.ts - Fixed assets
src/app/features/activos-fijos/activos-list/activos-list.ts - Payroll
src/app/features/planillas/planillas-list/planillas-list.ts - Audit
src/app/features/auditoria/auditoria-list/auditoria-list.ts - User administration
src/app/features/usuarios/usuarios-list/usuarios-list.ts - Dashboard
src/app/features/dashboard/dashboard.ts
Other components
- Staff user
- Backend API
Connections 26
- Staff user → Angular bootstrap: opens app
- Angular bootstrap → Feature routes: starts routing
- Feature routes → Login screen: loads login
- Feature routes → Application shell: loads shell
- Feature routes → Route guards: checks access
- Feature routes → Role guard: checks roles
- Login screen → Authentication service: submits credentials
- Authentication service → Backend API: requests login/profile
- Authentication service → Auth interceptor: HTTP requests
- Auth interceptor → Authentication service: reads token
- Auth interceptor → Backend API: forwards authorized requests
- Route guards → Authentication service: checks session
- Role guard → Authentication service: checks user role
- Application shell → Sales: hosts feature routes
- Sales → Backend API: sales data
- Cash management → Backend API: cash operations
- Call-center orders → Backend API: order operations
- Product catalog → Backend API: product data
- Lots and kardex → Backend API: lot and movement data
- Branch transfers → Backend API: transfer operations
- Branches → Backend API: branch data
- Fixed assets → Backend API: asset operations
- Payroll → Backend API: payroll operations
- Audit → Backend API: audit data
- User administration → Backend API: user administration
- Dashboard → Backend API: dashboard data