How samuel-cruz/desafio-front works
Project type and purpose
• This is a front-end only, single-page application (SPA) built with JavaScript, jQuery, Materialize CSS, and bundled by webpack.
• Its purpose is to authenticate a user, display a paginated grid of “people” from an external REST API (two versions: v1 or v2), and allow create/update/delete operations via a modal dialog.
File structure
• Top-level config and metadata:
• package.json / package-lock.json – npm metadata and scripts (npm start → webpack-dev-server on localhost:3340)
• webpack.config.js – defines entry point (src/main.js), loaders, output and dev-server.
• public/index.html – the HTML shell loaded into the browser.
• Source code (src):
• src/main.js – application bootstrap: imports styles, initializes routing or page mounting.
• src/pages/login – Login page view and styles.
• src/pages/home – Home page view, which includes the Grid and controls (version flag).
• src/components/table – Presentational Table component to show the list of people.
• src/components/modal – Create/update/delete modal dialog component.
• src/utils/alert.js – Utility for showing user alerts.
• No backend code – it consumes an existing remote API (https://desafio-meta-back.herokuapp.com).
README for additional insights
• It confirms login credentials, grid features, version-flag behavior (v1 optional address, v2 requires address).
• Technologies and how to run locally.