https://github.com/developmenthf/medpantry-itproject-57
π¦Custom built warehouse inventory management system for the Medical Pantry charity
https://github.com/developmenthf/medpantry-itproject-57
Last synced: about 1 year ago
JSON representation
π¦Custom built warehouse inventory management system for the Medical Pantry charity
- Host: GitHub
- URL: https://github.com/developmenthf/medpantry-itproject-57
- Owner: DevelopmentHF
- Created: 2024-07-25T01:03:54.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-03T05:44:08.000Z (over 1 year ago)
- Last Synced: 2024-12-25T13:38:09.961Z (over 1 year ago)
- Language: TypeScript
- Homepage: https://medpantry-itproject-57.vercel.app
- Size: 877 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# medpantry-itproject-57
## What is this?
[A set of simple solutions to better integrate Medical Pantry's warehouse and Shopify system](https://medpantry-itproject.atlassian.net/wiki/spaces/SD/overview?homepageId=295019)
--
## Folder Structure
``` bash
βββ README.md
βββ backend
βΒ Β βββ WarehouseInterface
βΒ Β βββ HELP.md
βΒ Β βββ ...
βΒ Β βββ build.gradle
βΒ Β βββ src
β βββ main
β Β Β βββ java
β Β Β βΒ Β βββ org
β Β Β βΒ Β βββ example
β Β Β βΒ Β βββ warehouseinterface
β Β Β βΒ Β βββ WarehouseInterfaceApplication.java
β Β Β βΒ Β βββ api
β Β Β βΒ Β βΒ Β βββ controller // endpoints go here :)
β Β Β βΒ Β βΒ Β βΒ Β βββ BaxterBoxController.java
β Β Β βΒ Β βΒ Β βββ model // database models go here :)
β Β Β βΒ Β βΒ Β βββ BaxterBox.java
β Β Β βΒ Β βββ service // business logic goes here :)
β Β Β βΒ Β βββ BaxterBoxService.java
β Β Β βββ resources
β Β Β βββ application.properties
β Β Β βββ static
βΒ Β βββ templates
βββ test
βββ java
βββ org
βββ example
βββ warehouseinterface
βββ WarehouseInterfaceApplicationTests.java
βββ frontend
βββ medpantry
βββ README.md
βββ app
βββ components // our front end components get built here :)
βββ AuthButton.tsx
βββ DeployButton.tsx
βββ Header.tsx
βββ NextLogo.tsx
βββ SupabaseLogo.tsx
βββ card.tsx
βββ sidebar.tsx
βββ tutorial
βΒ Β βββ Code.tsx
βΒ Β βββ ConnectSupabaseSteps.tsx
βΒ Β βββ FetchDataSteps.tsx
βΒ Β βββ SignUpUserSteps.tsx
βΒ Β βββ Step.tsx
βββ ui
βββ button.tsx
βββ input.tsx
βββ separator.tsx
βββ components.json
βββ lib
βββ middleware.ts
βββ next-env.d.ts
βββ next.config.js
βββ node_modules
βββ package-lock.json
βββ package.json
βββ postcss.config.js
βββ tailwind.config.ts
βββ tsconfig.json
βββ utils
```
---
## Running the project
### Frontend
To run the web-app component of this project, please connect the supabase variables to the `.env.local` file as outlined in the frontend/medpantry/README.md.
Also in `.env.local`, add the server backend link. The server, which hasn't been deployed yet, is hosted on `https://localhost:8080`.
Thus, the `.env.local` file should appear as so:
```
NEXT_PUBLIC_SUPABASE_URL=https://XXXXXX.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=XXXXXX
NEXT_PUBLIC_BACKEND_LINK=http://localhost:8080
NEXT_PUBLIC_API_KEY=XXXX # this is set by the developer below
```
Once this has been filled out, naviagate to `frontend/medpantry/` then execute the following to start the dev server:
```npm run dev```
### Backend
To run the server which hosts the custom API, please create a `.env` file in `backend/WarehouseInterface/main/resources` and populate it with the same API keys as in *frontend/*.
Furthermore, you need to fill in the *Shopify* admin key extracted from the owners page. Thus the `.env` file should appear as so:
```
SUPABASE_URL=XXXXX.supabase.co
SUPABASE_API_KEY=XXXXX
SHOPIFY_ADMIN_KEY=XXXXX
API_KEY=henry #Choose a secure password to send in the headers
```
To test the API, please use the Postman service, and execute a command like so:
```
localhost:8080/baxterbox?id=2
```
... which fetches the baxter box number 2
---
Make sure the API_KEY you manually define like a password is reflected in the frontend!
## Contribution guidelines
Please follow the contribution guidelines, found [here](https://medpantry-itproject.atlassian.net/wiki/spaces/SD/pages/19267585/Development+Practices)
---
## Handover
For a full run down on how to get up and running, view the Product Handover page on the confluence