Skip to content
This repository has been archived by the owner on Aug 18, 2023. It is now read-only.

chef/Commercial-Marketplace-SaaS-Accelerator-Original

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

THIS REPO HAS BEEN ARCHIVED. IT HAS BEEN REPLACED BY THIS PRIVATE/INTERNAL FORK.

Microsoft Commercial Marketplace - Community Sample Code and SDK for SaaS Applications

.NET Core

Introduction

This project is a community-supported reference implementation for integrating Software-as-a-Service (SaaS) solutions with Microsoft commercial marketplace SaaS offers. The SaaS Accelerator may be installed as-is or may be customized to support your requirements. The project provides the following capabilities.

  1. A configurable landing page for SaaS customers
  2. A webhook that listens for subscription changes
  3. A private portal for the publisher to monitor customer subscriptions

The project is implemented in .NET and uses the commercial marketplace billing system, including the SaaS Fulfillment API (v2) and Marketplace Metering Service API.. The SaaS Accelerator models how a typical SaaS platform interacts with the marketplace APIs to provision subscriptions for customers, enable logging, and manage commercial marketplace subscriptions.

Intended Use

This code is a reference implementation of required components of a commercial marketplace SaaS offer and complements the existing commercial marketplace documentation.

This project accelerates the SaaS offer onboarding experience for those building SaaS solutions for the Microsoft commercial marketplace. Whether installed and used as-is or customized for your particular requirements, this reference implementation provides all main components required by a commercial marketplace SaaS offer.

NOTE: Support for this project is community-based and contributions are welcome. Details on contributing can be found below.. This is not an officially supported Microsoft product.

Installation

Installation instructions are here, as well as documents detailing architecture and scaled installation considerations are also available. Following these instructions will typically have the SaaS Accelerator installed in 20 minutes or less.

Video instructions: Additionally, there is a quick video on how to install the SaaS Accelerator with the installer script available through Mastering the Marketplace .

Additional technical documents

  1. Advanced installation - This document details more manual installation instructions and how to set up a local development environment.
  2. Enterprise reference architectures
  3. Single region architectures
  4. Multi-region architectures
  5. Advanced installation checklist

Monitoring

The following documents provide HOW-TOs setup Azure Monitoring and Alerting for the resources deployed by the SaaS Accelerator:

Commercial Marketplace Documentation

Before using this project, please review the commercial marketplace documentation resources below to understand the important concepts, account setup, and offer configuration requirements for publishing SaaS SaaS application offers.

SaaS Accelerator Overview

Saas Diagram

Projects

The source /src directory contains the following Visual Studio projects.

Project Description Directory Name
Customer portal - Sample web application Demonstrates how to register, provision, and activate the marketplace subscription. Implemented using ASP.Net Core 6.0, the sample web application uses the Services client library and data access library to invoke and persist API interactions and provides an example user interface to demonstrate how a customer would manage their subscriptions and plans. SaaS.SDK.CustomerProvisioning
Publisher portal - Sample web application Demonstrates how to generate usage events used in metered billing transactions, and how to emit these events to the Marketplace Metering Service API. SaaS.SDK.PublisherSolution
Client data access library Demonstrates how to persist plans, marketplace subscriptions, and related transaction attributes when using the SaaS Fulfillment API (v2) and Marketplace Metering Service API. SaaS.SDK.Client.DataAccess
Services client library Contains the services used by the Customer and Publisher portals, including the POCO classes to orchestrate calls to the marketplace APIs on client library / database. SaaS.SDK.Services
Unit tests project Helps validate and test the SDKs codebase. SaaS.SDK.UnitTest

The sample code in this repository runs in the publisher's environment as illustrated below. The metering SDK (.NET class library) and a sample web application to report usage events for subscriptions against those plans that support metering (have the dimensions defined and enabled) and correlate to SaaS Metering and SaaS Service blocks in the below image, respectively.

Use case

Technology and Versions

This project has been developed using the following technologies and versions:

Security

The sample code and SDK have been scanned for vulnerabilities and use secure configurations. Versions have been reviewed to ensure compatibility with the latest security guidelines.

Prerequisites

Ensure the following prerequisites are met before getting started:

  • You must have an active Azure subscription for development and testing purposes. Create an Azure subscription here.
  • You must have a Partner Center account enabled for use with the commercial marketplace. Create an account here.
  • We recommend using an Integrated Development Environment (IDE): Visual Studio Code, Visual Studio 2019 / 2022, etc...
  • The SDK has been implemented using .NET 6
  • For data persistence we are using Azure SQL Database and Entity Framework. However, feel free to use any data repository you are comfortable with.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Developers

Code contributed should follow the C# specifications and best practices as documented here.

License

This project is released under the MIT License.

About

A reference example with sample code for developers interested publishing transactable, Software as a-Service offers in the Microsoft commercial marketplace.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 62.1%
  • HTML 18.5%
  • TSQL 13.9%
  • CSS 3.6%
  • PowerShell 1.8%
  • JavaScript 0.1%