Skip to content

Commit f097f49

Browse files
authored
Add product page and refactor code (#16)
1 parent dd7d1a9 commit f097f49

151 files changed

Lines changed: 13161 additions & 1128 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 6 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -8,105 +8,19 @@ A lightweight low ceremony microservices without Docker, Docker-compose and Helm
88
![product-catalog-api](https://github.com/thangchung/practical-dapr/workflows/product-catalog-ci/badge.svg?branch=master)
99
![inventory-api](https://github.com/thangchung/practical-dapr/workflows/inventory-ci/badge.svg?branch=master)
1010

11-
## Give a Star! :star:
11+
## Show your support
1212

1313
If you liked `practical-dapr` project or if it helped you, please give a star :star: for this repository. That will not only help strengthen our .NET community but also improve cloud-native apps development skills for .NET developers in around the world. Thank you very much :+1:
1414

15-
# High Level Architecture
15+
# CoolStore application
1616

17-
![](assets/high_level_architecture.png)
17+
![](docs/assets/webui-products.png)
1818

19-
# Communication Style
19+
# High level architecture
2020

21-
![](assets/commucation_style.png)
21+
![](docs/assets/high_level_architecture.png)
2222

23-
# Get starting
24-
25-
## Start required components
26-
27-
- We need Docker for Desktop installed with Kubernetes is enabled.
28-
- Follow those steps at https://github.com/dapr/cli to install Dapr CLI.
29-
- Follow these steps at https://github.com/dotnet/tye/blob/master/docs/getting_started.md to install `tye` CLI.
30-
31-
## One tye command to rule them all
32-
33-
```bash
34-
$ tye run
35-
```
36-
37-
Then you can see `tye dashboard` as below
38-
39-
![](assets/tye-dashboard.png)
40-
41-
## Testing it
42-
43-
- Go to `webui`, and on `Bindings` column click to `http` link (http://localhost:58275 in the picture) to access to `Blazor Web UI`
44-
- Go to `identity-api`, and on `Bindings` column click to `http` link (http://localhost:58269 in the picture) to access to `Identity Server 4`
45-
- Go to `graph-api`, and on `Bindings` column click to `http` link (http://localhost:58267 in the picture) to access to `GraphQL Api Server`
46-
47-
### GraphQL Server Playground
48-
49-
On the `graph-api` link above, you will be redirected to GraphQL Playground, and you can play with it as following:
50-
51-
```js
52-
query {
53-
products(
54-
page: 1
55-
pageSize: 5
56-
where: { price_lte: 10000 }
57-
order_by: { price: DESC }
58-
) {
59-
edges {
60-
id
61-
name
62-
imageUrl
63-
price
64-
categoryId
65-
categoryName
66-
inventoryId
67-
inventoryLocation
68-
}
69-
totalCount
70-
}
71-
}
72-
```
73-
74-
![](assets/graphql_playground_query_products.png)
75-
76-
### Mutation
77-
78-
```js
79-
mutation createProductMutation($createProductInput: CreateProductInput!) {
80-
createProduct(createProductInput: $createProductInput) {
81-
product {
82-
id
83-
name
84-
}
85-
}
86-
}
87-
```
88-
89-
```js
90-
{
91-
"createProductInput": {
92-
"name": "product 1",
93-
"description": "this is a description",
94-
"imageUrl": "https://picsum.photos/1200/900?image=100",
95-
"price": 100,
96-
"categoryId": "77666AA8-682C-4047-B075-04839281630A",
97-
"inventoryId": "90C9479E-A11C-4D6D-AAAA-0405B6C0EFCD"
98-
}
99-
}
100-
```
101-
102-
![](assets/graphql_playground_mutation.png)
103-
104-
## Debugging application
105-
106-
Follow steps at [Debugging Dapr application using Tye tool](https://dev.to/thangchung/debugging-dapr-application-using-tye-tool-1djb)
107-
108-
## Setup Azure
109-
- [Publish docker image to ACR and AKS](https://docs.microsoft.com/en-us/azure/dev-spaces/how-to/github-actions) and [example](https://github.com/Azure/dev-spaces/blob/master/.github/workflows/bikes.yml)
23+
# **Don't believe it, check yourself at [Developer Guidance](/docs/developer_guide.md)**.
11024

11125
## Contributing
11226

File renamed without changes.
File renamed without changes.
File renamed without changes.

docs/assets/webui-products.png

326 KB
Loading

0 commit comments

Comments
 (0)