How mladenovic-13/lunique-events works
Project Type and Purpose
• Full-stack event management web application built with Next.js.
• Purpose: Enable users (individuals or organizations) to create events, invite guests, manage RSVPs, and handle payments.
File Structure
• src/app: Next.js UI (server- and client-side React) organized by feature (auth, event, organization, etc.).
• src/server & src/trpc: Backend logic—tRPC routers, NextAuth, billing webhooks, database access.
• prisma/schema.prisma: Database schema (PostgreSQL via Supabase).
• public & AWS config: Static assets, image upload to S3 + CloudFront (via server/s3.ts).
• server/billing & server/resend: Integration with LemonSqueezy (payments) and Resend (emails).
• Upstash Redis used for rate limiting and session caching.
• External APIs: Google Maps (address auto-complete & maps), CloudFront image optimization.
README Insights
• Tech stack: Next.js, tRPC, Prisma/Supabase, Auth.js, Zustand, TailwindCSS/Shadcn, Resend, Tanstack Table, Framer Motion.
• Environment variables reveal dependencies on PostgreSQL, AWS S3/CloudFront, Upstash Redis, LemonSqueezy, Google Maps.
Component Relationships and Interactions
• Browser ↔ Next.js Server: HTTP(S)—page navigation, API calls.
• Next.js Server ↔ tRPC Backend: internal function calls via tRPC.
• tRPC Backend ↔ PostgreSQL: Prisma queries.
• tRPC Backend ↔ Redis: rate-limiting checks.
• tRPC Backend ↔ Resend / LemonSqueezy: API calls for emails and payments.
• Next.js Server ↔ S3/CloudFront: direct upload/download of image assets.
• Browser ↔ Google Maps API: client-side calls for map and autocomplete.
Architectural Patterns & Design Principles
• Feature-folder pattern in src/app for co-locating routes, UI, and logic.
• End-to-end type safety via tRPC + TypeScript.
• SSR/SSG hybrid rendering in Next.js.
• Separation of concerns: UI (React) ↔ business logic (tRPC) ↔ data layer (Prisma).
• Use of server-less functions (Next API) for third-party integrations.