Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/huysentruitw/shop
Sample project with HotChocolate GraphQL + EF Core + Blazor
https://github.com/huysentruitw/shop
blazor blazor-webassembly dotnet ef-core
Last synced: 6 days ago
JSON representation
Sample project with HotChocolate GraphQL + EF Core + Blazor
- Host: GitHub
- URL: https://github.com/huysentruitw/shop
- Owner: huysentruitw
- Created: 2023-07-06T20:27:38.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-02-11T19:10:34.000Z (11 months ago)
- Last Synced: 2024-11-11T19:42:54.302Z (2 months ago)
- Topics: blazor, blazor-webassembly, dotnet, ef-core
- Language: C#
- Homepage:
- Size: 47.9 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Shop example
This sample project demonstrates how to build a shop application using .NET, Blazor and HotChocolate GraphQL.
The architecture will use feature-slicing instead of clean/onion architecture to demonstrate how to build applications focusing on business logic instead of technical concerns.
## Work in progress
- [x] Create the project
- [x] Add minimal infrastructure (EF Core, SQL-Server, GraphQL)
- [ ] Add minimal back-end using feature-slicing
- [ ] Add Blazor front-end
- [ ] Add GitHub Actions CI/CD (Deploy to Azure)
- [ ] Add authentication & authorization
- [ ] Add shopping cart
- [ ] Add payment gateway
- [ ] Add order management
- [ ] ...## Getting started
### Install .NET
You can install .NET 8.0.1 from the following link: https://dotnet.microsoft.com/download
### Install the tools
The repository contains a `dotnet-tools.json` file that contains the tools required to build the project. You can install them using the following command:
```bash
dotnet tool restore
```### Start the local database
The project uses SQL-Server as a database. You can start a local instance using docker:
```bash
docker compose up -d
```The first time, it will take a few minutes to download and start the SQL-server image.
### Create the database
You can create the database using the following command:
```bash
dotnet ef database update --project src/Shop.Application/Shop.Application.csproj
```### Start the application
You can start the back-end using the following command:
```bash
dotnet run --project src/Shop.Application/Shop.Application.csproj
```### Browse to Banana Cake Pop
To consume the GraphQL API, you can use the Banana Cake Pop tool. You can access it by browsing to the following URL: https://localhost:5001/graphql