How ghiberti85/devfinder-ssr works
Project type and purpose
• This is a full-stack web application built with Next.js (Node.js + React) using TypeScript and Tailwind CSS.
• It consumes the GitHub REST API to implement:
• A search page (SSR via getServerSideProps)
• A user profile page (ISR via getStaticProps + getStaticPaths)
• It includes dark-mode toggling via React Context and enforces code quality with ESLint/Prettier + Husky.
File structure
• Config & tooling (root): next.config.ts, tsconfig.json, postcss.config.mjs, tailwind.config.js, eslint.config.mjs, .husky hooks, .prettierrc.
• Public assets (public/)
• Source code (src/):
• pages/ → file-based routing:
– index.tsx (SSR search page)
– user/[username].tsx (ISR profile page + fallback/404)
• components/ → reusable UI pieces (ThemeToggle, UserCard, etc.)
• context/ → ThemeContext provider for dark mode
• lib/ (mentioned in README) → GitHub API wrappers & utilities
• styles/ → globals.css (Tailwind base + custom)
• types.d.ts → custom TypeScript types
Key README insights
• Rendering strategies: SSR for search, ISR for profiles (with incremental regeneration).
• Optional GITHUB_TOKEN via .env.local for rate-limit avoidance.
• Pre-commit linting with Husky + lint-staged.
• Deployed on any Node host or Vercel for built-in SSR/ISR support.