From 3647b304a37f8e53fd140d90ad385cf0dcdfb9c2 Mon Sep 17 00:00:00 2001 From: Grae Jones Date: Tue, 3 Feb 2026 15:45:39 -0800 Subject: [PATCH] Initial commit --- .gitignore | 1 + Client-Admin/.babelrc | 6 + Client-Admin/README.md | 72 + Client-Admin/dist/bundle.js | 2 + Client-Admin/dist/bundle.js.LICENSE.txt | 47 + Client-Admin/dist/index.html | 1 + Client-Admin/package-lock.json | 7302 +++++++++++++++++ Client-Admin/package.json | 27 + Client-Admin/public/index.html | 13 + Client-Admin/src/app/App.js | 43 + Client-Admin/src/auth/AuthProvider.jsx | 219 + Client-Admin/src/auth/authConfig.js | 25 + Client-Admin/src/components/Dashboard.jsx | 135 + .../src/components/RegistrationForm.jsx | 57 + Client-Admin/src/components/Shell.jsx | 31 + Client-Admin/src/components/SignInOverlay.jsx | 22 + .../src/components/admin/ClientsPanel.jsx | 147 + .../src/components/admin/SessionsPanel.jsx | 94 + .../src/components/admin/UsersPanel.jsx | 209 + Client-Admin/src/index.js | 14 + Client-Admin/src/styles/app.css | 338 + Client-Admin/webpack.config.js | 38 + Client-Client/.babelrc | 6 + Client-Client/dist/bundle.js | 2 + Client-Client/dist/bundle.js.LICENSE.txt | 47 + Client-Client/dist/index.html | 1 + Client-Client/package.json | 27 + Client-Client/public/index.html | 13 + Client-Client/src/app/App.js | 40 + Client-Client/src/auth/AuthProvider.jsx | 262 + Client-Client/src/auth/authConfig.js | 47 + .../src/components/AuthErrorPage.jsx | 28 + Client-Client/src/components/LandingPage.jsx | 50 + Client-Client/src/components/Platform.jsx | 101 + .../src/components/RegistrationPage.jsx | 15 + Client-Client/src/components/Sidebar.jsx | 65 + .../src/components/views/Accounts.jsx | 125 + .../src/components/views/Campaigns.jsx | 274 + .../src/components/views/Dashboard.jsx | 140 + .../src/components/views/Developer.jsx | 118 + .../src/components/views/Reporting.jsx | 151 + .../src/components/views/Settings.jsx | 199 + Client-Client/src/index.js | 6 + Client-Client/src/services/apiClient.js | 108 + Client-Client/src/styles/app.css | 266 + Client-Client/webpack.config.js | 27 + Client-Registration/.babelrc | 1 + Client-Registration/package-lock.json | 7302 +++++++++++++++++ Client-Registration/package.json | 27 + Client-Registration/public/bundle.js | 2 + .../public/bundle.js.LICENSE.txt | 35 + Client-Registration/public/index.html | 1 + Client-Registration/src/App.jsx | 321 + Client-Registration/src/index.js | 6 + Client-Registration/src/styles.css | 327 + Client-Registration/webpack.config.js | 15 + Client-TestApi/package-lock.json | 6857 ++++++++++++++++ Client-TestApi/package.json | 26 + Client-TestApi/public/bundle.js | 2 + Client-TestApi/public/bundle.js.LICENSE.txt | 37 + Client-TestApi/public/index.html | 11 + Client-TestApi/src/app/App.js | 38 + Client-TestApi/src/auth/AuthProvider.jsx | 197 + Client-TestApi/src/auth/authConfig.js | 45 + .../src/components/ResponsePanel.jsx | 9 + Client-TestApi/src/components/ServiceForm.js | 138 + Client-TestApi/src/components/Shell.jsx | 28 + .../src/components/SignInOverlay.jsx | 65 + Client-TestApi/src/index.js | 7 + Client-TestApi/src/services/apiClient.js | 57 + .../src/services/providerCatalog.js | 7 + Client-TestApi/src/services/serviceCatalog.js | 109 + Client-TestApi/src/styles/app.css | 456 + Client-TestApi/webpack.config.js | 34 + 74 files changed, 27121 insertions(+) create mode 100644 .gitignore create mode 100644 Client-Admin/.babelrc create mode 100644 Client-Admin/README.md create mode 100644 Client-Admin/dist/bundle.js create mode 100644 Client-Admin/dist/bundle.js.LICENSE.txt create mode 100644 Client-Admin/dist/index.html create mode 100644 Client-Admin/package-lock.json create mode 100644 Client-Admin/package.json create mode 100644 Client-Admin/public/index.html create mode 100644 Client-Admin/src/app/App.js create mode 100644 Client-Admin/src/auth/AuthProvider.jsx create mode 100644 Client-Admin/src/auth/authConfig.js create mode 100644 Client-Admin/src/components/Dashboard.jsx create mode 100644 Client-Admin/src/components/RegistrationForm.jsx create mode 100644 Client-Admin/src/components/Shell.jsx create mode 100644 Client-Admin/src/components/SignInOverlay.jsx create mode 100644 Client-Admin/src/components/admin/ClientsPanel.jsx create mode 100644 Client-Admin/src/components/admin/SessionsPanel.jsx create mode 100644 Client-Admin/src/components/admin/UsersPanel.jsx create mode 100644 Client-Admin/src/index.js create mode 100644 Client-Admin/src/styles/app.css create mode 100644 Client-Admin/webpack.config.js create mode 100644 Client-Client/.babelrc create mode 100644 Client-Client/dist/bundle.js create mode 100644 Client-Client/dist/bundle.js.LICENSE.txt create mode 100644 Client-Client/dist/index.html create mode 100644 Client-Client/package.json create mode 100644 Client-Client/public/index.html create mode 100644 Client-Client/src/app/App.js create mode 100644 Client-Client/src/auth/AuthProvider.jsx create mode 100644 Client-Client/src/auth/authConfig.js create mode 100644 Client-Client/src/components/AuthErrorPage.jsx create mode 100644 Client-Client/src/components/LandingPage.jsx create mode 100644 Client-Client/src/components/Platform.jsx create mode 100644 Client-Client/src/components/RegistrationPage.jsx create mode 100644 Client-Client/src/components/Sidebar.jsx create mode 100644 Client-Client/src/components/views/Accounts.jsx create mode 100644 Client-Client/src/components/views/Campaigns.jsx create mode 100644 Client-Client/src/components/views/Dashboard.jsx create mode 100644 Client-Client/src/components/views/Developer.jsx create mode 100644 Client-Client/src/components/views/Reporting.jsx create mode 100644 Client-Client/src/components/views/Settings.jsx create mode 100644 Client-Client/src/index.js create mode 100644 Client-Client/src/services/apiClient.js create mode 100644 Client-Client/src/styles/app.css create mode 100644 Client-Client/webpack.config.js create mode 100644 Client-Registration/.babelrc create mode 100644 Client-Registration/package-lock.json create mode 100644 Client-Registration/package.json create mode 100644 Client-Registration/public/bundle.js create mode 100644 Client-Registration/public/bundle.js.LICENSE.txt create mode 100644 Client-Registration/public/index.html create mode 100644 Client-Registration/src/App.jsx create mode 100644 Client-Registration/src/index.js create mode 100644 Client-Registration/src/styles.css create mode 100644 Client-Registration/webpack.config.js create mode 100644 Client-TestApi/package-lock.json create mode 100644 Client-TestApi/package.json create mode 100644 Client-TestApi/public/bundle.js create mode 100644 Client-TestApi/public/bundle.js.LICENSE.txt create mode 100644 Client-TestApi/public/index.html create mode 100644 Client-TestApi/src/app/App.js create mode 100644 Client-TestApi/src/auth/AuthProvider.jsx create mode 100644 Client-TestApi/src/auth/authConfig.js create mode 100644 Client-TestApi/src/components/ResponsePanel.jsx create mode 100644 Client-TestApi/src/components/ServiceForm.js create mode 100644 Client-TestApi/src/components/Shell.jsx create mode 100644 Client-TestApi/src/components/SignInOverlay.jsx create mode 100644 Client-TestApi/src/index.js create mode 100644 Client-TestApi/src/services/apiClient.js create mode 100644 Client-TestApi/src/services/providerCatalog.js create mode 100644 Client-TestApi/src/services/serviceCatalog.js create mode 100644 Client-TestApi/src/styles/app.css create mode 100644 Client-TestApi/webpack.config.js diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..40b878d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +node_modules/ \ No newline at end of file diff --git a/Client-Admin/.babelrc b/Client-Admin/.babelrc new file mode 100644 index 0000000..cf5ee0a --- /dev/null +++ b/Client-Admin/.babelrc @@ -0,0 +1,6 @@ +{ + "presets": [ + "@babel/preset-env", + ["@babel/preset-react", { "runtime": "automatic" }] + ] +} diff --git a/Client-Admin/README.md b/Client-Admin/README.md new file mode 100644 index 0000000..ed70a66 --- /dev/null +++ b/Client-Admin/README.md @@ -0,0 +1,72 @@ +# AdPlatform Management Console + +React-based admin interface for AdPlatform management. + +## Project Structure + +``` +management-client/ +├── src/ +│ ├── app/ +│ │ └── App.js # Main app routing +│ ├── auth/ +│ │ ├── authConfig.js # MSAL + API config +│ │ └── AuthProvider.jsx # Auth context +│ ├── components/ +│ │ ├── admin/ +│ │ │ ├── ClientsPanel.jsx # Client management +│ │ │ ├── UsersPanel.jsx # User management +│ │ │ └── SessionsPanel.jsx # Session management +│ │ ├── Shell.jsx # Layout wrapper +│ │ ├── SignInOverlay.jsx # Sign in screen +│ │ ├── RegistrationForm.jsx # New org setup +│ │ └── Dashboard.jsx # Main dashboard +│ ├── styles/ +│ │ └── app.css +│ └── index.js +├── public/ +│ └── index.html +├── package.json +└── webpack.config.js +``` + +## Features + +- **Authentication**: Microsoft Entra External ID (MSAL.js) +- **Onboarding**: New user registration with organization setup +- **Client Management**: Create, list, deactivate clients +- **User Management**: Create, list, link to clients, deactivate users +- **Session Management**: View active sessions, revoke, cleanup + +## Setup + +```bash +npm install +npm start +``` + +Opens at http://localhost:3000 + +## Configuration + +Edit `src/auth/authConfig.js`: + +```javascript +export const msalConfig = { + auth: { + clientId: 'YOUR_CLIENT_ID', + authority: 'https://login.microsoftonline.com/YOUR_TENANT_ID', + } +}; + +export const API_BASE_URL = 'https://your-management-api.com'; +export const GATEWAY_API_URL = 'https://your-gateway-api.com'; +``` + +## User Flow + +1. User signs in with Microsoft → JWT obtained +2. App checks `/api/onboarding/status` +3. If not registered → Registration form shown +4. After registration → Session created via Gateway +5. Dashboard displayed with admin tabs diff --git a/Client-Admin/dist/bundle.js b/Client-Admin/dist/bundle.js new file mode 100644 index 0000000..076f962 --- /dev/null +++ b/Client-Admin/dist/bundle.js @@ -0,0 +1,2 @@ +/*! For license information please see bundle.js.LICENSE.txt */ +(()=>{"use strict";var e={20(e,t,n){var r=n(540),o=Symbol.for("react.element"),i=(Symbol.for("react.fragment"),Object.prototype.hasOwnProperty),a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,c={},l=null,u=null;for(r in void 0!==n&&(l=""+n),void 0!==t.key&&(l=""+t.key),void 0!==t.ref&&(u=t.ref),t)i.call(t,r)&&!s.hasOwnProperty(r)&&(c[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===c[r]&&(c[r]=t[r]);return{$$typeof:o,type:e,key:l,ref:u,props:c,_owner:a.current}}t.jsx=c,t.jsxs=c},56(e,t,n){e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},72(e){var t=[];function n(e){for(var n=-1,r=0;r0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n}).join("")},t.i=function(e,n,r,o,i){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(r)for(var s=0;s0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=i),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),o&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=o):u[4]="".concat(o)),t.push(u))}},t}},338(e,t,n){var r=n(961);t.H=r.createRoot,r.hydrateRoot},463(e,t){function n(e,t){var n=e.length;e.push(t);e:for(;0>>1,o=e[r];if(!(0>>1;ri(c,n))li(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else{if(!(li(u,n)))break e;e[r]=u,e[l]=n,r=l}}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var a=performance;t.unstable_now=function(){return a.now()}}else{var s=Date,c=s.now();t.unstable_now=function(){return s.now()-c}}var l=[],u=[],d=1,h=null,f=3,p=!1,g=!1,m=!1,y="function"==typeof setTimeout?setTimeout:null,v="function"==typeof clearTimeout?clearTimeout:null,b="undefined"!=typeof setImmediate?setImmediate:null;function w(e){for(var t=r(u);null!==t;){if(null===t.callback)o(u);else{if(!(t.startTime<=e))break;o(u),t.sortIndex=t.expirationTime,n(l,t)}t=r(u)}}function C(e){if(m=!1,w(e),!g)if(null!==r(l))g=!0,M(k);else{var t=r(u);null!==t&&O(C,t.startTime-e)}}function k(e,n){g=!1,m&&(m=!1,v(A),A=-1),p=!0;var i=f;try{for(w(n),h=r(l);null!==h&&(!(h.expirationTime>n)||e&&!R());){var a=h.callback;if("function"==typeof a){h.callback=null,f=h.priorityLevel;var s=a(h.expirationTime<=n);n=t.unstable_now(),"function"==typeof s?h.callback=s:h===r(l)&&o(l),w(n)}else o(l);h=r(l)}if(null!==h)var c=!0;else{var d=r(u);null!==d&&O(C,d.startTime-n),c=!1}return c}finally{h=null,f=i,p=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var S,I=!1,T=null,A=-1,_=5,E=-1;function R(){return!(t.unstable_now()-E<_)}function P(){if(null!==T){var e=t.unstable_now();E=e;var n=!0;try{n=T(!0,e)}finally{n?S():(I=!1,T=null)}}else I=!1}if("function"==typeof b)S=function(){b(P)};else if("undefined"!=typeof MessageChannel){var x=new MessageChannel,N=x.port2;x.port1.onmessage=P,S=function(){N.postMessage(null)}}else S=function(){y(P,0)};function M(e){T=e,I||(I=!0,S())}function O(e,n){A=y(function(){e(t.unstable_now())},n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){g||p||(g=!0,M(k))},t.unstable_forceFrameRate=function(e){0>e||125a?(e.sortIndex=i,n(u,e),null===r(l)&&e===r(u)&&(m?(v(A),A=-1):m=!0,O(C,i-a))):(e.sortIndex=s,n(l,e),g||p||(g=!0,M(k))),e},t.unstable_shouldYield=R,t.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}},540(e,t,n){e.exports=n(287)},551(e,t,n){var r=n(540),o=n(982);function i(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n