github-copilot-resources / copilot-metrics-viewer

Tool to visualize the Copilot metrics provided via the Copilot Business Metrics API (current in public beta)
https://ashy-sky-02a7d0403.5.azurestaticapps.net/
MIT License
215 stars 99 forks source link

Introduce an API layer for GithHub authentication and managing tokens #53

Open karpikpl opened 1 week ago

karpikpl commented 1 week ago

This is by not any means ideal but wanted to share an idea for managing tokens and authentication so that dashboard could be deployed.

I'm open to discussion. I think ideally the solution supports all 3 options:

  1. mocked data
  2. personal access tokens
  3. GitHub App authentication

I could include the PAT token into the API layer and skip the auth flow when present - just store it in session.

The only thing remaining in this PR is:

  1. Decide if we want to go with one docker file (for backend/frontend) or two (one frontend - current solution and another one for backend/frontend)
  2. Automatically copy "dist" to API project for local development