BM AgriCare is a mobile and web platform for Behn Meyer AgriCare Vietnam. The project supports retailers, TCEs, and admins in tracking invoice submissions, managing loyalty points, reviewing rewards redemption, and viewing admin analytics.
The platform is designed for three main roles:
- Retailers: submit invoices, view points, redeem rewards, and access product resources/news.
- TCEs: review retailer invoice submissions and manage assigned retailers.
- Admins: oversee users, invoices, rewards, product data, and analytics workflows.
BM-Agricare/
├── bm-frontend/ # Main React Native / Expo mobile app
├── bm-admin/ # React + TypeScript + Vite admin dashboard
├── bm-web/ # Older Express + EJS + Tailwind wireframe/prototype app
├── bm-backend/ # Backend app structure, if used
├── api/ # Backend route files
├── db/ # Database helper files
├── services/ # Backend service logic
├── requirements.txt # Python backend dependencies
└── README.md # Main project README| Component | Folder | Description |
|---|---|---|
| Mobile App | bm-frontend/ |
Main Expo mobile app for Retailer and TCE users. |
| Admin Dashboard | bm-admin/ |
Desktop dashboard for BM admin/manager users. |
| Wireframe App | bm-web/ |
Older prototype/wireframe web version. |
| Backend | api/, db/, services/, bm-backend/ |
FastAPI backend and database logic. |
BM can continue development in either of these ways.
BM IT can be added directly to this repository as collaborators.
This is recommended if BM wants Open Project to continue having visibility or support access.
BM IT can create a fork of this repository under BM's own GitHub account or organization.
This is recommended if BM wants future development to happen privately without sharing all future changes with the full Open Project team.
To clone the repository:
git clone https://github.com/Jennyl51/BM-Agricare.git
cd BM-AgricareTo pull latest changes:
git pullThe main mobile frontend is located in:
bm-frontend/It is built with:
- Expo
- React Native
- Expo Router
- TypeScript
- React Navigation
cd bm-frontend
npm installnpm run webor:
npx expo start --webnpx expo startAfter running this command, scan the QR code using the Expo Go app on your phone.
The admin dashboard is located in:
bm-admin/It is built with:
- React
- TypeScript
- Vite
- React Router DOM
- Recharts
- Lucide React
cd bm-admin
npm install
npm run devOpen the local Vite URL, usually:
http://localhost:5173Login page:
http://localhost:5173/loginThe wireframe/prototype web version is located in:
bm-web/It uses:
- Express
- EJS
- Tailwind CSS
cd bm-web
npm install
npm run devNote: bm-web/ is an older prototype/wireframe version. The main mobile app is bm-frontend/.
The backend uses:
- FastAPI
- Uvicorn
- SQLAlchemy
- PostgreSQL
- Pydantic
- boto3 / AWS-related tools
- JWT authentication with
python-jose
From the root directory:
python -m venv venv
source venv/bin/activate
pip install -r requirements.txtOn Windows:
python -m venv venv
venv\Scripts\activate
pip install -r requirements.txtUse the current backend route path:
python -m uvicorn api.routes.main:app --reloadIf that command does not work, try one of the alternate entry points depending on the current backend structure:
uvicorn main:app --reloador:
uvicorn app.main:app --reloadThe backend should run at:
http://127.0.0.1:8000FastAPI docs should be available at:
http://127.0.0.1:8000/docsThe backend dependencies are listed in requirements.txt:
fastapi
uvicorn[standard]
python-multipart
boto3
python-jose[cryptography]
sqlalchemy
psycopg2-binary
pydantic
pydantic-settings
python-dotenv
httpxgit pullcd bm-frontend
npm install
npm run webcd bm-frontend
npm install
npx expo startcd bm-admin
npm install
npm run devcd bm-web
npm install
npm run devpip install -r requirements.txtpython -m uvicorn api.routes.main:app --reload- The main mobile frontend is in
bm-frontend/. - The admin dashboard is in
bm-admin/. - The older prototype/wireframe web app is in
bm-web/. - The backend uses FastAPI and PostgreSQL/RDS.
- Some frontend data may still use mock/demo data.
- Official BM product, news, resource, reward, and translation data should replace mock/demo data as development continues.
- Backend structure may include root-level folders and/or
bm-backend/, depending on the active backend organization.