Engineered a High-Integrity Paper Trading & Portfolio Engine (Node.js, Express & PostgreSQL/Prisma)
Project Overview:
I built a full-fledged mock trading and portfolio management backend designed to handle real-world financial transaction logic. The core focus here wasn't just basic CRUD, but ensuring bulletproof data integrity, atomic trade executions, and dynamic portfolio tracking.
The Problem & Architecture:
In financial apps, handling concurrent balance deductions and asset allocations can lead to race conditions or data mismatches if not handled properly. I designed this system with database-level constraints and atomic transaction rollbacks using Prisma ORM with PostgreSQL.
What I Built & Implemented:
Atomic Buy/Sell Execution Engine:
Trade operations are wrapped inside database transactions ($transaction). When a user buys an asset, the wallet deduction, transaction logging, and weighted average price (avgPrice) holding updates happen as a single atomic unit. If anything fails, it rolls back cleanly.
Live Portfolio & PnL Engine:
Built a centralized portfolio summarizer that calculates real-time holding valuations, total invested capital, unrealized profit/loss, and total net worth dynamically based on live asset prices.
Secure Authentication & Access Control:
Implemented stateless JWT-based authentication with bcrypt password hashing to secure trading routes and ensure user-specific asset privacy.
Notification & Activity Stream:
Created an integrated notification system that triggers real-time alerts whenever trades execute, keeping the user updated on balance credits/debits.
Database Design & Indexing:
PostgreSQL schema optimized with compound unique indexes (e.g., userId_assetName) to prevent duplicate holding records and ensure lightning-fast lookups.
Escape – Seamless Hotel & Travel Booking Experience
Escape is a modern mobile experience designed to make hotel discovery and booking completely frictionless. The design balances clean minimalism with intuitive user flows—featuring smart search filters, visual destination...
Huge congratulations on hitting the $10k milestone! 🚀 Truly inspiring to see what’s possible on Contra.
I joined Contra just about a month ago as a full-stack developer. I’ve set up my services and published a few case studies, but I'm constantly learning how to optimize my presence here.
If you could look back at your early days, what’s the #1 thing you did that moved the needle for your profile visibility and landing initial inbound clients?
I joined Contra a while ago without really knowing what to expect, and it’s been really nice to see it gradually become a place where I’ve met great clients and worked on projects I genuinely love.