How thisnaeem/keyword-tool works
Main System Components
a) Frontend Layer:
• Sub-components:
• Landing Pages (/(landing))
• Authentication Pages (/(auth))
• Dashboard Pages (/dashboard)
• Admin Interface (/admin)
• Components Library
b) API Layer:
• Sub-routes:
• Authentication API (/api/auth)
• Admin API (/api/admin)
• Feedback API (/api/feedback)
• Search Volume API (/api/search-volume)
c) Backend Services:
• Database (Prisma + Database)
• Authentication Service (NextAuth.js)
• External Services:
• Gemini API (based on gemini.ts)
• Google Analytics
Architectural Patterns to Highlight
Following architectural patterns:
• Route Groups (indicated by the (auth), (landing) folders)
• API Route Handlers
• Server-side Components
• Client-side Components
• Database Layer
Data Flow Representation
• Client-Server Communication
• API Endpoints Communication
• Database Interactions
• Authentication Flow
Specific Implementation Details
• Prisma Schema (from prisma/schema.prisma)
• Authentication Flow (from lib/auth.ts)
• API Route Handlers
• Context Providers (from context/ConfigContext.tsx)
Component Organization
• Shared Components
• Admin Components
• Landing Components
• Dashboard Components
[Client Layer (Browser)]
• ↕
[Next.js Frontend (Pages & Components)]
• ↕
[API Routes Layer]
• ↕
[Backend Services]
• ↕
[Database Layer]
Important Considerations:
Search volume and keyword tools integration
Additional Elements to Include:
• Middleware functionality (from middleware.ts)
• Type definitions and validations
• Export functionality
• Tour/Onboarding system components