Analytics Site v1
A site that helped day traders analyze their trading performance.
Demo
- No longer hosted online
Services
- Data service - access market data and a variety of technical indicators visualized in super fast WebAssembly-powered charts
- Journal service - upload a .csv file with transaction data from one’s brokerage and see a variety of analytics, charts, and reports about one’s trading performance
Development
- I designed and deployed the entire architecture and wrote all of the code
- Recently, ChatGPT has become a contributor to the project, but I’m the only human contributor :)
Architecture Diagrams
Frontend
Backend (serverful)
Backend (serverless)
Auth
Productization
Payments-ready architecture
The site is currently offered as a free private beta, but was built with a ready-to-use payments integration for Stripe. Details:
- Stripe’s payments WebSocket connects to AWS EventBridge and sends an event when a new subscription payment succeeds.
- EventBridge calls a Lambda function which makes an API call to AWS Cognito with instructions to update the claims in a user’s JWT.
- For example, the setting ‘custom:JournalSubscription’ can be set to a unix timestamp around the start of the following month
- JWT claims are already in use across the site to validate user requests
Sessions
- Sessions are not currently used - requests are validated using JWTs. Two options are available for future use:
- Establish sessions during the existing login flow using Cognito or a different auth provider (e.g. Auth0)
- Use the site’s existing JWTs as authentication tokens. The JWTs are revokable, so their realtime validity can be checked against the Cognito service at the start of any session
- The site’s JWTs (refresh, access, and id tokens) are revokable both server-side via the Cognito service console and CLI and client-side via the settings menu
Security & Legal
- Account security via Secure Remote Password (SRP) Protocol and Multi-Factor Authentication (MFA) via TOTP (Time-based One-Time Password) Apps
- Terms of Service, Privacy Statement, Cookies Policy
- Clickwrap with audit trail for policy agreements
Tech Stack
- Front-end
- React + CloudFront CDN
- MUI + Create React App
- Back-end
- Node + Docker + Elastic Container Service (ECS) + Application Load Balancer (ALB)
- Lambda serverless functions
- Database
- DevOps
- GitHub + CodePipeline + CodeArtifact + CodeBuild + CodeDeploy + Elastic Container Registry (ECR)
- Auth
- Cognito for OAuth 2.0
- Other