How yp9435/team_tails works
Project type and purpose
• This is a Single-Page Application (SPA) built with React, TypeScript, and Vite.
• It visualizes an employee hierarchy on an interactive chart (ReactFlowChart) and supports filtering via a sidebar.
• A mock server (Mirage) and an API client layer live under src/services, enabling real or simulated data fetches.
File structure
• src/components – presentational and container React components
– Layout (MainLayout, Sidebar, Navbar)
– Chart (EmployeeNode, ReactFlowChart)
– Sidebar UI (EmployeeTile, SearchFilter, TeamFilter)
• src/pages – top-level routes (Index, NotFound)
• src/hooks – custom hooks (data fetching, drag-and-drop, search)
• src/services – service layer (api.ts for real HTTP, mirage.ts for mock server)
• src/utils – pure functions (hierarchy building)
• src/types – TypeScript interfaces (employee.ts)
• Config files – vite.config.ts, tailwind.config.ts, eslint.config.js, tsconfig*.json
README for additional insights
• Core purpose: minimal React+TS+Vite template with HMR, ESLint recommendations
• Plugins, linting strategies, and production-grade ESLint setups are suggested
Elements
– UI components (blue rectangles)
– Logic/hooks (green)
– Services/external (orange)
– Utils/types (gray)
• Annotations for third-party libs (e.g., “ReactFlow.js” inside Chart Module)
• A small inset for Vite dev/build process feeding index.html to the browser