How rohith1888/jfsd_activity_hub works
Project Type and Purpose
• This is a single-page application (SPA) built with React, bootstrapped via Create React App.
• Purpose: Provide a student activity hub UI (clubs, events, admin module, authentication, etc.) that runs in the browser and communicates with a backend REST API (hosted in a separate repo).
Main Components
a. Browser / Client
• React SPA (App.js, router, pages under src/components)
• UI Modules:
• Public pages (Home, Clubs, Events, Contact, Login, SignUp, ForgotPassword)
• Protected pages (ProfilePage, MyEvents, Admin_module)
• Asset loader (BouncingDotsLoader), CSS modules, Tailwind (tailwind.config.js), images in src/Assets.
b. Build & Dev Tooling
• Webpack (config/webpack.*, craco.config.js)
• Babel transforms (config/jest/babelTransform.js for tests)
• Jest (config/jest/* and src/*.test.js)
• NPM scripts (scripts/start.js, build.js, test.js)
c. Hosting / Delivery
• Netlify (netlify.toml) or any static-hosted CDN
• Public folder (index.html, manifest.json)
d. Backend API (external)
• JFSD_ACTIVITY_HUB_BACKEND service
• Exposes REST endpoints: /clubs, /events, /students, /auth/login, etc.
e. External Services (optional)
• Authentication provider (if used), analytics, image CDN, etc.
Relationships & Data Flow
• The user’s browser loads index.html from Netlify → React App bundle (Webpack output).
• React App issues AJAX/fetch calls to the backend API over HTTPS.
• Responses populate state, update components.
• Admin module calls privileged endpoints (with JWT token in headers).
• Build pipeline (local dev) runs through Webpack/Babel, serves via webpack-dev-server.
• CI/CD pushes production build to Netlify.
Architectural Patterns & Design Principles
• Component-based architecture: small, reusable UI components under src/components.
• CSS Modules and utility-first Tailwind (tailwind.config.js) for styling isolation.
• Module directory structure: grouping by feature (Admin_module, css, Assets).
• Separation of concerns: UI vs build config vs static hosting vs API.