How christianalares/seventy-seven works
Overall Project Structure
• That the project uses a monorepo setup (managed via pnpm-workspace and turborepo) which organizes multiple applications (dashboard, website, supabase) and shared packages.
The Main Applications
a. Dashboard (apps/dashboard)
– This is the primary user interface (built with Next.js). It not only renders pages but also exposes API endpoints (e.g., API routes for authentication, tickets, trpc routers, and webhook handlers).
– Internally, the dashboard follows a structured layout with designated routes for account management, ticketing (inbox, tickets), settings, and public pages.
b. Website (apps/website)
– This provides the public-facing landing page and possibly additional actions like waitlist signups.
– It shares styling and possibly UI elements (via the shared ui package) with the dashboard.
c. Supabase (apps/supabase)
– This app encapsulates the Supabase configuration, including migrations, seed scripts, and functions. It represents the project’s backend-as-a-service for the database, authentication, and storage.
Shared Packages
a. Packages like analytics, email, integrations, orm, sdk, supabase, and ui provide common functionality across applications.
– For example, the orm package is likely wrapping Prisma for database interactions.
– The email package contains templated emails (New Ticket, Waitlist Confirmation, etc.) that integrate with Resend.
– The integrations package (with modules like Slack) handles external service integrations.
– The sdk and supabase packages abstract functionality for client or server use.
– The ui package holds reusable UI components (built with TailwindCSS and Shadcn UI styles).
– The typescript-config package standardizes the TypeScript setup.
• Packages as a “Library / Shared Services” block that connects to the apps (showing that the apps depend on these libraries).
External Services and Integrations
• Resend – Used for transactional emails; show a connection from the backend (email package or API endpoints) to Resend.
• Trigger.dev – Indicated as a service for scheduled background jobs such as “unsnooze-ticket” or “generate-ticket-summary”. Illustrate the flow from Next.js API endpoints or dedicated scripts (in the trigger folder) to Trigger.dev.
• OpenPanel Analytics – Showing integration into the project’s analytics, likely via the analytics package.
Data Flow and Architectural Patterns
• Within the dashboard app, highlight the following layers/components:
– Presentation Layer: Components and pages (organized under src/app with public and app variants). Make sure to mark navigation elements (headers, menus, modals).
– API Layer: Under the /api folder, include various endpoints (auth, tickets, trpc endpoints, webhooks). Note how API routes are used to communicate with both internal services (eg. database) and external services (eg. Slack, Resend).
– tRPC Routers: Located under src/trpc/routers, showing that type-safe API calls are employed.
• That the project likely follows a feature-based organization, where reusable hooks, libraries, and UI components (defined in the shared packages) aid in maintaining consistency.