Loading
Back to Projects

SecureInvest

Full-Stack Investment Platform

Project Overview

SecureInvest is a full-stack investment portfolio management platform built with ASP.NET Core, React, and a native SwiftUI iOS companion app. It enables users to track bonds, ETFs, shares, and mutual funds with real-time market pricing, cash flow analysis, profit/loss tracking, AI-powered portfolio insights, and automated email notifications. The platform features a comprehensive admin panel for user management, instrument CRUD operations, bulk ISIN price uploads, automated Excel portfolio exports, forgot/reset password flows, and many more options.

secureinvestbg.com

The Challenge

Building a production-grade investment platform that spans three distinct surfaces — a web dashboard, a mobile app, and a merchant-facing payment system. The core challenge was architecting a unified backend API that serves both the React SPA and the iOS app while maintaining robust JWT authentication, role-based access control (admin/user), account lifecycle management (pending/active/deactivated), and secure handling of sensitive financial data. Additionally, integrating an AI assistant with real-time tool calling capabilities to let users query portfolio metrics conversationally.

How It Was Built

  • ASP.NET Core backend with Entity Framework + SQL Server
  • React 19 SPA with Vite and React Router v7
  • Native SwiftUI iOS app with Keychain auth
  • OpenAI-powered AI assistant with tool-calling architecture
  • JWT authentication with role-based access control
  • Merchant Dashboard with Redux Toolkit, Radix UI, i18n
  • Automated Excel portfolio export with full cash flow history
  • Automated transactional email service for password resets and account lifecycle
  • Bulk ISIN market price upload via XLSX with background job processing

Platform Architecture

Backend API

ASP.NET Core REST API with 15+ controllers covering auth, admin operations, bonds, ETFs, shares, funds, cash flows, payments, AI chat, ISIN price uploads, and account management. AutoMapper for DTO transformation, Swagger documentation, and CORS configured for production domains.

Web Dashboard

React 19 SPA with portfolio overview, per-instrument detail pages (bonds, ETFs, shares, funds), cash flow visualizations, payment tracking, admin control center, and AI assistant widget. Full Excel export with optional cash flow history.

iOS Mobile App

Native SwiftUI application with Keychain-based secure session management, portfolio browsing, admin user management, instrument CRUD with cash flows and payments, ISIN price file upload, and account management. Shares the same ASP.NET backend via REST API.

Key Features

Multi-Instrument Portfolio

Full lifecycle management for bonds (with YTM, coupon tracking, clean/dirty pricing), ETFs, shares, and mutual funds. Each instrument tracks nominal, buy/sell prices, market prices, profit/loss, fees, dividends, and settlement dates across multiple currencies with automatic EUR conversion.

Cash Flow & Payment Tracking

Comprehensive cash flow engine tracking interim and principal cash flows, cumulative positions, real cash flows, and variances. Payment management with profit and tax allocation per bond. Full exportable history to Excel.

AI-Powered Assistant

Integrated AI agent powered by OpenAI with tool-calling capabilities — can summarize portfolio, list bonds and upcoming payments, analyze cash flows, suggest rebalancing, and export reports. Context-aware with user-specific data and language preference.

Admin Control Center

Full user lifecycle management with three-tier account status (Pending, Active, Deactivated). Admins can create/edit/delete users, manage any user's instruments and cash flows, bulk-upload ISIN market prices via XLSX, reset passwords, and view account status history.

Email Notifications

Automated transactional emails — password reset links, welcome messages with temporary passwords, account preparation notifications, and account restoration emails. Fully localized with HTML-formatted templates.

Plus many more features — account status history tracking, forgot/reset password flows, multi-currency EUR conversion, client profile management, bonds with YTM and coupon tracking, instrument expiration flags, settlement date tracking, and an extensible AI tool-calling architecture.

Technical Highlights

Backend Architecture

  • ASP.NET Core with Entity Framework + SQL Server
  • JWT Bearer authentication with role-based policies
  • Repository pattern with 18+ specialized repositories
  • Account status validation middleware
  • AutoMapper for entity-to-DTO mapping
  • Swagger/OpenAPI documentation
  • Transactional email integration (password reset, welcome, account notifications)

AI Integration

  • OpenAI LLM with custom system prompt
  • Tool-calling architecture (7 tools: portfolio summary, bonds, payments, cash flows, bond details, rebalancing suggestions, report export)
  • Context-aware with per-user portfolio data
  • Multi-language support via user language detection

Data & Export

  • Multi-currency support with real-time EUR conversion
  • Bulk ISIN market price upload via XLSX with background job processing
  • Full portfolio Excel export with optional cash flow history
  • Database migrations on startup with error handling
  • Forgot/reset password flow with secure token generation

iOS Mobile App

  • SwiftUI with @Observable state management
  • Keychain-based secure credential storage
  • Flexible JSON decoding with lossy doubles and alternate ISIN key formats
  • Admin dashboard with user stats, management, cash flows, and ISIN upload

Native iOS App

A native SwiftUI mobile application is still in active development by me, but already exists and is fully working for the time being. It shares the same ASP.NET Core backend, providing portfolio browsing, admin management, and instrument CRUD capabilities on the go via a comprehensive REST API client.

View the platform!

Thanks for viewing the SecureInvest project!