Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,24 @@

PriceWolves Customer Facing Frontend Web App | Price Tracker & History App | Auto Purchase

## REFERENCES
## Developer Notes

- [AWS Amplify Setup Guide](https://aws.amazon.com/getting-started/hands-on/build-react-app-amplify-graphql/)
- [Price Wolves Confluence Docs](https://kobetran.atlassian.net/wiki/spaces/~71202094dd75410d634f5d8b40e06cc4c97a42/pages/2949140/Developer+Notes?atlOrigin=eyJpIjoiYzEzMDdlZTJhMjZmNDY3MGEyOTI3MWJjODM2OThjZGMiLCJwIjoiYyJ9)

## Running Locally

- Install dependencies: `npm install`
- Render UI locally: `npm run dev`
- Run test cases: `npm run test`
- When updating AWS amplify code, run `npx ampx sandbox` to reflect in the AWS cloud environment.
- Successful Confirmation message will be:

```
[Sandbox] watching for file changes...
File written: amplify_outputs.json
```

- Exit out of terminal and test.

## React + TypeScript + Vite

Expand Down
30 changes: 28 additions & 2 deletions amplify/data/resource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,36 @@ specifies that any unauthenticated user can "create", "read", "update",
and "delete" any "Todo" records.
=========================================================================*/
const schema = a.schema({
Todo: a
Item: a
.model({
content: a.string(),
itemId: a.id(),
barcode: a.string(),
itemName: a.string().required(),
itemImageUrl: a.url(),
itemPrice: a.float().required(),
units: a.string().required(),
category: a.string().required(),
description: a.string(),
storeName: a.string().required(),
storeId: a.id().required(),
isDiscount: a.boolean(),
discountedPrice: a.float(),
})
.identifier(["itemId"])
.secondaryIndexes((index) => [
index("barcode"),
index("itemName"),
])
.authorization((allow) => [allow.guest()]),
Store: a
.model({
storeId: a.id(),
storeName: a.string().required(),
storeLocations: a.json().array().required(),
isBigChain: a.boolean().required(),
storeLogoUrl: a.url(),
})
.identifier(["storeId"])
.authorization((allow) => [allow.guest()]),
});

Expand Down
Loading