How kaucrow/nexis works
High-Level Components
a) Client Layer:
• SvelteKit Frontend (app/frontend)
• Main routes: auth, user, and store-specific routes
• Stores component integration (Readon, Vesti, Cyberion, Savoro)
b) API Layer (show as two parallel services):
• Rust API (nexis-rs) - Primary authentication and core functionality
• Python API (nexis-py) - Secondary services
• Both with HTTPS endpoints
c) Data Layer:
• MongoDB (primary database for daily operations)
• PostgreSQL (data warehouse for analytics)
• Redis (for caching/sessions)
Detailed Component Breakdown
a) Frontend Architecture:
Frontend (SvelteKit)
• Components (lib/components)
• Stores (lib/stores)
• Utils (lib/utils)
• Routes
• Auth
• User
• Store-specific
b) Rust API Architecture:
Rust API
• Routes
• Health
• Users (auth, registration, session)
• Database
• Types
• Utils
• Auth
c) Database Models:
• Relationship between collections (User, Store, Products)
• Different product types (Clothes, Food, Tech, Library)
Interaction Flows
• Authentication flow (registration, login, session verification)
• Shopping operations
• Analytics data flow
• Real-time updates path
Notes Section
Annotations for:
• Shared authentication between APIs
• Development vs Production configurations
• Scaling considerations
• Security implementations
Remember to emphasize:
• The dual-API architecture
• The dual-database strategy (MongoDB/PostgreSQL)
• The four distinct store implementations
• The separation between customer and employee operations
• Real-time update mechanisms
• Analytics data flow
This will provide a comprehensive view of the system while maintaining clarity on the unique aspects of this mall management platform.