How imobify/imobify-backend works
Main System Components
a) API Layer
• Auth Module
• Real Estate Module
• User Module
• Favorite Module
• Lead Module
b) Infrastructure
• PostgreSQL Database with PostGIS extension
• Cloudinary Service for image management
• Prisma ORM layer
Architectural Pattern Representation
a) Core Layers:
• Controllers (API endpoints)
• Services (Business logic)
• DTOs (Data Transfer Objects)
• Guards & Interceptors
• Database layer (Prisma)
b) Module Organization:
API Controllers
• ↓
Guards/Interceptors
• ↓
Services Layer
• ↓
Prisma Service
• ↓
PostgreSQL + PostGIS
Key Relationships to Highlight
• Auth flow: JWT strategy and guards protecting routes
• Image handling: Connection between RealEstate/User modules and Cloudinary
• Geospatial queries: RealEstate module interaction with PostGIS
• Database relationships: User ↔ RealEstate ↔ Favorites
Detailed Component Breakdown
External Services Layer
• Cloudinary (Image Storage)
• PostGIS (Geospatial Processing)
API Layer
• Auth
• SignIn
• SignUp
• RealEstate
• CRUD Operations
• Geospatial Queries
• Users
• Profile Management
• Avatar Handling
• Favorites
• Leads
Middleware Layer
• JWT Guard
• User ID Check Interceptor
• Type ID Check Interceptor
Data Layer
• Prisma ORM
• PostgreSQL + PostGIS
Testing Infrastructure
• E2E test setup
• Test database connections
• Jest configuration
Remember to maintain a balance between detail and clarity, focusing on the architectural decisions that make this real estate application unique, particularly its geospatial features and image handling capabilities.