How prabhakar-trivedi-33/wealthera-api-playground works
Project type and purpose
• This is a single‐page React frontend application (“InWealthera API Playground”) intended to simulate the functionality of an external API testing UI (test-ui.inwealthera.com).
• It provides a mock authentication flow, lets users pick endpoints, edit JSON requests, send them, and display formatted JSON responses.
File structure
• Top‐level files
• .gitignore, README.md, package.json: standard project metadata
• .env (in README instructions): holds REACT_APP_API_BASE_URL and REACT_APP_DEFAULT_AUTH_TOKEN
• src/ directory
• index.js: React entry point, renders <App /> into the DOM
• App.js / App.css: main application component & global styling
• components/: UI building blocks
– ApiPlayground.js: wrapper for the playground interface
– EndpointSelector.js: dropdown to choose API endpoints
– RequestEditor.js: JSON editor with validation
– ResponseViewer.js: syntax‐highlighted display of JSON responses
• context/AuthContext.js: React Context provider for auth state (login/logout, token storage)
• No backend code here; this is purely client‐side and relies on an external API service.
Key architectural insights from README
• Technology stack: React (hooks + context), CSS for styling, Node.js/npm for build & dev server.
• Runtime configuration via environment variables (API_BASE_URL, DEFAULT_AUTH_TOKEN).
• Core features: authentication shim, endpoint selection, request/response tooling, error handling.