How devfer-sys/proy-joyeria works
JoyeriaLuxor is a Flask jewelry-store management application. Employees sign in, then manage customers, products, and employees; purchase registration records a purchase, creates its sales record, and updates product stock. Sales can be filtered and reported as PDFs, and purchases can be invoiced as PDFs. The graph follows the sampled controllers and model relationships; other controller-to-view wiring and startup registration are supported by the SOURCE INDEX, while unsampled details are omitted.
Main entry points: run.py Application startup · compra_controller.py Purchase workflow · database.py ORM setup · insert.py Initial data
Components 21
Web application
- Home page
controllers/main_controller.py - Login guard
utils/utils.py - Customer views
views/cliente_view.py - Product views
views/producto_view.py - Employee views
views/empleado_view.py - Purchase views
views/compra_view.py - Sales views
views/venta_view.py - Application startup
run.py
Store operations
- Employee access
controllers/empleado_controller.py - Customer management
controllers/cliente_controller.py - Product management
controllers/producto_controller.py - Purchase workflow
controllers/compra_controller.py
Sales records
- Sales reports
controllers/venta_controller.py
Persistence
- Customer records
models/cliente.py - Product records
models/producto.py - Employee records
models/empleado.py - Purchase records
models/compra.py - Sales records
models/venta.py - ORM setup
database.py - Initial data
insert.py
Other components
- Store employee
Connections 36
- Store employee → Application startup: opens app
- Application startup → Employee access: registers routes
run.py - Application startup → Customer management: registers routes
run.py - Application startup → Product management: registers routes
run.py - Application startup → Purchase workflow: registers routes
run.py - Application startup → Sales reports: registers routes
run.py - Application startup → Home page: registers routes
run.py - Employee access → Employee records: authenticates
controllers/empleado_controller.py - Employee access → Login guard: protects routes
controllers/empleado_controller.py - Employee access → Employee views: renders
controllers/empleado_controller.py - Customer management → Customer records: manages records
controllers/cliente_controller.py - Customer management → Customer views: renders
controllers/cliente_controller.py - Customer management → Purchase records: updates references
controllers/cliente_controller.py - Product management → Product records: manages records
controllers/producto_controller.py - Product management → Product views: renders
controllers/producto_controller.py - Product management → Purchase records: updates references
controllers/producto_controller.py - Purchase workflow → Purchase records: records purchase
controllers/compra_controller.py - Purchase workflow → Customer records: loads customer
controllers/compra_controller.py - Purchase workflow → Product records: checks stock
controllers/compra_controller.py - Purchase workflow → Employee records: loads employee
controllers/compra_controller.py - Purchase workflow → Sales records: creates sale
controllers/compra_controller.py - Purchase workflow → Purchase views: renders
controllers/compra_controller.py - Sales reports → Sales records: queries sales
controllers/venta_controller.py - Sales reports → Sales views: renders
controllers/venta_controller.py - Sales reports → Purchase views: renders invoice
- Customer records → ORM setup: uses ORM
models/cliente.py - Product records → ORM setup: uses ORM
models/producto.py - Employee records → ORM setup: uses ORM
models/empleado.py - Purchase records → ORM setup: uses ORM
models/compra.py - Sales records → ORM setup: uses ORM
models/venta.py - Application startup → ORM setup: initializes
run.py - Application startup → Initial data: loads data
run.py - Initial data → Customer records: creates records
insert.py - Initial data → Product records: creates records
insert.py - Initial data → Employee records: creates records
insert.py - Initial data → ORM setup: uses ORM
insert.py