How gitpugal/formsx works
Project Type and Purpose
• This is a full-stack, serverless-style form-building and management platform built with Next.js (App Router), TypeScript, Prisma, Tailwind CSS, and NextAuth.
• Users can sign up/log in, create and manage forms and campaigns, embed forms into third-party sites (iframe/popup), integrate with external services (Google Sheets, Notion, Stripe, SMTP mail), and collaborate in workspaces.
File Structure
• app/
– (auth), (campaign), (dashboard), (embed), (onboard), (site): segregated UI/route segments using Next.js layouts & pages.
– app/api/: ~120 RESTful API route handlers (Next.js route.ts) for authentication, form CRUD, workspace management, integrations (Google Sheets, Notion), payments (Stripe), email/webhooks, etc.
• lib/: Prisma client (lib/prisma.ts), Firebase configuration, auth options, a job queue, utility functions.
• services/: client-side wrappers around Firebase, form/org/workspace calls.
• public/: static assets (scripts, images).
• prisma/schema.prisma: database schema.
• config files: next.config.mjs, tailwind.config.ts, postcss.config.mjs, tsconfig.json.
README
• It’s a boilerplate README template and doesn’t describe architecture. The file structure is the primary source of truth.