An open API service indexing awesome lists of open source software.

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

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