How harshavardhan-md/creditworthy works
Main Components
• Frontend:
– Source located in the "src" directory (React components, pages, assets, etc.) and "public" assets.
– Built using Vite, with styling (CSS) and JavaScript/JSX files providing the user interface.
• Backend/API Server:
– In the "server" folder, the Node.js server (server.js) handles API requests (e.g., storing contact form data in contactData.db).
– Express.js is likely used as the web framework.
• AI Modeling & Data Processing:
– Python-based AI models in the "AI_Models" directory use libraries like scikit-learn, pandas, and numpy to assess creditworthiness.
– Streamlit is used to provide interactive dashboards for effecting the AI model analyses.
– Supporting JSON files in the "JSON_Files" folder provide example inputs for credit analysis.
• Additional Infrastructure/Tools:
– Clerk Auth for secure, phone number based authentication (as mentioned in the README).
– Integration with external services like Google Cloud and Gemini AI (Gemini 2.0 Flash Experimental) for enhanced insights.
– Dev container configuration (.devcontainer) enables a consistent development environment.
• The Frontend communicates with the Backend over HTTP/REST APIs (for tasks like contact form submission and general data queries).
• The Backend processes these API requests, persists data by interacting with the embedded database (contactData.db), and may trigger or fetch data from the AI Models.
• The AI Modeling components (Python scripts) operate separately – either running on-demand via Streamlit (invoked by commands like “streamlit run Filename.py”) or in a batch process – and use JSON test files to perform credit analysis.
• Authentication is handled by Clerk Auth, which is integrated into the frontend for simple user sign-ins and might also interact with backend APIs for session validation.
• The Flow:
1. User accesses the web app via the React-based frontend.
2. Authentication (via Clerk Auth) validates users.
3. Users interact with pages (such as Dashboard, Loan Analysis, etc.); API calls are made to the backend where necessary (e.g., to store contact data).
4. When initiating credit scoring, the backend or a separate process triggers the Python AI models, which deliver analysis (using machine learning libraries and Gemini 2.0) back to the user interface—either directly through Streamlit dashboards or via API endpoints.
Architectural Patterns and Design Principles
• Separation of Concerns: Distinct directories and services for frontend, backend, and AI modeling ensure clear workloads.
• Modular Design: The use of separate directories (src, server, AI_Models) enables modularity.
• Interoperability: The integration of different technologies (React, Express, Python) highlights the use of API-driven communication and potential microservices or loosely coupled components.