Project Overview

I developed a sophisticated, full-stack serverless application designed to provide a comprehensive and real-time view of financial portfolios. The platform integrates portfolio tracking, market data analysis, and risk management into a unified and intuitive dashboard. It is built to empower investment firms and financial professionals with the tools they need to make data-driven decisions, monitor performance, and manage risk effectively.

The Challenge

In the fast-paced world of financial markets, professionals face several challenges:

  • Fragmented Data: Portfolio data, market information, and risk metrics are often spread across multiple, disparate systems, making it difficult to get a holistic view.
  • Lack of Real-Time Insights: The inability to access real-time data can lead to missed opportunities and delayed responses to market changes.
  • Complex Risk Management: Assessing portfolio risk, including correlations, standard deviation, and delta, is a complex and often manual process.
  • Scalability and Maintenance: Traditional monolithic applications can be difficult to scale and maintain, especially with growing data volumes and user demands.

My Role

As the lead Full-Stack Engineer on this project, my responsibilities included:

  • Architecting and developing the entire serverless infrastructure using AWS CDK and the Serverless Stack (SST) framework.
  • Building a robust and scalable backend API with NestJS, handling everything from user authentication to complex financial data processing.
  • Creating a dynamic and feature-rich frontend dashboard with Next.js, Ant Design, and Recharts to provide an intuitive user experience.
  • Designing and implementing the PostgreSQL database schema and writing migrations to support the application’s data requirements.
  • Setting up CI/CD pipelines with GitHub Actions for automated testing and deployment to both staging and production environments on AWS.

Technical Solution

Frontend Dashboard (Next.js)

I built a comprehensive and responsive frontend using Next.js, providing users with a suite of powerful tools for financial analysis:

  • CEO Dashboard: An overview of portfolio performance, including profit and loss charts, top contributors and detractors, and key valuation metrics.
  • Risk Manager: A dedicated section for risk analysis, featuring visualizations for standard deviation, delta, and asset correlation.
  • Market Data: Real-time market data visualization with interactive charts and the ability to pin and track specific tokens.
  • Reconciliation Tools: A user-friendly interface for reconciling transaction records and managing data discrepancies.
  • Authentication: Secure, token-based authentication with role-based access control to protect sensitive financial data.

Backend Services (NestJS)

The backend is a collection of microservices built with NestJS, providing a scalable and maintainable API:

  • Portfolio Management: A suite of services for tracking portfolio transfers, daily valuations, and on-chain account transactions.
  • Data Ingestion: Services for fetching and processing data from various sources, including CoinMarketCap, CoinGecko, and other financial data providers.
  • Risk Analysis: Endpoints for calculating and retrieving complex risk metrics, such as portfolio standard deviation and asset correlation.
  • User and Auth Management: A robust system for managing users, roles, and authentication using JWT.

Infrastructure (Serverless Stack & AWS CDK)

The entire application is built on a serverless architecture, defined as code using SST and AWS CDK:

  • Scalable and Cost-Effective: The serverless design ensures that the application can handle fluctuating workloads while minimizing operational costs.
  • Infrastructure as Code: The use of AWS CDK and SST allows for repeatable and reliable deployments across multiple environments.
  • Managed Services: The platform leverages a range of AWS services, including Amazon RDS for the PostgreSQL database and Amazon ECS for running backend services, reducing the operational overhead.

Technologies Used

  • Frontend: Next.js, TypeScript, Ant Design, React Query, Recharts
  • Backend: NestJS, TypeScript, PostgreSQL, Kysely (SQL query builder)
  • Infrastructure: AWS, Serverless Stack (SST), AWS CDK
  • Authentication: JWT, Passport.js
  • CI/CD: GitHub Actions

Results and Impact

The platform successfully addresses the core challenges of financial portfolio management by delivering:

  • A Unified Platform: Providing a single source of truth for portfolio, market, and risk data.
  • Real-Time Insights: Empowering users with up-to-date information for better decision-making.
  • Enhanced Risk Management: Offering sophisticated tools for analyzing and managing portfolio risk.
  • Scalability and Reliability: A serverless architecture that is both scalable and cost-effective.

Lessons Learned

This project underscored the following key takeaways:

  1. The Power of Serverless: Building with a serverless-first approach significantly reduces operational complexity and allows for a focus on delivering business value.
  2. Infrastructure as Code is Essential: For complex applications, IaC is crucial for maintaining consistency and reliability across environments.
  3. Data Visualization is Key: In financial applications, the ability to present complex data in an intuitive and accessible way is paramount for user adoption and effective decision-making.