How mohan97babu/cardreader-poc works
This repository implements a React card-reader payment client backed by a Spring Boot payment API. The user workflow initializes Stripe Terminal, discovers and connects a simulated reader, obtains a connection token, then requests a PaymentIntent and collects and processes it through the reader. The backend creates PaymentIntents and obtains Terminal connection tokens from Stripe. Edges reflect calls visible in the supplied excerpts; reader internals and framework wiring are not expanded beyond that evidence.
Main entry points: PaymentComponent.js Payment UI · index.js React Entry · App.js App Shell · PaymentController.java Payment Controller
Components 10
Frontend
- React Entry
Frontend/Frontend/cardreader/src/index.js - App Shell
Frontend/Frontend/cardreader/src/App.js - Payment UI
Frontend/Frontend/cardreader/src/PaymentComponent.js - Vitals Reporter
Frontend/Frontend/cardreader/src/reportWebVitals.js
Backend API
- Spring Boot App
Backend/cardreader/src/main/java/com/payment/cardreader/CardreaderApplication.java - Payment Controller
Backend/cardreader/src/main/java/com/payment/cardreader/PaymentController.java
Payment Services
- Terminal SDK
- Card Reader
- Stripe API
Other components
- User
Connections 8
- User → Payment UI: initiates payment
Frontend/Frontend/cardreader/src/PaymentComponent.js - React Entry → App Shell: renders
Frontend/Frontend/cardreader/src/index.js - React Entry → Vitals Reporter: calls
Frontend/Frontend/cardreader/src/index.js - App Shell → Payment UI: renders
Frontend/Frontend/cardreader/src/App.js - Payment UI → Terminal SDK: initializes and processes
Frontend/Frontend/cardreader/src/PaymentComponent.js - Payment UI → Card Reader: discovers and connects
Frontend/Frontend/cardreader/src/PaymentComponent.js - Payment UI → Payment Controller: requests tokens and payment
Frontend/Frontend/cardreader/src/PaymentComponent.js - Payment Controller → Stripe API: creates intents and tokens
Backend/cardreader/src/main/java/com/payment/cardreader/PaymentController.java