How jhan7two/sistema_vidrieria works
Project Type and Purpose
• This is a full-stack web application (“Sistema Vidriería”) for managing a glassworks business.
• The backend (Node.js + Express) provides a REST API and database access; the frontend (Vue.js) delivers a single-page application (SPA) UI.
File Structure Analysis
• Top-level directories: /backend and /frontend.
• Backend:
• config/ (DB and server configuration)
• models/ (Sequelize or similar ORM entities + associations)
• controllers/ (business logic for entities: user, cliente, venta, etc.)
• routes/ (Express endpoints exposing controllers)
• middlewares/ (authentication)
• utils/ (helper functions)
• Frontend:
• src/components/ (Vue components, organized by feature and layout)
• src/views/ (page-level Vue views grouped by route)
• src/router/ (Vue Router setup)
• src/store/ (Vuex or Pinia stores)
• src/services/ (API wrappers)
• assets/ and styles/ for static CSS
README Insights
• Confirms a REST-based backend and Vue-based SPA.
• Lists primary features: client, sales, inventory, authentication.
a. Frontend SPA (Vue.js + Vue Router + Vuex)
b. Backend API (Node.js + Express + Controllers + Models)
c. Database (e.g., MySQL/PostgreSQL via ORM)
d. External services (authentication middleware, possibly third-party email/SMS)
Relationships and Interactions
• The user’s browser hosts the SPA.
• SPA → API calls (JSON over HTTP/HTTPS) to backend routes (e.g., /api/ventas).
• Backend → ORM → Database for CRUD operations.
• Auth middleware protects certain endpoints; optionally integrate OAuth/JWT.
• (Optional) External notifications or reporting services.
Architectural Patterns
• MVC-ish on the backend: Controllers ↔ Models ↔ Routes.
• Service layer on the frontend: Components → Services → API → Store → Components.
• Stateless REST API, token-based authentication.
Technologies & Frameworks
• Backend: Node.js, Express, Sequelize (or similar), JWT or session middleware, YAML/K8s config (render.yaml).
• Frontend: Vue.js (v3), Vue Router, Vuex/Pinia, Vite, Tailwind CSS.
• Database: Relational (MySQL/PostgreSQL).