Skip to content

Commit d855006

Browse files
committed
docs: add burger-* readmes
1 parent b07e37d commit d855006

File tree

4 files changed

+101
-34
lines changed

4 files changed

+101
-34
lines changed
158 KB
Loading

packages/burger-api/README.md

Lines changed: 34 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
<div align="center">
22

3-
# Azure Functions Burger API
3+
# Burger API (Azure Functions)
44

55
[![Open project in GitHub Codespaces](https://img.shields.io/badge/Codespaces-Open-blue?style=flat-square&logo=github)](https://codespaces.new/Microsoft/mcp-agent-langchainjs?hide_repo_select=true&ref=main&quickstart=true)
66
![Node version](https://img.shields.io/badge/Node.js->=20-3c873a?style=flat-square)
7+
[![TypeScript](https://img.shields.io/badge/TypeScript-blue?style=flat-square&logo=typescript&logoColor=white)](https://www.typescriptlang.org)
78

89
[Overview](#overview)[API Endpoints](#api-endpoints)[Development](#development)
910

@@ -15,6 +16,10 @@ This is the Burger API, a serverless API that allows you to order delicious burg
1516

1617
The API is built with [Azure Functions](https://learn.microsoft.com/azure/azure-functions/functions-overview?pivots=programming-language-javascript).
1718

19+
<div align="center">
20+
<img src="../../docs/images/burger-architecture.drawio.png" alt="Service architecture" />
21+
</div>
22+
1823
## API Endpoints
1924

2025
The Burger API provides the following endpoints:
@@ -25,14 +30,14 @@ The Burger API provides the following endpoints:
2530
| GET | /api/openapi | Returns the OpenAPI specification in YAML format (add `?format=json` for JSON) |
2631
| GET | /api/burgers | Returns a list of all burgers |
2732
| GET | /api/burgers/{id} | Retrieves a specific burger by its ID |
28-
| GET | /api/toppings | Returns a list of all toppings (can be filtered by category with ?category=X) |
33+
| GET | /api/toppings | Returns a list of all toppings (can be filtered by category with `?category=X`) |
2934
| GET | /api/toppings/{id} | Retrieves a specific topping by its ID |
3035
| GET | /api/toppings/categories | Returns a list of all topping categories |
3136
| GET | /api/orders | Returns a list of all orders in the system |
3237
| POST | /api/orders | Places a new order with burgers (requires `userId`) |
3338
| GET | /api/orders/{orderId} | Retrieves an order by its ID |
3439
| DELETE | /api/orders/{orderId} | Cancels an order if it has not yet been started (status must be 'pending', requires `userId` as a query parameter (e.g., `?userId={userId}`) |
35-
| GET | /api/images/{filepath} | Retrieves image files (e.g., /api/images/burger-1.jpg) |
40+
| GET | /api/images/{filepath} | Retrieves image files (e.g., /api/images/burgers/burger-1.jpg) |
3641

3742
### Filtering orders
3843

@@ -77,16 +82,9 @@ No manual API call is needed for these transitions.
7782

7883
## Development
7984

80-
### Setup development environment
81-
82-
You can run this project directly in your browser by using GitHub Codespaces, which will open a web-based VS Code.
85+
### Getting started
8386

84-
1. [**Fork**](https://github.com/Microsoft/mcp-agent-langchainjs/fork) the project to create your own copy of this repository.
85-
2. On your forked repository, select the **Code** button, then the **Codespaces** tab, and clink on the button **Create codespace on main**.
86-
![Screenshot showing how to create a new codespace](../../docs/images/codespaces.png?raw=true)
87-
3. Wait for the Codespace to be created, it should take a few minutes.
88-
89-
If you prefer to run the project locally, follow [these instructions](../../README.md#use-your-local-environment).
87+
Follow the instructions [here](../../README.md#getting-started) to set up the development environment for the entire Pizza MCP Agents project.
9088

9189
### Run the application
9290

@@ -100,3 +98,27 @@ This command will start the Azure Functions application locally. You can test th
10098

10199
> [!NOTE]
102100
> If you have not deployed the Azure resources, it will fall back to in-memory data. You can test the API without deploying it to Azure.
101+
102+
103+
### Available Scripts
104+
105+
| Script | Description |
106+
|--------|-------------|
107+
| `npm start` | Start the development server with hot reload and Azurite storage emulator |
108+
| `npm run build` | Build the TypeScript source |
109+
| `npm run clean` | Clean build artifacts |
110+
| `npm run start:storage` | Start local Azurite storage emulator |
111+
| `update:local-settings` | Create or update `local.settings.json` needed by the Functions runtime |
112+
113+
### Configuration
114+
115+
The application uses environment variables for configuration:
116+
117+
| Variable | Description | Default |
118+
|----------|-------------|---------|
119+
| `AZURE_COSMOSDB_NOSQL_ENDPOINT` | Azure Cosmos DB endpoint | `""` (not set) |
120+
| `AZURE_STORAGE_URL` | Azure Storage URL for images | `""` (not set) |
121+
| `AZURE_STORAGE_CONTAINER_NAME` | Azure Storage container name for images | `""` (not set) |
122+
123+
> [!NOTE]
124+
> When running locally without any configuration set, the API will automatically use in-memory storage for the database and file access for the images, and log this behavior.

packages/burger-mcp/README.md

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
[![Open project in GitHub Codespaces](https://img.shields.io/badge/Codespaces-Open-blue?style=flat-square&logo=github)](https://codespaces.new/Microsoft/open-hack-build-25?hide_repo_select=true&ref=main&quickstart=true)
66
![Node version](https://img.shields.io/badge/Node.js->=22-3c873a?style=flat-square)
7+
[![TypeScript](https://img.shields.io/badge/TypeScript-blue?style=flat-square&logo=typescript&logoColor=white)](https://www.typescriptlang.org)
8+
[![Express](https://img.shields.io/badge/Express-404d59?style=flat-square&logo=express&logoColor=white)](https://expressjs.com)
79

810
[Overview](#overview)[MCP tools](#mcp-tools)[Development](#development)
911

@@ -21,6 +23,10 @@ This server supports the following transport types:
2123

2224
The remote server is deployed with [Azure Functions](https://learn.microsoft.com/azure/azure-functions/functions-overview).
2325

26+
<div align="center">
27+
<img src="../../docs/images/burger-architecture.drawio.png" alt="Service architecture" />
28+
</div>
29+
2430
## MCP tools
2531

2632
The Burger MCP server provides the following tools:
@@ -55,16 +61,9 @@ First, you need to start the Burger API and Burger MCP server locally.
5561
5662
## Development
5763

58-
### Setup development environment
59-
60-
You can run this project directly in your browser by using GitHub Codespaces, which will open a web-based VS Code.
61-
62-
1. [**Fork**](https://github.com/Microsoft/open-hack-build-25/fork) the project to create your own copy of this repository.
63-
2. On your forked repository, select the **Code** button, then the **Codespaces** tab, and clink on the button **Create codespace on main**.
64-
![Screenshot showing how to create a new codespace](../../docs/images/codespaces.png?raw=true)
65-
3. Wait for the Codespace to be created, it should take a few minutes.
64+
### Getting started
6665

67-
If you prefer to run the project locally, follow [these instructions](../../README.md#use-your-local-environment).
66+
Follow the instructions [here](../../README.md#getting-started) to set up the development environment for the entire Pizza MCP Agents project.
6867

6968
### Run the application
7069

@@ -87,3 +86,23 @@ By default, the MCP server will connect to the Burger API instance set by the `B
8786
```bash
8887
npm run start -- --local
8988
```
89+
90+
### Available Scripts
91+
92+
| Script | Description |
93+
|--------|-------------|
94+
| `npm start` | Start the MCP server with HTTP and SSE endpoints |
95+
| `npm run start:local` | Start the MCP server with STDIO transport |
96+
| `npm run dev` | Start the MCP server with hot reload |
97+
| `npm run dev:local` | Start the MCP server with hot reload and STDIO transport |
98+
| `npm run build` | Build the TypeScript source |
99+
| `npm run clean` | Clean build artifacts |
100+
| `npm run update:local-settings` | Create or update `local.settings.json` needed by the Functions runtime |
101+
102+
### Configuration
103+
104+
The application uses environment variables for configuration:
105+
106+
| Variable | Description | Default |
107+
|----------|-------------|---------|
108+
| `BURGER_API_URL` | URL of the Pizza API server | `http://localhost:7071` |

packages/burger-webapp/README.md

Lines changed: 39 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,35 @@
11
<div align="center">
22

3-
# Azure Static Web Apps Burger Orders Web App
3+
# Burger Orders Web App (Azure Static Web Apps)
44

5-
[![Open project in GitHub Codespaces](https://img.shields.io/badge/Codespaces-Open-blue?style=flat-square&logo=github)](https://codespaces.new/Microsoft/open-hack-build-25?hide_repo_select=true&ref=main&quickstart=true)
6-
![Node version](https://img.shields.io/badge/Node.js->=20-3c873a?style=flat-square)
5+
[![Open project in GitHub Codespaces](https://img.shields.io/badge/Codespaces-Open-blue?style=flat-square&logo=github)](https://codespaces.new/Azure-Samples/mcp-agent-langchainjs?hide_repo_select=true&ref=main&quickstart=true)
6+
![Node version](https://img.shields.io/badge/Node.js->=22-3c873a?style=flat-square)
7+
[![TypeScript](https://img.shields.io/badge/TypeScript-blue?style=flat-square&logo=typescript&logoColor=white)](https://www.typescriptlang.org)
8+
[![Lit](https://img.shields.io/badge/Lit-4d64ff?style=flat-square&logo=lit&logoColor=white)](https://lit.dev)
79

810
[Overview](#overview)[Development](#development)
911

1012
</div>
1113

1214
## Overview
1315

14-
This web app provides a dashboard visualisation interface for the live orders made through the Burger API. This application is built using [Azure Static Web Apps](https://learn.microsoft.com/azure/static-web-apps/) and uses the Azure Functions Burger API to acess the data.
16+
This website provides a dashboard visualisation interface for the live orders made through the Burger API. This application is built using [Azure Static Web Apps](https://learn.microsoft.com/azure/static-web-apps/) and uses the Azure Functions Burger API to acess the data.
1517

16-
## Development
18+
<div align="center">
19+
<img src="../../docs/images/burger-architecture.drawio.png" alt="Service architecture" />
20+
</div>
1721

18-
### Setup development environment
22+
### Features
1923

20-
You can run this project directly in your browser by using GitHub Codespaces, which will open a web-based VS Code.
24+
- **Live orders dashboard**: Displays all current orders in real-time
25+
- **Responsive design**: Optimized for both desktop and mobile devices
26+
- **Static hosting**: Global content delivery through Azure Static Web Apps
2127

22-
1. [**Fork**](https://github.com/Microsoft/open-hack-build-25/fork) the project to create your own copy of this repository.
23-
2. On your forked repository, select the **Code** button, then the **Codespaces** tab, and click on the button **Create codespace on main**.
24-
![Screenshot showing how to create a new codespace](../../docs/images/codespaces.png?raw=true)
25-
3. Wait for the Codespace to be created, it should take a few minutes.
28+
## Development
29+
30+
### Getting started
2631

27-
If you prefer to run the project locally, follow [these instructions](../../README.md#use-your-local-environment).
32+
Follow the instructions [here](../../README.md#getting-started) to set up the development environment for the entire Burger MCP Agents project.
2833

2934
### Run the application
3035

@@ -34,4 +39,25 @@ You can run the following command to run the application locally:
3439
npm start
3540
```
3641

37-
This command will start the [Vite](https://vitejs.dev/) development server and the Azure Functions emulator with the Burger API. This will allow you to test the web app locally, using the URL `http://localhost:5173`.
42+
This command will start the [Vite](https://vitejs.dev/) development server and the Azure Functions emulator with the Burger API. This will allow you to test the website locally, using the URL `http://localhost:5173`.
43+
44+
### Available scripts
45+
46+
| Command | Description |
47+
|---------|-------------|
48+
| `npm start` | Start the web app server and the Functions emulator for the Burger API |
49+
| `npm run start:mock` | Start the web app server with mocked data (useful for testing without the API) |
50+
| `npm run dev` | Start only the Vite development server |
51+
| `npm run build` | Build the application for production |
52+
| `npm run preview` | Preview the production build locally |
53+
| `npm run serve` | Start both the web app and API in development mode |
54+
55+
### Configuration
56+
57+
The application uses environment variables for configuration:
58+
59+
| Variable | Description | Default |
60+
|----------|-------------|---------|
61+
| `BURGER_API_URL` | Burger API base URL | `""` (auto-detected) |
62+
63+
For local development, this doesn't need to be set thanks to Vite development server proxying.

0 commit comments

Comments
 (0)