A set of simple solutions to better integrate Medical Pantry's warehouse and Shopify system
--
βββ 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
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
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!
Please follow the contribution guidelines, found here
For a full run down on how to get up and running, view the Product Handover page on the confluence