Gem Classifier App is a full-stack web application that empowers users to identify and classify gemstones using artificial intelligence. Built with the MERN stack (MongoDB, Express, React, Node.js) and a Python-based machine learning service, GEMX combines modern web technologies with a robust Random Forest model for accurate gemstone predictions.
- Interactive Web Interface: Intuitive React + Tailwind CSS frontend for uploading gem images, viewing predictions, and managing your profile.
- AI-Powered Classification: Python ML service leverages a trained Random Forest model to classify gems from images.
- RESTful API: Node.js/Express backend handles authentication, user management, image uploads, and communication with the ML service.
- User Accounts: Register, login, edit profile, reset password, and manage favorite gem predictions.
- Image Uploads: Secure image upload and storage via Cloudinary integration.
- Favorites & History: Save favorite predictions and view your upload history.
- Responsive Design: Optimized for desktop and mobile devices.
- Developer & Mentor Credits: Meet the team and mentor behind GEMX.
gem_classifier_app/
├── README.md
├── client/ # React frontend
│ ├── src/
│ │ ├── components/
│ │ ├── pages/
│ │ ├── store/
│ │ ├── App.jsx
│ │ ├── main.jsx
│ │ └── ...
│ ├── public/
│ ├── package.json
│ └── ...
├── server/ # Node.js/Express backend
│ ├── src/
│ │ ├── controllers/
│ │ ├── models/
│ │ ├── routes/
│ │ ├── utils/
│ │ ├── app.js
│ │ └── ...
│ ├── package.json
│ └── ...
├── ml_service/ # Python ML microservice
│ ├── app.py
│ ├── requirements.txt
│ └── ml_model/
│ ├── label_encoder.pkl
│ └── random_forest_model.pkl
└── ...
- Node.js & npm
- Python 3.13+
- MongoDB (local or cloud)
- Cloudinary account (for image uploads)
- Docker (optional, for containerized development)
-
Clone the repository:
git clone https://github.com/yourusername/gem_classifier_app.git cd gem_classifier_app
-
Setup the ML Service:
cd ml_service python3 -m venv venv source venv/bin/activate pip install -r requirements.txt python app.py
The ML service runs on a separate port (default: 5000).
-
Setup the Backend Server:
cd server npm install npm start
Configure environment variables in
.env
(MongoDB URI, Cloudinary keys, etc.). -
Setup the Frontend Client:
cd client npm install npm run dev
The React app runs on port 5173 by default.
- Visit
http://localhost:5173
in your browser. - Register or login to your account.
- Upload a gemstone image to get AI-powered predictions.
- Save your favorite results and view your prediction history.
- Explore the About page to learn more about the project and team.
- Frontend: React, Tailwind CSS, Framer Motion, React Router
- Backend: Node.js, Express, MongoDB, Mongoose, Cloudinary, Multer, JWT, Nodemailer
- ML Service: Python, scikit-learn, Flask, Pickle
- Dev Tools: Docker, ESLint, Vite
The backend exposes several RESTful endpoints for client and ML service interaction. Here are the main routes:
POST /api/auth/register
— Register a new userPOST /api/auth/login
— Login and receive JWT tokenPOST /api/auth/reset-password
— Request password resetPUT /api/user/profile
— Update user profileGET /api/user/profile
— Get current user profile
POST /api/gems/predict
— Upload a gemstone image and get AI predictionGET /api/gems/history
— Get user's prediction historyPOST /api/gems/favorite
— Save a prediction to favoritesGET /api/gems/favorites
— Get user's favorite predictions
GET /api/about
— Project and team info
All protected routes require a valid JWT token in the
Authorization
header.
- Prof. Vinod Sharma
Jammu University
Google Scholar Profile
This project is licensed under the MIT License.
Contributions are welcome! Please open issues or submit pull requests for improvements.
For support or inquiries, email: [email protected]
- Live Demo (if deployed)
- Documentation
Made with ❤️ ☮︎