Skip to content

Commit

Permalink
Update Product List to Match Cymbal Branding/Story (GoogleCloudPlatfo…
Browse files Browse the repository at this point in the history
…rm#600)

* Update product list (and images)

All new photos were taken by me (Nim).
We received approval from Google's Open Source Licensing team
to use these photos.

* Update ads to match new product list

* Update comments about product categories

* Update productcatalogservice/server_test.go
NimJay authored Sep 23, 2021
1 parent f362d2b commit d2c729d
Showing 30 changed files with 82 additions and 88 deletions.
2 changes: 1 addition & 1 deletion pb/demo.proto
Original file line number Diff line number Diff line change
@@ -79,7 +79,7 @@ message Product {
string picture = 4;
Money price_usd = 5;

// Categories such as "vintage" or "gardening" that can be used to look up
// Categories such as "clothing" or "kitchen" that can be used to look up
// other related products.
repeated string categories = 6;
}
39 changes: 20 additions & 19 deletions src/adservice/src/main/java/hipstershop/AdService.java
Original file line number Diff line number Diff line change
@@ -171,47 +171,48 @@ private void blockUntilShutdown() throws InterruptedException {
}

private static ImmutableListMultimap<String, Ad> createAdsMap() {
Ad camera =
Ad hairdryer =
Ad.newBuilder()
.setRedirectUrl("/product/2ZYFJ3GM2N")
.setText("Film camera for sale. 50% off.")
.setText("Hairdryer for sale. 50% off.")
.build();
Ad lens =
Ad tankTop =
Ad.newBuilder()
.setRedirectUrl("/product/66VCHSJNUP")
.setText("Vintage camera lens for sale. 20% off.")
.setText("Tank top for sale. 20% off.")
.build();
Ad recordPlayer =
Ad candleHolder =
Ad.newBuilder()
.setRedirectUrl("/product/0PUK6V6EV0")
.setText("Vintage record player for sale. 30% off.")
.setText("Candle holder for sale. 30% off.")
.build();
Ad bike =
Ad bambooGlassJar =
Ad.newBuilder()
.setRedirectUrl("/product/9SIQT8TOJO")
.setText("City Bike for sale. 10% off.")
.setText("Bamboo glass jar for sale. 10% off.")
.build();
Ad baristaKit =
Ad watch =
Ad.newBuilder()
.setRedirectUrl("/product/1YMWWN1N4O")
.setText("Home Barista kitchen kit for sale. Buy one, get second kit for free")
.setText("Watch for sale. Buy one, get second kit for free")
.build();
Ad airPlant =
Ad mug =
Ad.newBuilder()
.setRedirectUrl("/product/6E92ZMYYFZ")
.setText("Air plants for sale. Buy two, get third one for free")
.setText("Mug for sale. Buy two, get third one for free")
.build();
Ad terrarium =
Ad loafers =
Ad.newBuilder()
.setRedirectUrl("/product/L9ECAV7KIM")
.setText("Terrarium for sale. Buy one, get second one for free")
.setText("Loafers for sale. Buy one, get second one for free")
.build();
return ImmutableListMultimap.<String, Ad>builder()
.putAll("photography", camera, lens)
.putAll("vintage", camera, lens, recordPlayer)
.put("cycling", bike)
.put("cookware", baristaKit)
.putAll("gardening", airPlant, terrarium)
.putAll("clothing", tankTop)
.putAll("accessories", watch)
.putAll("footwear", loafers)
.putAll("hair", hairdryer)
.putAll("decor", candleHolder)
.putAll("kitchen", bambooGlassJar, mug)
.build();
}

2 changes: 1 addition & 1 deletion src/adservice/src/main/proto/demo.proto
Original file line number Diff line number Diff line change
@@ -79,7 +79,7 @@ message Product {
string picture = 4;
Money price_usd = 5;

// Categories such as "vintage" or "gardening" that can be used to look up
// Categories such as "clothing" or "kitchen" that can be used to look up
// other related products.
repeated string categories = 6;
}
2 changes: 1 addition & 1 deletion src/checkoutservice/genproto/demo.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/currencyservice/proto/demo.proto
Original file line number Diff line number Diff line change
@@ -79,7 +79,7 @@ message Product {
string picture = 4;
Money price_usd = 5;

// Categories such as "vintage" or "gardening" that can be used to look up
// Categories such as "clothing" or "kitchen" that can be used to look up
// other related products.
repeated string categories = 6;
}
2 changes: 1 addition & 1 deletion src/frontend/genproto/demo.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file removed src/frontend/static/img/products/air-plant.jpg
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed src/frontend/static/img/products/barista-kit.jpg
Binary file not shown.
Binary file removed src/frontend/static/img/products/camera-lens.jpg
Binary file not shown.
Binary file removed src/frontend/static/img/products/camp-mug.jpg
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed src/frontend/static/img/products/city-bike.jpg
Binary file not shown.
9 changes: 0 additions & 9 deletions src/frontend/static/img/products/credits.txt

This file was deleted.

Binary file removed src/frontend/static/img/products/film-camera.jpg
Binary file not shown.
Binary file added src/frontend/static/img/products/hairdryer.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/frontend/static/img/products/loafers.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/frontend/static/img/products/mug.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed src/frontend/static/img/products/record-player.jpg
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/frontend/static/img/products/sunglasses.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/frontend/static/img/products/tank-top.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed src/frontend/static/img/products/terrarium.jpg
Binary file not shown.
Binary file removed src/frontend/static/img/products/typewriter.jpg
Binary file not shown.
Binary file added src/frontend/static/img/products/watch.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/paymentservice/proto/demo.proto
Original file line number Diff line number Diff line change
@@ -79,7 +79,7 @@ message Product {
string picture = 4;
Money price_usd = 5;

// Categories such as "vintage" or "gardening" that can be used to look up
// Categories such as "clothing" or "kitchen" that can be used to look up
// other related products.
repeated string categories = 6;
}
2 changes: 1 addition & 1 deletion src/productcatalogservice/genproto/demo.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

104 changes: 53 additions & 51 deletions src/productcatalogservice/products.json
Original file line number Diff line number Diff line change
@@ -2,109 +2,111 @@
"products": [
{
"id": "OLJCESPC7Z",
"name": "Vintage Typewriter",
"description": "This typewriter looks good in your living room.",
"picture": "/static/img/products/typewriter.jpg",
"name": "Sunglasses",
"description": "Add a modern touch to your outfits with these sleek aviator sunglasses.",
"picture": "/static/img/products/sunglasses.jpg",
"priceUsd": {
"currencyCode": "USD",
"units": 67,
"units": 19,
"nanos": 990000000
},
"categories": ["vintage"]
"categories": ["accessories"]
},
{
"id": "66VCHSJNUP",
"name": "Antique Camera",
"description": "It probably doesn't work anyway.",
"picture": "/static/img/products/camera-lens.jpg",
"name": "Tank Top",
"description": "Perfectly cropped cotton tank, with a scooped neckline.",
"picture": "/static/img/products/tank-top.jpg",
"priceUsd": {
"currencyCode": "USD",
"units": 12,
"nanos": 490000000
"units": 18,
"nanos": 990000000
},
"categories": ["photography", "vintage"]
"categories": ["clothing", "tops"]
},
{
"id": "1YMWWN1N4O",
"name": "Home Barista Kit",
"description": "Always wanted to brew coffee with Chemex and Aeropress at home?",
"picture": "/static/img/products/barista-kit.jpg",
"name": "Watch",
"description": "This gold-tone stainless steel watch will work with most of your outfits.",
"picture": "/static/img/products/watch.jpg",
"priceUsd": {
"currencyCode": "USD",
"units": 124
"units": 109,
"nanos": 990000000
},
"categories": ["cookware"]
"categories": ["accessories"]
},
{
"id": "L9ECAV7KIM",
"name": "Terrarium",
"description": "This terrarium will looks great in your white painted living room.",
"picture": "/static/img/products/terrarium.jpg",
"name": "Loafers",
"description": "A neat addition to your summer wardrobe.",
"picture": "/static/img/products/loafers.jpg",
"priceUsd": {
"currencyCode": "USD",
"units": 36,
"nanos": 450000000
"units": 89,
"nanos": 990000000
},
"categories": ["gardening"]
"categories": ["footwear"]
},
{
"id": "2ZYFJ3GM2N",
"name": "Film Camera",
"description": "This camera looks like it's a film camera, but it's actually digital.",
"picture": "/static/img/products/film-camera.jpg",
"name": "Hairdryer",
"description": "This lightweight hairdryer has 3 heat and speed settings. It's perfect for travel.",
"picture": "/static/img/products/hairdryer.jpg",
"priceUsd": {
"currencyCode": "USD",
"units": 2245
"units": 24,
"nanos": 990000000
},
"categories": ["photography", "vintage"]
"categories": ["hair", "beauty"]
},
{
"id": "0PUK6V6EV0",
"name": "Vintage Record Player",
"description": "It still works.",
"picture": "/static/img/products/record-player.jpg",
"name": "Candle Holder",
"description": "This small but intricate candle holder is an excellent gift.",
"picture": "/static/img/products/candle-holder.jpg",
"priceUsd": {
"currencyCode": "USD",
"units": 65,
"nanos": 500000000
"units": 18,
"nanos": 990000000
},
"categories": ["music", "vintage"]
"categories": ["decor", "home"]
},
{
"id": "LS4PSXUNUM",
"name": "Metal Camping Mug",
"description": "You probably don't go camping that often but this is better than plastic cups.",
"picture": "/static/img/products/camp-mug.jpg",
"name": "Salt & Pepper Shakers",
"description": "Add some flavor to your kitchen.",
"picture": "/static/img/products/salt-and-pepper-shakers.jpg",
"priceUsd": {
"currencyCode": "USD",
"units": 24,
"nanos": 330000000
"units": 18,
"nanos": 490000000
},
"categories": ["cookware"]
"categories": ["kitchen"]
},
{
"id": "9SIQT8TOJO",
"name": "City Bike",
"description": "This single gear bike probably cannot climb the hills of San Francisco.",
"picture": "/static/img/products/city-bike.jpg",
"name": "Bamboo Glass Jar",
"description": "This bamboo glass jar can hold 57 oz (1.7 l) and is perfect for any kitchen.",
"picture": "/static/img/products/bamboo-glass-jar.jpg",
"priceUsd": {
"currencyCode": "USD",
"units": 789,
"nanos": 500000000
"units": 5,
"nanos": 490000000
},
"categories": ["cycling"]
"categories": ["kitchen"]
},
{
"id": "6E92ZMYYFZ",
"name": "Air Plant",
"description": "Have you ever wondered whether air plants need water? Buy one and figure out.",
"picture": "/static/img/products/air-plant.jpg",
"name": "Mug",
"description": "A simple mug with a mustard interior.",
"picture": "/static/img/products/mug.jpg",
"priceUsd": {
"currencyCode": "USD",
"units": 12,
"nanos": 300000000
"units": 8,
"nanos": 990000000
},
"categories": ["gardening"]
"categories": ["kitchen"]
}
]
}
2 changes: 1 addition & 1 deletion src/productcatalogservice/server_test.go
Original file line number Diff line number Diff line change
@@ -58,7 +58,7 @@ func TestServer(t *testing.T) {
t.Errorf("got %s, want %s", got, want)
}

sres, err := client.SearchProducts(ctx, &pb.SearchProductsRequest{Query: "typewriter"})
sres, err := client.SearchProducts(ctx, &pb.SearchProductsRequest{Query: "sunglasses"})
if err != nil {
t.Fatal(err)
}
2 changes: 1 addition & 1 deletion src/shippingservice/genproto/demo.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d2c729d

Please sign in to comment.