ModelFlow is a professional full-stack machine learning dashboard that provides multiple ML models for different datasets with individual prediction forms, batch CSV uploads, model comparisons, and comprehensive prediction history tracking.
- Titanic Survival Prediction - Logistic Regression, Random Forest Classifier, Decision Tree Classifier, Naive Bayse
- Movie Rating Prediction - Linear Regression, Decision Tree, Random Forest, KNN, SVR
- Car Price Prediction - Linear Regression, Decision Tree, Random Forest, KNN, SVR
- Home Dashboard - View recent predictions across all datasets
- Individual Prediction Forms - Input data manually with pre-filled test values
- CSV Batch Upload - Upload CSV files for bulk predictions with validation
- Model Comparison - Compare performance of different models on the same dataset
- Prediction History - View all past predictions grouped by dataset
- NextAuth integration with bearer token authentication
- Secure API calls with authorization headers
- Session management for user-specific data
- Clean white background with black-to-blue color scheme
- Fully responsive grid layouts that scale with content
- Professional table-based data display
- Real-time form validation with React Hook Form
- Framework: Next.js 16 (App Router)
- Styling: Tailwind CSS v4
- Forms: React Hook Form
- Authentication: NextAuth.js
- UI Components: shadcn/ui
- Icons: Lucide React
- Language: TypeScript
- Framework: FastAPI (Python)
- ML Models: Scikit-learn (Logistic Regression, Decision Trees, Random Forest, KNN, SVR)
- Server: Uvicorn
- Port: https://fast-api-model-backend.onrender.com
📦app
┣ 📂api
┃ ┗ 📂auth
┃ ┃ ┗ 📂[...nextauth]
┃ ┃ ┃ ┗ 📜route.ts # NextAuth API routes
┣ 📂dashboard
┃ ┣ 📂(car-price) # Car price prediction models
┃ ┃ ┣ 📂decission-tree-car-price
┃ ┃ ┃ ┗ 📜page.tsx # Decision Tree for car prices
┃ ┃ ┣ 📂linear-regression-car-price
┃ ┃ ┃ ┗ 📜page.tsx # Linear Regression for car prices
┃ ┃ ┣ 📂neighbour-car-price
┃ ┃ ┃ ┗ 📜page.tsx # KNN for car prices
┃ ┃ ┣ 📂random-forest-rating-car-price
┃ ┃ ┃ ┗ 📜page.tsx # Random Forest for car prices
┃ ┃ ┗ 📂svr-car-price
┃ ┃ ┃ ┗ 📜page.tsx # SVR for car prices
┃ ┣ 📂(classifiers) # General classification models
┃ ┃ ┣ 📂logistic-regression
┃ ┃ ┃ ┗ 📜page.tsx # Logistic Regression classifier
┃ ┃ ┣ 📂naive-bayse
┃ ┃ ┃ ┗ 📜page.tsx # Naive Bayes classifier
┃ ┃ ┣ 📂neighbour
┃ ┃ ┃ ┗ 📜page.tsx # KNN classifier
┃ ┃ ┣ 📂random-forest
┃ ┃ ┃ ┗ 📜page.tsx # Random Forest classifier
┃ ┃ ┗ 📂support-vector-classifier
┃ ┃ ┃ ┗ 📜page.tsx # SVC classifier
┃ ┣ 📂(regressors) # General regression models
┃ ┃ ┣ 📂decission-tree
┃ ┃ ┃ ┗ 📜page.tsx # Decision Tree regressor
┃ ┃ ┣ 📂linear-regression
┃ ┃ ┃ ┗ 📜page.tsx # Linear Regression
┃ ┃ ┣ 📂neighbour-rating
┃ ┃ ┃ ┗ 📜page.tsx # KNN regressor
┃ ┃ ┣ 📂random-forest-rating
┃ ┃ ┃ ┗ 📜page.tsx # Random Forest regressor
┃ ┃ ┗ 📂svr-rating
┃ ┃ ┃ ┗ 📜page.tsx # Support Vector Regressor
┃ ┣ 📂all-predictions
┃ ┃ ┗ 📜page.tsx # View all user predictions
┃ ┣ 📂compare
┃ ┃ ┗ 📜page.tsx # Model comparison dashboard
┃ ┣ 📂csv-upload
┃ ┃ ┣ 📜page.tsx # Batch CSV upload interface
┃ ┃ ┗ 📜test.csv # Sample CSV for testing
┃ ┗ 📜page.tsx # Main dashboard page
┣ 📂login
┃ ┗ 📜page.tsx # Login page
┣ 📂quote
┃ ┣ 📜page.tsx # API quote/test page
┃ ┗ 📜test.txt # Test file for quotes
┣ 📜auth.ts # Authentication configuration
┣ 📜favicon.ico # Site favicon
┣ 📜globals.css # Global CSS styles
┣ 📜layout.tsx # Root layout component
┣ 📜page.tsx # Home page
┣ 📜preloader.css # Loading animation styles
┣ 📜robots.ts # SEO robots configuration
┣ 📜sitemap.ts # SEO sitemap configuration
┗ 📜style.css # Additional custom styles
- Node.js 18+ and npm/yarn
- Python 3.8+ (for backend)
- FastAPI backend running on port 8000
- Clone the repository
git clone https://github.com/tapader13/modelflow-frontend.git
cd modelflow-frontend- Install dependencies
npm install- Set up environment variables
cp .env.example .env.localEdit .env.local:
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=your-secret-key-here
# Add other auth provider credentials as needed- Run the development server
npm run dev- Ensure your FastAPI backend is running:
cd backend
uvicorn main:app --reload --port 8000- Verify backend is accessible at http://127.0.0.1:8000
GET /titanic/logistic-single-user- Get user's Titanic predictionsPOST /titanic/logistic-predict- Predict single Titanic survival
GET /movie-rating/linear-single-user- Get user's movie predictionsPOST /movie-rating/linear-predict- Linear Regression predictionPOST /movie-rating/decission-predict- Decision Tree predictionPOST /movie-rating/forest-predict- Random Forest predictionPOST /movie-rating/neighbour-predict-rating- KNN predictionPOST /movie-rating/svr-predict-rating- SVR prediction
GET /car-price/linear-single-user- Get user's car price predictionsPOST /car-price/decission-predict- Decision Tree predictionPOST /car-price/linear-predict- Linear Regression predictionPOST /car-price/random-forest-predict- Random Forest predictionPOST /car-price/knn-predict- KNN predictionPOST /car-price/svr-predict- SVR prediction
GET /common/get-all-models-data- Get all models with performance metricsGET /common/all-predictions- Get all predictions for authenticated userPOST /common/csv-batch-upload- Upload CSV for batch predictions
pclass, name, sex, age, sibsp, parch, ticket, fare, cabin, embarked, email
rank, name, year, genre, certificate, run_time, tagline, budget, box_office, casts, directors, writers
ID, Levy, Manufacturer, Model, Prod. year, Category, Leather interior, Fuel type, Engine volume, Mileage, Cylinders, Gear box type, Drive wheels, Doors, Wheel, Color, Airbags
- Navigate to the specific model page (e.g.,
/car-pricefor car price prediction) - Form fields are pre-filled with test data for quick testing
- Modify values as needed or use defaults
- Click "Predict" to get results
- Results display in a card on the right side
- Go to
/csv-upload - Select your dataset (Titanic, Movie Rating, or Car Price)
- Choose the ML model to use
- Upload your CSV file
- The system validates column names (exact match required)
- Click "Predict" to process all rows
- Results display in a table below
- Visit
/compareto see all models grouped by dataset - Best performing model for each dataset is highlighted with a gold badge
- View average predictions and performance metrics
- Go to
/predictionsto view all your past predictions - Predictions are grouped by dataset
- Each entry shows input data, model used, and prediction result
All API requests require authentication via NextAuth. The session provides a backendToken that is sent in the Authorization header:
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer ${session.backendToken}`,
}The dashboard uses a professional black-to-blue color palette:
- Background: White (#FFFFFF)
- Primary: Blue shades (from #000000 to #007BFF)
- Accents: Blue for buttons, links, and interactive elements
- Text: Black (#000000) for primary text, gray (#6B7280) for secondary
- Success: Green (#10B981) for positive indicators
- Warning: Orange (#F59E0B) for cautions
- Create a new page in the appropriate dataset folder
- Copy the structure from an existing model page
- Update the API endpoint URL
- Update the model name display
- Add the new model to the comparison page
- Create a new folder under
app/ - Create model pages for each ML algorithm
- Add the dataset to CSV upload validation
- Update the home dashboard to fetch and display data
- Add to model comparison page
- Update required columns in README
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Minhaj Tapader
- Website: https://minhaj-mu.vercel.app/
- Github: @tapader13
- LinkedIn: Minhaj Uddin Tapader
- Twitter: @MinhajTapader
- Next.js for the amazing React framework
- FastAPI for the Python backend
- Scikit-learn for machine learning algorithms
- Tailwind CSS for styling
- shadcn/ui for UI components
Give a ⭐️ if this project helped you!
Built with ❤️ using Next.js and FastAPI