How nihat-js/avtobeh works
Main System Components
a) Frontend Layer:
• Next.js Application (app directory structure)
• User Portal ((user) route group)
• Admin Portal (admin route group)
• Component Library (components directory)
b) API Layer:
• REST API endpoints (api directory)
• Authentication System (api/auth)
• Image Handling (api/(image))
c) Database Layer:
• Multiple Database Configurations:
• Prisma ORM (database/prisma)
• Sequelize ORM (database/sequelize)
• Drizzle ORM (indicated by drizzle.config files)
d) External Services:
• File Storage (for image uploads)
• Localization System (public/locales)
[Client Browsers/Users]
• ↓
[Frontend Layer (Next.js)]
• ↓
[API Layer (Route Handlers)]
• ↓
[Database Layer]
Component Relationships
Key interactions:
a) User Flow:
• Authentication flows (daxil-ol, qeydiyyat)
• Car listing creation (masin-sat)
• Car browsing (masinlar)
• Profile management (profil-melumatlarim)
b) Data Flow:
• Image upload pipeline
• Car listing creation process
• Search and filtering system
• Authentication and authorization
Technical Details
Technical specifications:
a) Frontend:
• React/Next.js
• TailwindCSS
• Component hierarchy
b) Backend:
• Next.js API Routes
• Multiple ORM implementations
• Authentication system
c) Storage:
• Database systems
• File storage for images
• Caching mechanisms
Implementation Notes
• The modular structure of the application
• Clear separation between user and admin interfaces
• Multiple database ORM support
• RESTful API architecture
• Image handling pipeline
• Internationalization support
Use standardized symbols:
• Rectangles: Components/Services
• Diamonds: Decision points
• Clouds: External services
Remember to maintain a balance between detail and clarity, focusing on the architectural decisions that make this car marketplace unique, such as its multiple ORM support and comprehensive car listing management system.