How ajagtapdev/capitalx works
Main Components
• Frontend Mobile Application:
– Contains various screens (HomeScreen, CartScreen, etc.) and UI components (e.g. CardDetailsModal, ChatInterface) that interact with the user.
• Backend API Server:
– Implemented in Python with Flask (look at backend/server.py).
– Responsible for handling REST API calls, processing requests from the mobile app, and possibly interfacing with the AI models.
• External and Integrated Services:
– AI Models: “Gemma-27B” (the core AI engine for processing card data), Google Cloud Vision, and Gemini 1.5.
– Third-Party APIs: Knot API for payment processing and Knot TransactionLink functionality, Perplexity API for product or insights discovery.
– Authentication & Data Storage: Supabase for secure data storage and possibly authentication.
• Supporting Assets:
– JSON files (amazon_products.json, amazon_products_new.json) that might act as sample data or for product discovery.
– Config and initialization files like app.json, tsconfig.json, and server configuration scripts.
Relationships and Interactions
• The backend, in turn, connects with multiple external services:
– Sends image data (from card scans) to Google Cloud Vision.
– Invokes the Gemma-27B model for AI-driven analysis.
– Connects with the Knot API for seamless credit card switching and payment transactions.
– Queries Perplexity for product discovery insights.
• Supabase should be represented as the secure data storage/authentication layer that both the backend (and possibly frontend) depend on.
Architectural Patterns and Design Principles
• Separation of Concerns: Clear division between the frontend (UI/UX, mobile interactions) and backend (data processing and API handling).
• Integration of AI and External Services: Emphasize that the backend middleware acts as a bridge between in-house features and external services/AI models.
• Service Orientation: The use of REST APIs on the backend suggests a service-oriented design that may be extended or scaled with additional microservices if needed.