Analytics Site v1

A full-stack project that helped day traders analyze their trading performance
Projects
Full Stack
Code
Author

Aaron Carver

Published

January 2023

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

frontend diagram

frontend diagram

Backend (serverful)

backend diagram

backend diagram

Backend (serverless)

backend serverless diagram

backend serverless diagram

Auth

auth diagram

auth diagram

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:

      1. Stripe’s payments WebSocket connects to AWS EventBridge and sends an event when a new subscription payment succeeds.
      1. 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
      1. 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:
      1. Establish sessions during the existing login flow using Cognito or a different auth provider (e.g. Auth0)
      1. 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

Tech Stack