A full-stack web application for managing and showcasing weight scale products, categories, and customer reviews.
This project is organized into frontend and backend directories for better maintainability and deployment:
src/: Frontend React application (Vite).server/: Backend Express application (Node.js).server/index.ts: Main server entry point.server/data.json: Local JSON database (fallback).
dist/: Compiled frontend assets (generated afternpm run build).
To run this project on your local machine, follow these steps:
- Node.js (v18 or higher recommended)
- npm (comes with Node.js)
Clone the repository or download the source code, then navigate to the project directory and run:
npm installStart the full-stack development server (Express + Vite):
npm run devThe application will be available at http://localhost:3000.
Currently, the application uses a Hybrid Data Layer. It defaults to a local JSON file but can easily scale to a cloud database.
- Located at
server/data.json. - Perfect for local testing and single-user setups.
The application is already configured to support MongoDB. To use it:
- Create a free cluster on MongoDB Atlas.
- Get your Connection String (URI).
- Add it to your environment variables as
MONGODB_URI. - The server will automatically detect the URI and switch from
data.jsonto MongoDB.
Benefits of MongoDB:
- Persistence: Data is saved even if your server restarts.
- Scalability: Handles thousands of products and reviews easily.
- Reliability: Managed backups and high availability.
Since this is an Express app, you can containerize it:
- Create a
Dockerfile. - Build the image:
docker build -t mauli-app . - Deploy to Google Cloud Run, AWS App Runner, or DigitalOcean App Platform.
- SSH into your server.
- Install Node.js and Git.
- Clone the repo and run
npm install. - Build the frontend:
npm run build. - Start the server using a process manager like PM2:
pm2 start server/index.ts --interpreter tsx
- Admin PIN:
8055(Full access to add/edit/delete) - Customer PIN:
12345(View only)
You can change these PINs in src/App.tsx inside the handleLogin function.
The app supports 10 dynamic themes. You can add more in src/App.tsx by updating the themes object.