How mecha-aima/teachlm works
Project type and purpose
• This is a full-stack, server-rendered e-learning web application (“teachLM”) built with Next.js (App Router), React, and TypeScript.
• It connects students with teachers, manages lessons, subscriptions, authentication, and AI-powered features.
File structure
• Top-level “app/” directory holds all route handlers/pages (Next.js App Router).
• “components/” holds reusable UI components, organized further into “ui/” primitives.
• “lib/actions/” contains server actions for business logic (lesson.actions.ts, teacher.actions.ts).
• “lib/supabase.ts” is the database client.
• “instrumentation.ts” and sentry.{edge,server}.config.ts configure Sentry for error monitoring.
• “middleware.ts” applies Clerk authentication at edge.
• “constants/”, “public/” and “types/” support static assets, JSON data, and TypeScript definitions.
• Config files (next.config.ts, tsconfig.json, postcss.config.mjs, etc.) handle build/deploy settings.
README insights
• Tech stack includes Next.js/Turbopack, Clerk for auth, Supabase for DB, React Hook Form & Zod for forms, Vapi AI for voice AI, Tailwind+shadcn/ui for styling, and Sentry for monitoring.
• Data flow: UI → server actions → Supabase; authentication via Clerk middleware/components; Vercel deploy.