How avayyyyyyy/opinify works
High-Level Architecture Overview
a) Client Layer:
• Next.js Frontend (app directory structure)
• Embedded Widget Component (for third-party websites)
• Authentication UI Components
b) Server Layer:
• Next.js API Routes
• Authentication System (NextAuth)
• Server Actions
c) Database Layer:
• PostgreSQL Database (indicated by Prisma usage)
• Prisma ORM
Key Components
Frontend Components:
• Public pages (home, about, privacy)
• Dashboard section
• Feedback management interface
• UI Components library (components/ui directory)
API Layer:
• Authentication endpoints (/api/auth)
• Feedback endpoints (/api/feedback)
• Server actions (createProject, deleteFeedback, etc.)
Database Layer:
• Prisma models and relationships:
• User model
• Project model
• Feedback model
• Relationships between these models
External Services:
• Google OAuth (for authentication)
• Any third-party integrations
Data Flow Representation
• Authentication flow (user → Google OAuth → NextAuth → Database)
• Feedback collection flow (Embedded Widget → API → Database)
• Dashboard data retrieval flow (Database → API → Frontend)
Technical Stack Indicators
• Next.js
• TypeScript
• Prisma
• PostgreSQL
• TailwindCSS
• NextAuth
Deployment Architecture
Show:
• Production environment
• Development environment
• Database hosting
• Static asset serving
[Client Layer (Browser/Embedded Widget)]
• ↕
[Next.js Frontend Layer]
• ↕
[API/Server Layer]
• ↕
[Database Layer]
• Separation between the dashboard application and the embedded widget
• Authentication flow as it's crucial for the SaaS model
• Clear boundaries between public and authenticated sections
• Feedback collection pipeline from third-party websites to the dashboard
• Demonstrate how real-time updates will be implemented
• Future features (like customizable modal and analytics) as planned expansions