PERISAI is a Fullstack Web Application system based on Artificial Intelligence (AI) designed to analyze lifestyle and patient medical records to predict the risk of 3 major Non-Communicable Diseases (NCDs): Diabetes, Hypertension (HighBP), and High Cholesterol (HighChol).
This system is driven by a custom Deep Learning model (TensorFlow/Keras) trained using a Functional API architecture, Custom Layers, and a Custom Loss Function (BCE + 10x MAE) to generate highly precise probability levels based on real data (BRFSS Dataset). Equipped with a Generative AI assistant for interactive medical consultation.
This project has a Production-Ready status and is deployed using a modern Microservices architecture distributed decentrally across three different Cloud platforms to ensure scalability and workload isolation.
- Tech Stack: React, Vite, and TailwindCSS.
- Role: Provides the visual interface (Dashboard, AI Prediction Form, Daily Habit Log, Interactive Chatbot).
- Live URL: https://perisai-ptm.vercel.app/
- Tech Stack: Node.js, Express, and PostgreSQL.
- Role: Handles User management (JWT Authentication), Habit Log storage, and acts as an API Gateway bridging the Frontend with the AI Microservice. Autonomously calculates Historical Moving Average (last 7 days average) before sending data to the AI.
- Live URL:
https://perisai.up.railway.app
- Tech Stack: Python, FastAPI, TensorFlow, Google Gemini API, Docker.
- Role: High-performance server dedicated exclusively to running Deep Learning model inference (
perisai_model_production.keras) and processing Generative AI responses in real-time. Isolated using a Docker Container. - Live URL: https://huggingface.co/spaces/hilmyinaja/perisai-ai-api
/ai_engineer: The heart of Data Science. Contains Jupyter Notebooks for model training, Class Imbalance visualization, TensorBoard logs, and FastAPI API source code./Fullstack/Frontend: Source code for the web user interface./Fullstack/Backend: Source code for Node.js server logic and database management./data: Storage for raw and cleaned datasets (BRFSS CDC).
You need to run all three services simultaneously in different terminals if you want to run this application locally.
- Python 3.10+
- Node.js 18+
- PostgreSQL Server
Open a terminal and download the source code from GitHub:
bash git clone https://github.com/hilmyinaja/Data-Analysis-Penyakit-Tidak-Menular.git cd Data-Analysis-Penyakit-Tidak-Menular
- Open a terminal and navigate to the Backend directory:
cd Fullstack/Backend - Install the required libraries:
npm install
- Create a
.envfile inside theBackendfolder containing your PostgreSQL URL, for example:DATABASE_URL=postgres://postgres:your_password@localhost:5432/perisai_db PORT=5000 JWT_SECRET=super_safe_secret_123 ML_SERVICE_URL=http://127.0.0.1:8001/api/v1 AI_SERVICE_URL=http://127.0.0.1:8001/api/v1 AI_CHAT_URL=http://127.0.0.1:8001
- Migrate the tables to the database:
npm run migrate
- Run the Backend server:
npm run dev
- Open a terminal in the root folder of the project.
- Create and activate a virtual environment:
python3 -m venv venv source venv/bin/activate - Install all dependencies:
pip install -r requirements.txt
- Open a new terminal (make sure venv is active) and navigate to the AI API directory:
cd ai_engineer/perisai_api - Create an
.envfile in that folder and fill it with your Google API Key:GEMINI_API_KEY=YOUR_SECRET_KEY
- Run the FastAPI server:
uvicorn perisai_api:app --port 8001 --reload
- Open a new terminal and navigate to the Frontend directory:
cd Fullstack/Frontend - Install dependencies:
npm install
- Create a
.envfile containing the Node.js Backend address:VITE_API_URL=http://localhost:5000/api
- Start the web interface:
npm run dev
- Open the local link that appears (usually
http://localhost:5173) in your browser.
PERISAI.Video.Demo.1.mp4
This project is an industry-level demonstration of the intersection of Data Science, Machine Learning Engineering, and Modern Web Software Engineering (Fullstack Development).