Skip to content

This repository stores a link shortener application that uses Azure Static Web Apps and Power Apps to manage links

License

Notifications You must be signed in to change notification settings

shammyowens/PP-Link-Shortener

Repository files navigation

PP-Link-Shortener

This repository stores a link shortener application that uses Azure Static Web Apps and Power Apps to manage links

Pre-requisites

Azure Subscription
You need an Azure Static Web app. You can follow this quickstart guide to deploy one.

GitHub Repo
This solution depends on GitHub being the source repository for the Static Web App. It can be amended to use other git repositories.

Power Platform Environment
This solution must be deployed into a Power Platform environment. It makes use of premium features, so requires a Power Apps per App/Premium licence for the people using the app to manage the links.

Components

Model Driven App

This is a simple app which allows the administrator to create, read, update and delete short links.

image

Power Automate Flow

This flow will run whenever a link has been created, updated or deleted. It will then update the staticwebapp.config.json for the static web app.

image

Environment Variables

There is an environment variables for GitHub repo, owner, name and email.

image

GitHub custom connector

Big thanks to Jan Vidar Elven and his post on how to create a custom connector to GitHub. This made the process a lot easier.

image

How to use

  • Create GitHub Repo
  • Create Azure Static Web App and connect it to the GitHub Repo
  • Configure Azure Static Web App with a custom domain (optional)
  • Create GitHub personal access token. More information on how to generate a personal access token can be found here.
  • Install the GitHub Connector solution into your Power Platform environment. This has the custom connector that needs to be loaded before the main solution.
  • Install the Link Shortener solution into your Power Platform environment. Ensure the environment variables for owner and repo are updated appropriately.
  • Create a connection for the GitHub connector ensuring that the key is in format [Bearer [Token]].
  • Create some link records
  • The CI/CD actions pipeline for the Static Web App should run and update the configuration
  • Test the short url

About

This repository stores a link shortener application that uses Azure Static Web Apps and Power Apps to manage links

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published