How hike-12/auraflix works
Main Components
• AI/ML Layer – Represented by the "ai" directory. This contains Python scripts and data files (e.g., fetch.py, enrich_categories.py, main.py, analytics.csv, insta.csv, enhanced_categories.json, and render.yaml). These scripts handle data ingestion, simulation of historical data, linear regression for trend predictions, TF-IDF text analysis, and report generation.
• Backend/API Server – Found in the "backend" directory. The server.js, route files (such as auth.route.js), and model definitions (user.model.js) indicate the use of a Node.js/Express backend that provides RESTful APIs for the frontend, handles authentication, and connects to a MongoDB database.
• Frontend/UI Layer – Found in the "frontend" directory. This includes React components and pages (such as Dashboard.jsx, Search.jsx, SignIn.jsx, and others) together with configuration files (like vite.config.js and package.json). It allows users to explore influencer data, generate reports, view analytics, and interact with the system.
Relationships and Interactions
• UI (frontend) interacting with the Backend through RESTful API calls. This is the primary channel for user actions – such as searching and filtering influencers – to be processed.
• That the Backend communicates with the AI/ML layer when handling data processing tasks like generating historical data, executing trend predictions, or analyzing influencer content via TF-IDF.
• A connection from the Backend to the Database (MongoDB) for storing user data, influencer scores, and any simulation output.
• If applicable, highlight the flow of CSV and JSON data (e.g., analytics.csv, output_file.json) within the AI layer that feeds predictive analytics and scoring components.
Architectural Patterns and Design Principles
• Separation of Concerns – Clearly separate the UI (React-based frontend), server/API layer (Node.js with Express), data processing/AI (Python scripts), and persistence (MongoDB).
• API-Driven Design – The backend encapsulates business logic and serves as the intermediary between frontend interactions and the AI layer.
• Data Pipeline – The AI module can be shown as a data processing pipeline where raw data (from CSV files and external sources) is transformed (using historical simulation, linear regression, TF-IDF, and other metrics calculations) before being fed back into the application for report generation and influencer analysis.
Relevant Technologies and Frameworks
• Frontend: React and Tailwind CSS.
• Backend: Node.js with Express, using JavaScript and related package management (package.json, package-lock.json).
• Database: MongoDB (even if not visible directly, it is mentioned in the README).
• Machine Learning/Analytics: Python for trend predictions (using linear regression) and TF-IDF for content analysis.
• External Data Integration: Usage of CSV datasets and possibly integration/abstraction layers that mimic interactions like those of the Instagram Graph API.