VegAnalytics
A prototype end-to-end solution for local marts and vegetable sellers.
Features
- Configurable database for the store.
- Add/Remove and Manage products.
- Control the pricing of each product in the inventory.
- Get analytics of the sales everyday and project it with historic data.
- Charts which helps you to compare the sales of one product w.r.t to another.
- Export sales data as csv/json.
- Easily deployable as a service. (Provides container images)
- Multi-user application.
How to run?
To run this app, you need docker
and docker-compose
to be installed on the machine. See the instructions below:
With docker:
If you want to run with docker, first you need to configure MongoDB either on cloud or locally. You can pull and run MongoDB container image, locally:
docker run --rm --net=host mongo
Then build the container image of the app.
docker build . -f deploy/Dockerfile -t veg-analytics:latest
You may have to modify the deploy/sample.env
as per your needs.
Then run the app as follows:
docker run --rm --env-file=utils/sample.env --net=host veg-analytics:latest
You can open the browser and type the URL http://localhost:9000/
(or the port you mentioned in deploy/sample.env
)
Using docker-compose
Using docker-compose, you can quickly set-up the complete deployment. Go to deploy/
and run docker-compose
as follows:
docker-compose build
To run:
docker-compose up
Creating the native version of the app:
You can use nativefier, to generate the native version of the app. Follow the steps below:
-
Run the app: Follow the procedure in the section above to run the app, make sure it is running on some port.
-
Now, use
nativefier
to build the native binary for you.
npx nativefier http://localhost:9000 #or any other host as you wish