How mxralesb/asistencia-front works
Project type and purpose
• This is a single-page web application (SPA) built with Create React App.
• Its main purpose is to provide two user roles—“Dirección” and “Docente”—with login screens, dashboards, profile management, and a QR-scanning feature.
File structure
• Top level:
• public/ – static HTML/CSS/manifest/robots.txt
• src/ – application code
• package*.json, tailwind.config.js, postcss.config.js – build & styling configs
• Inside src/:
• App.js, index.js – entry point and root component
• pages/ – feature pages (Login, Dashboard, Perfil, EscanearQR)
• services/ – network service abstractions (authService.js, docenteService.js)
• styles/ – per-page CSS (plus Tailwind)
• tests, setupTests, reportWebVitals – testing & analytics support
README
• Confirms a React SPA scaffolded by Create React App.
• No backend source here, so external APIs are implied.
a. Main components
• Client (Browser) running the React SPA
• UI Component Layer (App, Router, Pages)
• Service Layer (authService, docenteService)
• External Backend APIs (Authentication API, Docente API, QR-scan service if remote)
• Static Assets Host (public/*)
• Optional: CDN for JS/CSS, Analytics endpoint (reportWebVitals)
b. Relationships & interactions
1. User interacts with the Browser UI → React Router dispatches to a Page (Login, Dashboard, etc.).
2. Page components call service methods (authService.login, docenteService.getProfile).
3. Services send HTTP requests to External APIs → receive JSON responses.
4. Page components update state/props → UI re-renders.
5. QR scanning page invokes browser camera APIs (or a third-party JS library) → decodes QR → may call docenteService or another API.
c. Architectural patterns
• Single-Page Application with client-side routing (React Router implicit in App.js).
• Separation of concerns:
– Presentation (pages & CSS)
– Business logic / data fetching (services)
• Feature-folder structure under src/pages and src/services for modularity.
d. Key technologies/frameworks
• React (components, hooks, client-side rendering)
• Tailwind CSS + custom CSS modules
• Create React App toolchain (Webpack, Babel)
• Jest/React Testing Library (App.test.js, setupTests)
Elements
– from Browser → App Shell (load index.html → mount React)
– from Pages → Services → External APIs → back to Pages
– camera hardware → EscanearQR Page