How skgezhil/insiit-h-react works
Project type and purpose
• This is a full-stack-style single-page application (SPA) built entirely on the frontend (React + TypeScript) with no in-repo backend code.
• Its purpose is to provide a content-driven platform: blog posts (rich text via EditorJS), Q&A/forum, admin review (approval queue, flagged content), user profiles, search, and Google OAuth authentication.
File structure
• Top-level files: configuration (.babelrc, jest.config.ts, vite.config.ts, tsconfig.json), build scripts, public/index.html.
• src/ contains all application code:
• components/ — UI widgets (header, footer, paginators, protected routes, accordions, editor, rendering elements).
• pages/ — route targets (HomePage, ForumPage, BlogPage, AdminPage, QuestionPage, etc.).
• layouts/ — higher-order wrappers (mainLayout, forumLayout, blogPageLayout, ProtectedRoute).
• store/ — Redux Toolkit slices and actions for app state (questions, blogs, users, admin queues, navigation).
• services/ — API integration layers (questionServices, blogServices, userService, adminServices, faqServices, tagService).
• context/ — React Context for cross-cutting concerns (authContext, toastContext).
• hooks/ — custom hooks for data fetching/progress.
• utils/ — pure helpers (formatDate, markdown/GraphQL string conversion).
• models/ — TypeScript data models (Question, User, Block).
• config/ — constants.
README for additional insights
• Confirms use of React 18, Vite, Redux Toolkit, React Router v6, Tailwind CSS, Material Tailwind, EditorJS with plugins, Fuse.js search, Google OAuth, TypeScript, Jest + RTL testing.
• No backend code in-repo; services likely wrap HTTP/GraphQL calls to an external API.