How ian-michaeloff/mentally works
Project type and purpose
• This is a front-end web application built with React, TypeScript and Vite.
• The multiple HTML templates (index.html, Registro_Alum.html, formulario-maestro.html, etc.) suggest a multi-page setup or a set of static pages that Vite will process and serve.
• Purpose: provide registration and recovery forms for “alumno” (student) and “maestro” (teacher).
File structure
• Top-level:
• package.json, package-lock.json → dependencies & scripts
• tsconfig.json + tsconfig.node.json → TypeScript compiler configuration
• vite.config.ts → Vite build/dev-server configuration
• .eslintrc.cjs → lint rules, ensuring code quality
• public/ → static assets (favicon, robots.txt, etc.)
• index.html and other .html files at root → entry points/templates for each page
• src/:
• main.tsx → application entry (hooks into index.html)
• App.tsx + CSS modules → core React components & styling
• assets/ and logos/ → images or other media
• No backend or API directories—pure front-end.
README
• Confirms usage of Vite with HMR via either plugin-react (Babel) or plugin-react-swc.
• Mentions ESLint config for TypeScript and React.
• No runtime API or database mentioned—this is a standalone SPA or static multi-page site.
Main components
a. Developer Workstation
• Code editor / terminal
• Git (clone/push/pull)
• Local Node.js + npm/yarn
b. Source Code
• React + TypeScript files (src/)
• HTML templates (root .html files)
• Static assets (public/, src/assets, src/logos)
• Config files (tsconfig, vite.config.ts, .eslintrc.cjs)
c. Build Toolchain
• Vite Dev Server
• HMR (Vite + plugin-react or plugin-react-swc)
• Serves on localhost:3000 (default)
• Production Bundler
• Vite’s Rollup under the hood
• Transpiler
• Babel or SWC via @vitejs/plugin-react or plugin-react-swc
• Linter
• ESLint + @typescript-eslint + react plugin
d. Runtime Environment
• Browser (Chrome, Firefox, etc.)
• Loads index.html or other pages → pulls JS/CSS bundles from the Vite server or static host
e. (Optional) Deployment Target
• Static file host (e.g., Netlify, Vercel, GitHub Pages)
• CI/CD pipeline (GitHub Actions, etc.)
Relationships and data flow
• Developer writes code → commits to Git → pushes to remote repo
• On “npm run dev”: Vite Dev Server watches src/ & public/ → compiles/transpiles on the fly → serves to Browser with HMR
• On “npm run build”: Vite bundles assets into dist/ → deploy to static host
• Browser requests HTML → Vite serves or host returns index.html + static pages → browser fetches JS/CSS → React hydrates DOM
• ESLint runs in pre-commit or CI to enforce code quality
Architectural patterns & design principles
• Component-based UI (React)
• Static multi-page or SPA with client-side routing (if implemented)
• Separation of concerns:
• src/ holds application logic
• public/ holds raw static assets
• Root .html files for page templates
• Config files separated at top level
• HMR for rapid developer feedback
• Type-checked linting for robustness
Final checklist
• Annotations calling out important config files (vite.config.ts, tsconfig.json, .eslintrc.cjs)