How devp19/resdex works
Project Type & Purpose
• ResDex is a full-stack, student-focused research-sharing platform.
• “resdex” – a React CRA front end + Express/Node back end (legacy)
• “resdex-v2” – a modern Next.js 13 (App Router, TypeScript) full-stack app
File Structure
A. Top-level monorepo
• root/.gitignore, package.json – orchestrates dependencies
• two sibling subfolders: resdex (v1) and resdex-v2 (v2)
B. resdex (v1)
• server/ — Express server (server.js) exposing REST endpoints, hosting static CRA build
• src/ — React app (CRA), pages under src/pages, common UI components, Firebase config, Google Docs service
C. resdex-v2 (v2)
• src/app/ — Next.js 13 App Router (page.tsx under folders for home, auth, profile, etc.)
• src/components/ — UI library (customized cards, magicui animations, base UI primitives)
• src/lib/ — supabaseClient.ts (database), firebaseConfig.ts (auth), utils
• next.config.ts, postcss.config.mjs, tsconfig.json
README for Insights
• A student-centric “publishing” platform
• Core features: authentication, paper uploads, peer/expert reviews, user portfolios
• Integrations: Firebase Auth, Supabase database, Google Docs embedding/service
Main Components
1. Client (User Browser / Mobile)
2. Front-End Application
• Legacy v1: CRA bundle served by Express
• v2: Next.js server (SSR/SSG) + React components
3. Back-End / API Layer
• v1 Express server endpoints
• v2 Next.js serverless route handlers or API endpoints (if any)
4. Authentication Service
• Firebase Auth (signup/login, password reset)
5. Database Service
• Supabase (PostgreSQL) – user profiles, papers, reviews, metadata
6. Storage / File Service
• Supabase Storage or Firebase Storage (for PDFs, images)
7. Third-Party Integrations
• Google Docs API / service for embedding and publishing docs
• Cloudflare (DNS, CDN) or AWS (if used in legacy config)
Inter-Component Relationships & Data Flows
• Browser ←→ Front-End (React or Next.js)
• Front-End ←→ Auth (Firebase Auth SDK)
• Front-End / Server ←→ Database (Supabase client library)
• Server (Express or Next.js) ←→ Google Docs Service (REST calls)
• Static assets (fonts, CSS, JS) served via CDN (Vercel/Cloudflare)
Architectural Patterns & Design Principles
• MVC-ish separation in v1: React views, Express controllers, service layer in src/services
• In v2: Container-component separation via Next.js App Router’s Server vs. Client components
• Reusable UI library: “src/components/ui” and “src/components/magicui”
• Hooks abstraction for cross-cutting concerns (use-mobile, use-outside-click, use3dTilt)
• Modular Monorepo: two versions side by side for migration
Details to Capture
• Both legacy and v2 to illustrate evolution if this matters for roadmap discussions
• Reusable UI component libraries and hooks as “internal modules”
• Where environment/config files sit (next.config.ts, postcss.config.mjs, awsConfig.js)