How piyushk-dev/gestify works
Project type and purpose
• Gestify is a full-stack web application built on Next.js with TypeScript and React Server Components.
• Its core purpose is to scrape news from multiple sources, summarize articles via the Gemini AI API, compare perspectives, store results, and deliver a personalized feed or newsletter to authenticated users.
File structure
• Top-level Next.js “app” directory holds routing, server components, and API routes under app/api.
• app/api/auth/* implements OAuth endpoints (login, logout, refresh) for Google.
• app/api/generate-pdf/route.ts exposes a PDF-generation micro-endpoint.
• app/components/… contains page-specific React components; a parallel components/ui folder holds shared UI primitives.
• lib/ encapsulates low-level logic:
• auth.ts for JWT/session handling
• mongodb.ts and postgres.ts (via Prisma in prisma.ts) for database connections
• actions.ts and utils.ts for business logic
• providers/authprovider.tsx wires up React context for auth state.
• Hooks folder centralizes custom React hooks (use-toast, use-mobile).
• Configuration files: next.config.mjs, tailwind.config.ts, postcss.config.mjs.
README for additional insights
• Tech stack: Next.js (with ISR every 12h + SSR), PostgreSQL, MongoDB, Gemini API for summaries, OAuth for login.
• Features mention scrapers that run on a schedule (not in repo but implied externally) to refresh stale data.