How ashutpandey/re101 works
1. Overall shape
- This repository is a React + Vite single-page application for cybersecurity learning content, with a Node/Express backend and a Supabase-backed data layer.
- The UI is the primary product, but the presence of backend/, api/, and Supabase scripts means the app is not purely static; it has a server/API boundary for data access and proxying.
2. Frontend shell
- src/main.jsx boots the app, and src/App.jsx is the top-level composition/routing shell.
- The frontend appears to be organized as a page-based SPA with four main views: roadmap, tools, community, and threat feed.
3. Feature pages as separate domains
- src/RoadmapPage.jsx handles the learning progression experience.
- src/ToolsPage.jsx owns the cybersecurity tools catalog and detail views.
- src/CommunityPage.jsx aggregates experts, blogs, and community resources.
- src/ThreatFeedPage.jsx represents the intelligence/feed surface.
- These pages are largely independent functional areas, which is useful for drawing the UI as four peer subsystems under the app shell.
4. Client-side data access
- src/services/api.js is the frontend’s API abstraction, acting as the boundary between the React pages and backend endpoints.
- This suggests pages do not talk directly to external services; they likely go through a shared service layer for fetching content and keeping the UI decoupled from transport details.
5. Backend service layer
- backend/server.js is the main Express server entry point.
- backend/routes/ contains feature-oriented route modules:
- blogs.js
- communities.js
- people.js
- tools.js
- proxy.js
- This indicates a domain-based API structure rather than a generic CRUD backend.
6. Proxy boundary
- backend/routes/proxy.js is an important architectural clue: the backend is likely acting as a safe intermediary for third-party or external content sources.
- In diagrams, this should be shown as the app server mediating requests to outside services rather than the browser calling them directly.
7. Supabase as persistence/integration layer
- backend/lib/supabase.js centralizes Supabase client setup.
- backend/scripts/seed-supabase.js, backend/scripts/seed.js, and scripts/supabase-migration.sql show that Supabase is used for structured content storage and initialization/migration.
- The repo also includes SUPABASE_SETUP.md, reinforcing that Supabase is a first-class deployment dependency.
8. Data model implied by routes
- The backend route split strongly suggests four primary content entities: tools, people, blogs, and communities.
- The frontend pages map closely to those entities, so the architecture is content-driven: pages render curated datasets rather than deeply transactional workflows.
9. Threat intel feed
- The threat feed page likely depends on either backend aggregation or external feed/proxying, not just static content.
- Because the README emphasizes “real-time threat intelligence updates” and IOC sharing, this area is the most likely to involve external service calls and backend mediation.
10. Deployment/runtime boundary
- vercel.json and api/index.js indicate support for serverless deployment on Vercel.
- The repository therefore supports at least two runtime shapes:
- local/standalone Express backend via backend/server.js
- serverless API entry via api/index.js
11. Build and frontend tooling
- vite.config.js shows the frontend build pipeline is Vite-based.
- Root package.json and package-lock.json imply the main app is managed from the repo root, with a separate backend/package.json for server-side dependencies/runtime isolation.
12. Operational scripts
- The scripts/ directory contains deployment/fix utilities, including commit helpers and a Supabase migration script.
- These are supporting automation rather than runtime components, but they matter for understanding how the data layer is maintained and updated.
13. Key architectural boundary to diagram
- The most important diagram boundary is:
- React SPA in the browser
- Backend API/proxy layer
- Supabase/external data sources
- The pages are UI consumers; the backend is the content and integration gatekeeper.
14. What is not present
- There is no evidence of user authentication, job queues, or complex state orchestration in the file tree.
- The architecture is therefore centered on curated content delivery, filtering, and detail presentation, with modest server-side support for data access and integration.
Main entry points: index.js Vercel API · server.js Express server · supabase.js Supabase client · App.jsx App shell
Components 19
Frontend
React/Vite SPA and page composition
- main.jsx · Bootstraps the React app
src/main.jsx - App shell · Top-level routing and composition
src/App.jsx - Roadmap · Learning progression view
src/RoadmapPage.jsx - Tools · Tools catalog and details
src/ToolsPage.jsx - Community · Experts, blogs, and community resources
src/CommunityPage.jsx - Threat Feed · Threat intelligence feed surface
src/ThreatFeedPage.jsx - API client · Shared client-side request abstraction
src/services/api.js
Backend
Express API and serverless entrypoints
- Vercel API · Serverless deployment entrypoint
api/index.js - Express server · Main backend runtime entrypoint
backend/server.js - Tools route · Tools API domain
backend/routes/tools.js - People route · People API domain
backend/routes/people.js - Blogs route · Blogs API domain
backend/routes/blogs.js - Communities route · Communities API domain
backend/routes/communities.js - Proxy route · Mediates external or third-party content access
backend/routes/proxy.js
Data Layer
Supabase client and migrations/seeding
- Supabase client · Central Supabase configuration
backend/lib/supabase.js - Migration SQL · Supabase schema and data setup
scripts/supabase-migration.sql - Seed scripts · Populate Supabase with initial content
backend/scripts/seed-supabase.js
Ops
Build and deployment support
- Vite config · Frontend build configuration
vite.config.js - Vercel config · Deployment and runtime routing config
vercel.json
Connections 31
- main.jsx → App shell: mounts · Bootstraps the SPA shell
- App shell → Roadmap: renders · Primary feature page
- App shell → Tools: renders · Primary feature page
- App shell → Community: renders · Primary feature page
- App shell → Threat Feed: renders · Primary feature page
- Roadmap → API client: fetches · Loads structured content through shared API layer
- Tools → API client: fetches · Loads tools data through shared API layer
- Community → API client: fetches · Loads community/blog/person data through shared API layer
- Threat Feed → API client: fetches · Loads threat intelligence through shared API layer
- API client → Vercel API: calls · Browser requests serverless backend when deployed on Vercel
- API client → Express server: calls · Browser requests Express API in standalone runtime
- Vercel API → Tools route: routes · Domain endpoint
- Vercel API → People route: routes · Domain endpoint
- Vercel API → Blogs route: routes · Domain endpoint
- Vercel API → Communities route: routes · Domain endpoint
- Vercel API → Proxy route: routes · Integration boundary
- Express server → Tools route: mounts · Registers feature routes
- Express server → People route: mounts · Registers feature routes
- Express server → Blogs route: mounts · Registers feature routes
- Express server → Communities route: mounts · Registers feature routes
- Express server → Proxy route: mounts · Registers integration proxy
- Tools route → Supabase client: reads/writes · Persists or queries tools content
- People route → Supabase client: reads/writes · Persists or queries people data
- Blogs route → Supabase client: reads/writes · Persists or queries blog content
- Communities route → Supabase client: reads/writes · Persists or queries community data
- Proxy route → Supabase client: uses · May enrich or cache proxied data via shared client
- Seed scripts → Supabase client: initializes · Seeds structured content into Supabase
- Migration SQL → Supabase client: migrates · Defines database schema and setup
- Vite config → main.jsx: builds · Front-end bundling entry
- Vercel config → Vercel API: deploys · Serverless API runtime
- Vercel config → App shell: serves · SPA hosting and routing