Multi-tenant inventory management platform for shop owners with optional public storefront discovery.
Built for businesses that are tired of managing stock through notebooks, memory, and ritual sacrifice.
Live URLs:
- Frontend: https://stock-sphere-sable.vercel.app/
- Backend API: https://stocksphere-4xt1.onrender.com/api
StockSphere allows users to:
- Create one or more shops
- Manage inventory separately for each shop
- Track stock movement
- Receive low-stock alerts
- Search and filter products
- Make shops public or private
- Browse public shops/products
- Send business inquiries securely
- Product CRUD
- Category management
- SKU support
- Bulk stock add/remove
- Search / sort / filter
- Restock reminders
- One user can manage multiple shops
- Separate inventory per shop
- Internal stock transfers (future)
- Public shop listing
- Public product catalog
- Inquiry requests
- Consent-based contact sharing
- JWT authentication
- Role-based access control
- Tenant data isolation
- Password hashing
- Java 17+
- Spring Boot
- Spring Security
- Spring Data JPA
- Hibernate
- Maven
- MySQL
- React
- Vite
- React Router
- React Toastify
- Custom CSS
- Postman
- Git
- GitHub
Modular Monolith
Reason:
- Easier maintenance
- Faster development
- Cleaner than spaghetti disasters
- Scales reasonably for MVP
stocksphere/
├── backend/
│ ├── auth/
│ ├── users/
│ ├── shops/
│ ├── inventory/
│ ├── inquiries/
│ └── notifications/
│
├── frontend/
│ ├── pages/
│ ├── components/
│ ├── hooks/
│ └── services/
│
└── docs/- Java 17+
- Maven
- MySQL
- Clone repository
git clone <repo-url>- Create database
CREATE DATABASE stocksphere;- Configure environment variables
Set these values in your environment or hosting dashboard:
- DB_HOST
- DB_PORT
- DB_NAME
- DB_USERNAME
- DB_PASSWORD
- JWT_SECRET
- JWT_EXPIRATION_MS
- CORS_ALLOWED_ORIGINS
- Run backend
mvn spring-boot:runOptional package command:
mvn clean package -DskipTestsBackend includes a Dockerfile at backend/Dockerfile for container deployment.
Build image:
cd backend
docker build -t stocksphere-backend .Run container:
docker run -p 8080:8080 stocksphere-backend- Node.js 18+
cd frontend
npm install
npm run devFor production frontend deploy, set:
VITE_API_BASE_URL=https://stocksphere-4xt1.onrender.com/api- Frontend includes a dashboard cards page that calls
GET /api/dashboard/summary - Login/Register flow with token persistence is implemented
- Metrics shown:
- Total Products
- Low Stock Count
- Inventory Value
- Potential Revenue
- Estimated Profit
- Route:
/products - Product table with columns for SKU, category, quantity, pricing, margin, and stock status
- Search by product name
- Category filter and low-stock toggle
- Add product modal
- Edit product modal
- Delete product with confirmation
- Quick stock actions:
+1,+5,-1,-5
http://localhost:8080/apiProduction API Base URL:
https://stocksphere-4xt1.onrender.com/apiProduction Frontend URL:
https://stock-sphere-sable.vercel.app/- Authentication with JWT
- JWT claims include
userIdandrole - Owner-scoped shop CRUD (create/list/update/delete)
- Product CRUD with owner checks
- Product stock patch endpoint
- Search/filter/sort for products
- Environment-variable based configuration for DB/JWT/CORS
- Docker deployment support
- Login/Register landing page at
/ - Protected route flow for
/products - Session persistence with local storage and token expiry cleanup
- Current user bootstrap from
GET /api/auth/me - Auto logout on
401/403API responses - Toast notifications for success and error flows
- Shared loaders and empty states for polished UX
GET /api/health
POST /api/auth/registerPOST /api/auth/loginGET /api/auth/me
POST /api/shopsGET /api/shopsPUT /api/shops/{id}DELETE /api/shops/{id}
POST /api/productsGET /api/products?shopId=...&search=...&category=...&lowStockOnly=...&sort=...PUT /api/products/{id}DELETE /api/products/{id}PATCH /api/products/{id}/stock
GET /api/dashboard/summary
costPriceandsellingPricetracked separatelycategoryfield added for filtering and analytics readinesssort=profitsupported using per-unit margin
totalProductslowStockCountinventoryValuepotentialRevenueestimatedProfit
- Authentication
- User profiles
- Shop creation
- Product CRUD
- Search / filters
- Low stock alerts
- Staff roles
- Public marketplace
- Inquiry flow
- Analytics
- Reports
- Mobile support
- Login
- Create Shop A
- Add products
- Update stock daily
- Get low stock alerts
- Manage Shop A + Shop B
- Compare stock
- Transfer items later
- Browse public stores
- View available products
- Send inquiry
- Never expose user data across tenants
- Validate all request input
- Use hashed passwords
- Use secure JWT secret
- Protect admin routes
- Barcode scanner
- GST billing
- AI restock prediction
- WhatsApp integration
- Mobile app
- Export PDF/CSV reports
Built a multi-tenant SaaS inventory platform using Java Spring Boot, MySQL, JWT, and React, enabling secure multi-shop stock management with public B2B discovery features.
Useful sentence. Recruiters love nouns arranged professionally.
MIT (or your choice)
@Mystify7777
Try not to break production on Friday evenings.