How dan1el-m/tarea-programada-2-bd1 works
Project type and purpose
• This is a full-stack web application for employee and movement tracking with user authentication.
• The frontend is built in Vue.js (SPA), the backend is a Python API (likely Flask or FastAPI), and the database logic lives in SQL Server (stored procedures under the SPs/ directory).
File structure
• Top-level folders:
• SPs/ – SQL stored procedures for all CRUD operations, login/logout, bitacora logging.
• backend/ – Python API entrypoint (main.py) and dependencies (requirements.txt).
• frontend/ – Vue.js application (components, views, router, assets, package.json, Vite config).
Main components
a. Client (Web Browser)
• Renders the Vue.js SPA (index.html, App.vue, views: login, empleados, movimientos, components: EmpleadosForm, MovementModal, etc.)
• Uses axios.js to send HTTP requests.
b. Frontend Application
• Vue Router manages URL-to-view mapping.
• Components dispatch API calls to the backend.
c. API Layer (Backend)
• main.py exposes REST endpoints (e.g. /login, /empleados, /movimientos).
• Implements business logic and input validation.
• Translates HTTP requests into stored procedure calls.
d. Database Layer
• SQL Server (or compatible) hosting tables and SPs: SP_Login, SP_InsertarEmpleado, SP_ListarMoviminetosPorEmpleado, SP_Bitacora_Add, etc.
• Encapsulates all data operations in stored procedures.
e. (Optional) Logging/Auditing
• Bitacora stored procedures capture user actions.
Relationships and interactions
• Browser → Vue.js SPA (static assets loaded over HTTP/HTTPS).
• SPA → Backend API (over HTTP/HTTPS via axios).
• API → Database (calls stored procedures via a DB driver).
• Database → API (returns result sets / status codes).
• API → SPA (JSON responses for rendering).
Architectural patterns & design principles
• Separation of concerns: UI (Vue) vs. API (Python) vs. Data (DB).
• RESTful API design (endpoints map to CRUD operations).
• Stored-procedure-centric data layer for security and performance.
• Optional: token-based authentication or session management (SP_Login / SP_Logout).
Relevant technologies/frameworks
• Frontend: Vue.js 3, Vite, Vue Router, Axios
• Backend: Python (Flask or FastAPI, inferred), pip dependencies in requirements.txt
• Database: MS SQL Server or similar (T-SQL SPs)
Detail without over-complicating
• Every major component and interaction path (login, data retrieval, updates, logging).
• If desired, add notes about retry, error handling, or security (input validation, auth tokens).