How abra7abra7/vino-putec works
Main System Components
• Frontend (Client-Side):
• Next.js “app” directory that contains page components (e.g., "app/degustacia", "app/eshop", "app/kontakt", etc.) and shared layouts.
• “components” directory which contains UI-specific components (e.g., buttons, modals, form elements, etc.) that build the user interface.
• API Layer (Backend Endpoints):
• “app/api” directory with various API route files (for checkout, tasting sessions, webhooks, etc.).
• Document how these endpoints abstract server-side business logic and data interactions.
• External Services Integration:
• Authentication Service: Clerk (integrated via components and providers).
• Database Service: Supabase (configured via the “supabase” folder and “utils/supabase” files).
• Payment Gateway: Stripe (found in the “utils/stripe” directory).
• Utility & Shared Modules:
• “utils”, “lib”, and “types” directories which provide common utilities, helper functions, and type definitions across the project.
• Configuration & Styling:
• Configuration files like “next.config.mjs”, “tailwind.config.ts”, “tsconfig.json”, and styling (e.g., global CSS in “app/globals.css”) that set up the overall behavior and look of the system.
• Documentation:
• The “documentation” folder holds auto-generated project documentation that can detail business logic and app flow.
Out Interactions and Data Flow
• Frontend-Backend Interaction:
• External Services Communication:
• How API routes interact with external services:
• Clerk for authentication calls.
• Supabase for CRUD operations in the database.
• Stripe for processing payments.
• Utility Layers:
• Shared libraries (under “utils” and “lib”) as common services accessed by both frontend components and API routes.
• Middleware:
Architectural Patterns and Design Principles
• Modular Design:
• Separation of concerns (pages, components, API, utilities) which supports maintainability and scalability.
• App Router Integration:
• How the Next.js App Router organizes routing and data fetching, connecting the UI and API seamlessly.
• External Service Abstraction:
• How authentication, payments, and database interactions are abstracted via external services and specialized “provider” components (as seen in "components/providers").
Relevant Technologies, Frameworks, and Libraries
• Next.js 14 – Frontend framework with the App Router.
• Clerk – For user authentication.
• Supabase – Database and real-time functionalities.
• Stripe – Payment processing.
• Tailwind CSS – Styling framework.
• shadcn/ui – Component library for building UI elements.
• TypeScript – Indicated by tsconfig and type definitions with “types” directory.
Additional Elements to Add
• Infrastructure & Deployment (if applicable):
• You may note deployment details or CI/CD integration even though they are not deeply detailed here (considering build scripts like “package.json”, “next.config.mjs”).
• Environment Variables:
• An annotation explaining how environment variables (Clerk keys, Supabase API keys, Stripe credentials) configure external integrations.
This level of detail will help stakeholders understand the overall architecture, the interactions between client-side and server-side components, and how third-party services integrate into the system.