How teamc-swarchqua/cococash works
CocoCash is a digital wallet with a web interface, Cognito authentication, wallet operations, transaction history, and PDF reporting. The principal workflow is a signed-in user loading a wallet, depositing funds or initiating a transfer, and viewing balance/history; the wallet service persists account and transfer state and publishes domain events. The README documents AWS transaction-audit and report-processing capabilities whose detailed wiring is not shown. Edges for those unsampled integrations are omitted or marked unverified rather than inferred from filenames.
Main entry points: App.jsx Web application · transfer.service.ts Transfer operations · account.repository.ts Account repository · api.js Wallet API client
Components 28
Web wallet
- Web application
cococash-wfe/src/App.jsx - Wallet context
cococash-wfe/src/context/WalletContext.jsx - Wallet API client
cococash-wfe/src/services/api.js - Wallet screens
cococash-wfe/src/pages/Certificates.jsx
Identity
- Auth context
cococash-wfe/src/context/AuthContext.jsx - Cognito client
cococash-wfe/src/services/cognito.js - Amazon Cognito
- JWT middleware
cococash-wallet-ms/src/middleware/cognito.middleware.ts
Wallet service
- Account routes
cococash-wallet-ms/src/controllers/account.controller.ts - Transfer routes
cococash-wallet-ms/src/controllers/transfer.controller.ts - Account operations
cococash-wallet-ms/src/services/account.service.ts - Transfer operations
cococash-wallet-ms/src/services/transfer.service.ts - Account repository
cococash-wallet-ms/src/repositories/account.repository.ts - Transfer repository
cococash-wallet-ms/src/repositories/transfer.repository.ts - Account model
cococash-wallet-ms/src/models/account.model.ts - Transfer model
cococash-wallet-ms/src/models/transfer.model.ts - PostgreSQL
- Event publisher
cococash-wallet-ms/src/events/publishers/transfer.publisher.ts - Amazon SNS
Transaction history
- Transaction service
cococash-transaction-ms/main.go - History handlers
cococash-transaction-ms/handler.go - History repository
cococash-transaction-ms/repository.go - Amazon DynamoDB
Reports and utilities
- Report consumer
cococash-transaction-ms/report_consumer.go - PDF generator
cococash-pdf-maker/main.go - Account utility
cococash-get-accounts/main.go - Link generator
cococash-link-generator/main.go
Other components
- Wallet user
Connections 26
- Wallet user → Web application: uses
- Web application → Auth context: provides auth
cococash-wfe/src/App.jsx - Web application → Wallet context: provides wallet
cococash-wfe/src/App.jsx - Web application → Wallet screens: routes to
cococash-wfe/src/App.jsx - Auth context → Cognito client: calls
cococash-wfe/src/context/AuthContext.jsx - Cognito client → Amazon Cognito: authenticates
- Wallet context → Wallet API client: requests
cococash-wfe/src/context/WalletContext.jsx - Wallet API client → Account routes: calls API
- Wallet API client → Transfer routes: calls API
- Account routes → Account operations: delegates
cococash-wallet-ms/src/controllers/account.controller.ts - Transfer routes → Transfer operations: delegates
cococash-wallet-ms/src/controllers/transfer.controller.ts - Transfer routes → JWT middleware: requires JWT
cococash-wallet-ms/src/controllers/transfer.controller.ts - Account operations → Account repository: reads/writes
cococash-wallet-ms/src/services/account.service.ts - Transfer operations → Account repository: reads/writes
cococash-wallet-ms/src/services/transfer.service.ts - Transfer operations → Transfer repository: reads/writes
cococash-wallet-ms/src/services/transfer.service.ts - Account repository → Account model: maps records
cococash-wallet-ms/src/repositories/account.repository.ts - Transfer repository → Transfer model: uses model
cococash-wallet-ms/src/repositories/transfer.repository.ts - Account repository → PostgreSQL: queries
- Transfer repository → PostgreSQL: queries
- Account operations → Event publisher: publishes events
cococash-wallet-ms/src/services/account.service.ts - Transfer operations → Event publisher: publishes events
cococash-wallet-ms/src/services/transfer.service.ts - Event publisher → Amazon SNS: publishes
cococash-wallet-ms/src/events/publishers/transfer.publisher.ts - Transaction service → History handlers: routes
- History handlers → History repository: uses
- History repository → Amazon DynamoDB: persists history
- Report consumer → PDF generator: dispatches reports