SmartStock360 is a full-stack inventory intelligence platform that bridges a React 19 dashboard, a Spring Boot 4.x REST gateway, and a Python FastAPI AI engine to put machine-learning predictions directly in the hands of business users. Instead of requiring data scientists, external model hosting, or third-party ML services, SmartStock360 trains five Random Forest classifiers entirely in-memory at startup and serves predictions through a clean REST interface — so the moment the Python service launches, every model is ready to answer queries in milliseconds. The core problem SmartStock360 solves is decision paralysis in inventory management and business operations. Product managers need to know whether to restock now or wait. Finance teams need to flag suspicious transactions before they settle. IT security teams need severity triage for incidents the moment they are detected. HR leads need objective profile matching for technical candidates. And academic coordinators need early-warning signals for students at risk. SmartStock360 packages all five of these intelligence workflows into a single cohesive platform with one unified React dashboard.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/JoseOlivares19/Proyecto-PC3-JavaScript-Avanzado/llms.txt
Use this file to discover all available pages before exploring further.
The Five AI Models
Each model is aRandomForestClassifier (180 estimators, max_depth=7, class_weight="balanced_subsample") trained on synthetically generated data that mirrors real-world distributions. All five models are registered in the shared MODELS dictionary at application startup and exposed through dedicated FastAPI endpoints.
| Model | Endpoint | Output Classes |
|---|---|---|
| Smart Stock 360 | POST /predict/smart-stock | DEMANDA_ALTA_REABASTECER, DEMANDA_MEDIA_MONITOREAR, DEMANDA_BAJA_OPTIMIZAR |
| Fraud Shield | POST /predict/fraud-shield | FRAUDE_PROBABLE, REVISION_MANUAL, TRANSACCION_SEGURA |
| Cyber Sentinel | POST /predict/cyber-sentinel | CRITICO, ALTO, MEDIO, BAJO |
| UTP Risk AI | POST /predict/utp-risk | RIESGO_ALTO, RIESGO_MEDIO, RIESGO_BAJO |
| Talent Match AI | POST /predict/talent-match | FRONTEND_REACT, BACKEND_SPRING, DATA_ANALYST_JUNIOR, FULLSTACK_JUNIOR |
prediccion label, a confianza score (0–1), a full probability ranking across all classes, and a recomendaciones list of actionable next steps tailored to the predicted outcome.
All five models are trained entirely in-memory at startup using scikit-learn — no external model registry, no file-based model serialization, and no third-party ML hosting is required. The Python FastAPI service is fully self-contained; bringing it online is all that is needed to activate every AI feature in the platform.
Tech Stack
SmartStock360 is built on three well-defined tiers, each using modern, production-grade tooling. Tier 1 — React Frontend The dashboard is built with React 19 and bundled with Vite 8. It is written in TypeScript 6 and communicates with the Spring Boot backend exclusively through Axios 1.18 HTTP calls. The two core service functions —obtenerProductos (GET) and predecirDemanda (POST) — are defined in src/services/api.ts and map directly to the Spring Boot /api/productos resource.
Tier 2 — Spring Boot Middleware
The backend runs on Spring Boot 4.1 (requiring Java 21) and exposes a REST API at port 8080. It uses Spring Data JPA with Lombok for entity boilerplate and connects to a local MySQL database named smartstock. When the frontend triggers a prediction, Spring Boot proxies the request to the Python AI service at http://127.0.0.1:8001/predict/smart-stock and relays the JSON response back to the client.
Tier 3 — Python FastAPI AI Service
The AI engine is built with FastAPI 0.115.0 and served by Uvicorn 0.30.6 on port 8001. It uses scikit-learn 1.5.2, NumPy 2.1.1, and Pydantic 2.9.2. All five models are trained on startup using RandomForestClassifier with 180 estimators and a maximum depth of 7. Interactive Swagger documentation is available at http://localhost:8001/docs once the service is running.
Overall Data Flow
Every prediction in SmartStock360 follows a consistent four-hop path from the user’s browser to an AI model and back:- User interaction — The user fills in product or scenario details in the React dashboard and clicks the action button (e.g., “Ejecutar Predicción IA”).
- Axios call to Spring Boot — The React
predecirDemandafunction sends aPOSTrequest toPOST /api/productos/predicton the Spring Boot server (port 8080). - Spring Boot proxies to Python — Spring Boot forwards the payload to
POST http://127.0.0.1:8001/predict/smart-stockon the FastAPI AI service (port 8001). - Model inference & response — The Python service runs the Random Forest classifier, builds the structured JSON response (label, confidence, ranking, recommendations), and returns it up through Spring Boot to the React UI for display.
Explore SmartStock360
System Architecture
Dive into the three-tier design, port assignments, API contracts, and the full request lifecycle for a demand prediction.
Quickstart
Run all three services locally in minutes and make your first AI-powered inventory prediction.
AI Models Overview
Explore the input features, output classes, and recommendation logic for all five Random Forest models.
Python Health Check
Verify that the FastAPI AI service is running and all five models are loaded via the
/health endpoint.