Skip to content

Commit

Permalink
Updating repository and project structure.
Browse files Browse the repository at this point in the history
  • Loading branch information
David Sanchez committed Oct 18, 2018
1 parent 47d6ff7 commit ff5e225
Show file tree
Hide file tree
Showing 268 changed files with 714 additions and 733 deletions.
63 changes: 0 additions & 63 deletions .gitattributes

This file was deleted.

3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

File renamed without changes.
28 changes: 28 additions & 0 deletions Documents/AzureFunction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Running Azure Function

## Running locally

To run Azure Function locally you need the latest version of Visual Studio and Azure Function tools.

Open the solution `SmartHotel360.Website.sln` and open the project `SmartHotel360.WebsiteFunction` edit the `local.settings.json` file with following entries in `Values` section:

* `cosmos_uri`: URL of the CosmosDb (SQL API) to use
* `cosmos_key`: Key of the CosmosDb (SQL API) to use
* `constr`: Connection String for the CosmosDb (SQL API) to use
* `MicrosoftVisionApiKey`: API Key for Vision API
* `MicrosoftVisionApiEndpoint`: Vision API endpoint (i. e. https://eastus2.api.cognitive.microsoft.com/vision/v1.0/)
* `MicrosoftVisionNumTags`: Tags to fetch from Vision API
* `KeyVaultUri`: Uri of the KeyVault to retrieve the secrets. **Leave it blank to not use key vault**
* `AzureSignalRConnectionString`: Connection string to [Azure SignalR](https://azure.microsoft.com/en-us/services/signalr-service/) resource to use.

## Deploy to Azure

To deploy the Azure Function just publish it from Visual Studio following the instructions in the "Publish to Azure" section of the [AF documentation]
(https://docs.microsoft.com/en-us/azure/azure-functions/functions-develop-vs).

## Creating needed Azure resources

The Azure Function needs some Azure resources to be created and setup:

1. Create Azure SignalR by deploying the ARM template.
2. Create CosmosDB as part of the ARM template.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Binary file added Documents/Images/deploy-to-azure.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
61 changes: 34 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,51 +8,58 @@ We updated the code for this repository to support Scott Hanselman's General Ses
For this reference app scenario, we built several consumer and line-of-business apps and an Azure backend. You can find all SmartHotel360 repos in the following locations:

* [SmartHotel360 ](https://github.com/Microsoft/SmartHotel360)
* [IoT Demo](https://github.com/Microsoft/SmartHotel360-IoT)
* [Backend Services (optimized for Kubernetes)](https://github.com/Microsoft/SmartHotel360-AKS-DevSpaces-Demo)
* [Public Website](https://github.com/Microsoft/SmartHotel360-public-web)
* [Pet Checker Serverless Function](https://github.com/Microsoft/SmartHotel360-PetCheckerFunction)
* [Mobile Apps](https://github.com/Microsoft/SmartHotel360-mobile-desktop-apps)
* [Sentiment Analysis](https://github.com/Microsoft/SmartHotel360-Sentiment-Analysis-App)
* [Migrating Internal apps to Azure](https://github.com/Microsoft/SmartHotel360-internal-booking-apps)
* [Original Backend Services](https://github.com/Microsoft/SmartHotel360-Azure-backend)
* [Application Modernization](https://github.com/Microsoft/SmartHotel360-AppModernization)
* [How Containers Enable Local Development](https://github.com/microsoft/SmartHotel360-ContainersForLocalDev)

# SmartHotel360 - Public Web
Welcome to the repository containing the public web site of the SmartHotel360. SmartHotel360 has multiple apps that share a common Azure backend, including a public website where hotel guests can book a room, smart conference rooms, and even include their accompanying family travelers and their pets! The site was built using ASP.NET Core 2.0.
* [IoT](https://github.com/Microsoft/SmartHotel360-IoT)
* [Backend](https://github.com/Microsoft/SmartHotel360-Backend)
* [Website](https://github.com/Microsoft/SmartHotel360-Website)
* [Mobile](https://github.com/Microsoft/SmartHotel360-Mobile)
* [Sentiment Analysis](https://github.com/Microsoft/SmartHotel360-SentimentAnalysis)
* [Registration](https://github.com/Microsoft/SmartHotel360-Registration)

# SmartHotel360 - Website
Welcome to the repository containing the website of SmartHotel360. SmartHotel360 has multiple apps that share a common backend, including a public website where hotel guests can book a room, smart conference rooms, and even include their accompanying family travelers and their pets! The site was built using ASP.NET Core.

# Getting Started

Once downloaded you can open the `SmartHotel360.PublicWebSite.sln` file to open the solution in Visual Studio 2017 15.5 or higher. This solution contains two projects:
Once downloaded you can open the `SmartHotel360.WebSite.sln` file, located in the Source folder to open the solution in Visual Studio 2017 15.5 or higher. This solution contains three projects:

* The SmartHotel360.Website project: An [ASP.NET Core](www.dot.net) website which is a web app developed using React+Redux and server-side rendering.
* The SmartHotel360.WebsiteFunction project: An Azure Function used to analyze photos of pets using the Congnitive Services Vision API and Azure Cosmos DB.
* The SmartHotel360.WebsiteARM project: An Azure Resource Manager template to facilitate the deployment of the different resources you may need in order to deploy the app in your Azure subscription.

# Deploy to Azure

* The SmartHotel360.PublicWeb project: An [ASP.NET Core 2.0](www.dot.net) website which is a SPA web app developed using React+Redux and server-side rendering.
* The PetCheckerFunction project: An Azure Function used to analyze photos of pets using the Congnitive Services Vision API and Azure Cosmos DB.
We have added an ARM template so you can automate the resources creation

<a href="https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FMicrosoft%2FSmartHotel360-Website%2Fmaster%2FSource%2FSmartHotel360.WebsiteARM%2Fsmarthote360.website.deployment.json?target=_blank" target='_blank'><img src="/Documents/Images/deploy-to-azure.png" alt="Deploy to Azure"/></a>

## Screens
<img src="./doc/screen2.png" Height="350" />
<img src="./doc/screen4.png" Height="350" />
<img src="./doc/screen3.png" Height="350" />
<img src="./doc/screen1.png" Height="350" />
<img src="./doc/screen5.png" Height="350" />
<img src="./Documents/Images/screen2.png" Height="350" />
<img src="./Documents/Images/screen4.png" Height="350" />
<img src="./Documents/Images/screen3.png" Height="350" />
<img src="./Documents/Images/screen1.png" Height="350" />
<img src="./Documents/Images/screen5.png" Height="350" />

## Running the web
## Running the website

Set `SmartHotel360.PublicWeb` as startup project, then hit F5 to start debugging. The web is configured to use the public endpoints for the backend, so you don't need to run the backend locally.
Set `SmartHotel360.Website` as startup project, then hit F5 to start debugging. The web is configured to use the public endpoints for the backend, so you don't need to run the backend locally.

## Configuring the web
## Configuring the website

The file `appsettings.Development.json` contains the settings of the web site. By default following options are used:

* `SettingsUrl`: Url of the configuration endpoint. By default it uses the public endpoint service. Only change if you are running your own backend services.
* `FakeAuth`: Contains data to "simulate" the login process. Data is `Name` (name of the user), `UserId` (id of the user), `PicUrl` (url of the user avatar).

> If `FakeAuth` is **not set** the PublicWeb site uses an Azure Active Directory B2C to enable the logins. Please read "[Enabling B2C logins](./doc/b2c.md)" if you want to use B2C logins.
> If `FakeAuth` is **not set** the PublicWeb site uses an Azure Active Directory B2C to enable the logins. Please read "[Enabling B2C logins](./Documents/Images/B2C.md)" if you want to use B2C logins.
If you want to deploy this application to your own Azure subscription, see [this setup guide](./Documents/AzureDeployment.md) for instructions.

# Running the Pet Checker Azure Funcion

If you want to deploy this application to your own Azure subscription, see [this setup guide](./doc/demo-setup.md) for instructions.
You can [run the Azure Function locally or deploy it to Azure](./Documents/AzureFunction.md)

# Demo Scripts
There is a detailed step-by-step demo script in the [demoscripts](./demoscripts/) folder of this repo that you can use in your own presentations. In order to perform the demos, you will need to deploy the application resources to Azure first. See [this setup guide](./doc/demo-setup.md) on how to do that.
There is a detailed step-by-step demo script in the [demoscripts](./Documents/DemoScripts) folder of this repo that you can use in your own presentations. In order to perform the demos, you will need to deploy the application resources to Azure first.

# Contributing

Expand Down
1 change: 0 additions & 1 deletion SmartHotel360-AKS-DevSpaces-Demo
Submodule SmartHotel360-AKS-DevSpaces-Demo deleted from 81fe9c
25 changes: 0 additions & 25 deletions SmartHotel360.PublicWeb.sln

This file was deleted.

37 changes: 37 additions & 0 deletions Source/SmartHotel360.Website.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27130.2027
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SmartHotel360.Website", "SmartHotel360.Website\SmartHotel360.Website.csproj", "{19C71EBB-DC43-4DF4-B057-17A6B3E2CB0A}"
EndProject
Project("{151D2E53-A2C4-4D7D-83FE-D05416EBD58E}") = "SmartHotel360.WebsiteARM", "SmartHotel360.WebsiteARM\SmartHotel360.WebsiteARM.deployproj", "{95341EE4-C2A1-48EA-B5BC-A8765B6449FB}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SmartHotel360.WebsiteFunction", "SmartHotel360.WebsiteFunction\SmartHotel360.WebsiteFunction.csproj", "{62DDB45C-9BE8-4C91-BDE3-7D6EECE027A7}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{19C71EBB-DC43-4DF4-B057-17A6B3E2CB0A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{19C71EBB-DC43-4DF4-B057-17A6B3E2CB0A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{19C71EBB-DC43-4DF4-B057-17A6B3E2CB0A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{19C71EBB-DC43-4DF4-B057-17A6B3E2CB0A}.Release|Any CPU.Build.0 = Release|Any CPU
{95341EE4-C2A1-48EA-B5BC-A8765B6449FB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{95341EE4-C2A1-48EA-B5BC-A8765B6449FB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{95341EE4-C2A1-48EA-B5BC-A8765B6449FB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{95341EE4-C2A1-48EA-B5BC-A8765B6449FB}.Release|Any CPU.Build.0 = Release|Any CPU
{62DDB45C-9BE8-4C91-BDE3-7D6EECE027A7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{62DDB45C-9BE8-4C91-BDE3-7D6EECE027A7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{62DDB45C-9BE8-4C91-BDE3-7D6EECE027A7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{62DDB45C-9BE8-4C91-BDE3-7D6EECE027A7}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {23C4A13D-E82E-48D6-8294-EE92628BE637}
EndGlobalSection
EndGlobal
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit ff5e225

Please sign in to comment.