How 4geeksacademy/fs-pt-anafiguereo-contact_list works
Project type and purpose
• This is a front-end “multi-page” Single Page Application (SPA) template built with React, Vite, and React Router.
• Its primary purpose is to serve as a boilerplate for students to bootstrap new React websites with built-in state management (Context + useReducer), routing, API service utilities, and Vercel deployment.
File structure
• Top-level config files:
• vite.config.js — Vite bundler configuration
• eslint.cjs — linting rules
• vercel.json — deployment settings
• . env.example — environment variable template
• .devcontainer/ & .gitpod.yml — dev-container setups
• Public entry point: index.html
• Source code under src/:
• assets/ — images and static files
• components/ — reusable UI building blocks (Card, Navbar, Footer, Form, ScrollToTop)
• hooks/ — custom React hooks (useGlobalReducer)
• pages/ — route-mapped pages (Home, AddContact, Single, Demo, Layout)
• services/ — API‐interaction layer (apiServices.js)
• store.js — initial state and reducer setup
• routes.jsx — React Router definitions
• main.jsx — app entry, context provider, and router injection
README for additional insights
• Describes Context + useReducer “store” pattern as global state.
• Suggests use of Vite for bundling and Vercel for hosting.
• Mentions how pages map one-to-one with routes.