How bakkeshks/homescopeca works
Project type and purpose
• Type: Full-stack, server-rendered web application with an external AI/ML service.
• Purpose: Let users enter California housing features in a web form, send those to a trained MindsDB model, and display predicted house prices along with charts.
File structure
• app.js (Express/Node entry point)
• views/ (EJS & HTML templates: index.ejs, result.ejs, dashboard.html)
• public/ (static assets: images, CSS, client-side JS including Chart.js)
• package.json (dependencies: express, mindsdb SDK, ejs, chart.js on frontend)
• No separate database folder, because MindsDB handles data storage and model hosting.
README insights
• Web server runs on Node.js/Express on Linode VM.
• MindsDB runs in a Docker container, exposes ports 47334 & 47335.
• Frontend uses Bootstrap 3, EJS templates, Chart.js, and MindsDB JS SDK.
• Data flow: user → Node.js → MindsDB → Node.js → browser.
Main components and their relationships
a. Components:
• Web Client (Browser)
• Express/Node.js Server (app.js)
• MindsDB Server (Docker container with AI tables)
• Static Assets (public folder: CSS, images, client JS / Chart.js)
• Templates (views folder: EJS/HTML)
• External Data Source (CSV dataset, Kaggle upload into MindsDB)
• Optional: MindsDB Cloud (alternative to Docker)
b. Interactions:
1. User opens home page (HTTP GET → Node.js → serves index.ejs + static assets).
2. User submits form (HTTP POST → Node.js).
3. Node.js constructs SQL-style query and sends it to MindsDB server (over REST/HTTP or SDK).
4. MindsDB returns prediction and aggregated statistics.
5. Node.js injects results into result.ejs or dashboard.html, serves back to browser.
6. Browser renders charts via Chart.js using data inlined in the template or fetched via client SDK.
c. Architectural patterns:
• Monolithic backend with a clear “AI as a Service” boundary.
• Server-side rendering (EJS) combined with client-side charting.
• Separation of concerns: presentation (views & public), business logic (app.js), AI/ML (MindsDB).
d. Key technologies:
• Node.js + Express
• EJS template engine
• Chart.js (client)
• MindsDB (Docker or Cloud)
• Bootstrap 3 for UI
• Linode VM hosting