How heeyeon205/newsion-client works
Project type and purpose
• This is a React-based single-page application (SPA) built with Vite.
• Purpose: A “NEWSION” preview platform combining news, user-generated articles, message boards, polls, AI chat, and admin/user management. It consumes a backend API (authentication, CRUD, SSE) and integrates with external services (AI, social login).
File structure
• Top-level:
• index.html, public/ → Static assets;
• src/ → All React code;
• vite.config.js → Build configuration;
• package-lock.json, eslint.config.js → Tooling.
• src/api/axios.js → Centralized HTTP client.
• src/store/ → Global state hooks (e.g., user/session via Zustand or similar).
• src/routes/ → Layout, header/footer components and navigation.
• src/pages/ → Feature modules organized by domain: user, news, board, article, poll, notice, mypage, admin, AI.
• src/utils/ → Shared utilities (formatters, token checks, SSE notification, infinite scroll).
Elements
• From React pages → Axios client → Backend REST endpoints.
• From Backend → Database (read/write).
• From Backend → SSE → Client.
• From Client/Backend → External services.
• API & services in another.
• Data stores in a third.
• External dependencies in a fourth.