How chrizefan/humanizer works
Project type and purpose
• This is a full-stack web application built on Next.js (app directory, pages and API routes) with a Supabase backend.
• Its core purpose is to “humanize” user-supplied text, track usage via a credit system, and manage user projects and subscriptions.
File structure
• Top-level “app” directory: Next.js 13+ server-and-client components for UI (page.tsx, layout.tsx) and built-in API routes under app/api.
• “components” folder: Reusable React components for auth, UI, forms, layout.
• “hooks” and “lib”: Client hooks (use-credits, use-supabase-auth) and server utilities for Supabase.
• “supabase/migrations” and “scripts”: SQL migrations, setup and helper scripts for local and cloud Supabase.
• Config files: netlify.toml (deployment), next.config.js, Tailwind and ESLint configs.
• “tests”: End-to-end and integration/test suites validating auth, credit flows, and endpoints.
README for insights
• Features: Supabase Auth, credit‐based usage, project CRUD, subscriptions.
• Database schema: users (with credits), projects, usage_logs.
• API Endpoints: /api/humanize, /api/projects, /api/credits, /api/subscription.
Essential elements and be detailed
• Core libraries: humanizer library, supabase-server client, hook layer on client side.
• SQL migrations and RLS policy scripts as part of the infra setup.