Side project
Investment Data Service
An internal research app for watchlists, prices, signals, AI reports, and paper portfolios. Python jobs collect and analyze data; the native iOS app reads the API. The public web screens are closed.
Process
- Plan
A research tool for my own watchlists and signals.
- Design
Python collection and a Next.js API on one database.
- Build
Collectors, scoring, signals, and a SwiftUI app.
- Ship
New commits must pass pytest in a temporary checkout before reaching the bot server; the API deploys on merge.
- Improve
Jobs defined in the database, with run history and failure alerts.
Overview
An internal iOS research app for watchlists, prices, signals, AI reports, and paper portfolios. Python jobs collect and analyze data; Next.js provides APIs and authentication. Public web screens are closed.
Why I built it
The aim was to connect a Python collection and scoring batch to a Next.js layer on the same MySQL schema, and to draw a clear line between the data and the charts and tables.
The web app serves pages and APIs. iOS reads those APIs natively. Some jobs run on node-cron in the web app. Heavy collection stays in Python.
System
Next.js provides API routes and authentication; public web screens are closed. Prisma and MySQL hold the shared data.
iOS: SwiftUI. Watchlists, rebalance, prices, and crypto pairs hit the same API. Push is APNs.
Batch: symbol master, daily prices, quant scores, disclosures, range signals, forecasts, exchange candles. They share a database helper.
Mail and SMS go through AWS SES and NCloud SENS.
See this in the system diagram
Architecture and data
Jobs pull external prices and update symbols, daily prices, quant scores, indices, disclosures, and news. The web app and iOS only read that database.
Accounts hold watchlists, strategies, holdings, paper trades, and alerts. Undervalued names and sharp movers on the dashboard come from one API that mixes quant scores and daily prices. Crypto-pair accumulation and rebalance live in the same app.
Auth
NextAuth sessions and middleware split public and protected routes. Passwords are one-way hashes. Reset tokens are single-use and expiring. Sensitive fields are encrypted in the app, and keys stay in the environment. iOS hands off web OAuth.
Batch and monitoring
Collection loads the symbol list (KOSPI, KOSDAQ, ETF) and daily prices. Scoring, disclosure polling, range signals, and portfolio picks sit on top.
The web app registers jobs, runs them by hand, and shows history. node-cron reads job definitions from MySQL. Failure alerts use the same path.
Stack
Web: Next.js 16, React 19, Tailwind CSS 4, Prisma 6, MySQL, NextAuth 5, Radix, Recharts, lightweight-charts.
App: SwiftUI, APNs.
Bot: Python, pymysql.
Notes
Hard parts: when an external price page changed shape, the collector and its retry and backoff had to change with it. Python jobs, node-cron, and the site share MySQL, so locks, run order, and idempotency took time. Time-series APIs needed tuning between pagination and latency.
What held: collection and read screens share one schema. Jobs live in database metadata, so the ops UI and the runner meet on one path. Web and iOS run internally, with no public store listing.