I built QianBao, an investment portfolio tracker, without writing a single line of code myself. Using AI-powered development, I created a full-stack application in less than a week.

The problem
I was tracking my portfolio in Google Sheets, using Google Finance to get updated prices. While it worked for basic tracking, I found myself missing crucial historical data and performance metrics. I needed a solution that was able to show historical performance, capable of tracking various asset types, privacy-focused and open-source.
Existing solutions like Ghostfolio and PortfolioPerformance didn't quite fit the needs. MaybeFinance's promised open-source version seemed promising, but is still in the works after 10 months. So, I decided to develop it myself, underestimating the scope of it.
The solution
I set myself a challenge: could I create a full-stack app using only AI, without writing any code myself? This was an experiment on AI capabilities as much as it was about pushing myself more into product management and less into software development.
Tech stack:
- Next.js (for familiarity and easy integration with shadcn/ui)
- MongoDB (for flexibility)
- Cursor IDE (VS Code-like editor with AI capabilities)
- Claude 3.5 Sonnet (as the AI model)
- AlphaVantage (live asset prices through simple API)
The development process
Starting with a create-next-app template and shadcn/ui components for the frontend. I wanted to use v0.dev but found it to be redundant. The entire development process took less than 7 full days, working a few hours at a time during nights and weekends.
Database schema
The first major task was designing the database schema. This required the most specific prompts to the AI, as getting the data structure right was crucial for the app's functionality. I ended up with four collections in MongoDB: users, transactions, assets, and portfolios.

Key features
QianBao allows users to:
- Input transactions (specifying asset, amount, and date)
- Track prices for various asset types (stocks, ETFs, crypto, and custom assets)
- View portfolio progress over time via a line chart
- See asset distribution via a pie chart
- Track profit and loss, realized and unrealized
- Show annualized returns for investments
The AI advantage
Using AI for development offered some benefits. Not only was implementation faster, even for complex logic, but I also found that I didn't need deep focus time as much. The AI handled context seamlessly, allowing me to leave implementations mid-way and continue later without losing track. However, knowing how to code still helped a lot, it was useful to prevent mistakes, write accurate prompts, and understand the implications of the AI's suggestions to debug.
Prompting for success
I found that including the following in almost all prompts yielded better results:
Try to re-use already existing code, endpoints and APIs that we have. Don't be lazy an re-read all the relevant code files, as there have been changes.
Remember our focus should be to make it the most simple possible, be VERY detailed and avoid mistakes thinking step by step.
I spent an average of 15-20 minutes writing prompts for new features. Detailed prompts led to better code and fewer iterations, saving time in the long run.
The FIFO challenge
Implementing the sell transaction logic using the FIFO method was the most challenging feature. The main issue was my own lack of clarity on the approach. I was mixing FIFO and average buy-in price approaches, and being unsure about the implementation, I couldn't explain it properly to the AI.
To solve this, I used AI to help me write the prompt, separating the implementation in different phases and requesting it to explain the feature to me and itself. This delivered a more specific and detailed prompt.
now we need to implement a new feature in the app. Let's remember that currently the user has the ability to add "buy" transactions and see their portfolio with live prices and aggregated charts of total wealth.
currently the app uses mongodb and has 4 different collections:
users: basic structure with user name, email and password
{
"userId": uuid,
"name": "Eric",
"email": "email@example.com",
"password": "...."
}
assets: document where we store asset historical price
{
"symbol": "META",
"lastRefreshed": "2024-09-06",
"prices": {
"2024-09-06": "4.6800",
"2024-09-05": "4.6900",
"2024-09-04": "4.6600",
"2024-09-03": "4.6200",
"2024-08-30": "4.5200"
}
}
transactions: document with all the transaction data user inputs
{
"symbol": "META",
"date": "2022-11-04",
"shares": 2,
"totalPaid": 180,
"userID": uuid,
"operation": "buy"
}
portfolios: document that includes the summary of what user currently has invested
{
"userId": uuid,
"assets": {
"META": {
"shares": 4,
"totalPaid": 1110,
"paidPerShare": 277.5
}
},
"lastRefreshed": {
"$date": {
"$numberLong": "1726344272599"
}
}
}
Up until here, everything good. Now we want to do a new feature where user can add sell transactions. This should use FIFO method, where the app should check for oldest transaction of that asset to get the price of which it was purchased and calculate the profit/loss.
For example, if a user bought 1 share of META 1 year ago at 100$, 1 share of META 0.5 years ago at 150$, 1 share of META 0.3 years ago at 200$, and 1 share of META yesterday at 250$. Today META is at 300$ which means user portfolio is valued at 1200$.
Then if user inputs a sell transaction of 2 shares of META with totalReceived 600$, we need to retrieve the buy transactions to look up the purchase value and the profit of the portfolio.
In this example, the first share was bought at 100$ and sold at 300$ which means 200$ of benefit. The second share was bought at 150$ and sold at 300$, which means a 150$ benefit. Total profit of the inputed sell transaction is 200+150=350$.
In a technical manner, the app should add the "sell" transaction and do this calculation to add the "p&l". It should also update the "buy" transactions that were used to add some counter of how many shares have been already sold.
It should then also update the "portfolios" document to adjust the shares, totalPaid, totalEarned and paidPerShare after that transaction.
Before the sell transaction the db "transactions" documents should be:
{
"symbol": "META",
"date": "2023-09-17",
"shares": 1,
"totalPaid": 100,
"userId": uuid,
"operation": "buy"
},{
"symbol": "META",
"date": "2024-03-17",
"shares": 1,
"totalPaid": 150,
"userId": uuid,
"operation": "buy"
},{
"symbol": "META",
"date": "2024-05-17",
"shares": 1,
"totalPaid": 200,
"userId": uuid,
"operation": "buy"
},{
"symbol": "META",
"date": "2024-09-16",
"shares": 1,
"totalPaid": 250,
"userId": uuid,
"operation": "buy"
}
Before the sell transaction the db "portfolios" documents should be:
{
"userId": uuid,
"assets": {
"META": {
"shares": 4,
"totalPaid": 700,
"paidPerShare": 175
}
},
"lastRefreshed": {
"$date": {
"$numberLong": "1726344272599"
}
}
}
Then, after the sell transaction the db "transactions" documents should be:
{
"symbol": "META",
"date": "2023-09-17",
"shares": 1,
"totalPaid": 100,
"userId": uuid,
"operation": "buy"
},{
"symbol": "META",
"date": "2024-03-17",
"shares": 1,
"totalPaid": 150,
"userId": uuid,
"operation": "buy"
},{
"symbol": "META",
"date": "2024-05-17",
"shares": 1,
"totalPaid": 200,
"userId": uuid,
"operation": "buy"
},{
"symbol": "META",
"date": "2024-09-16",
"shares": 1,
"totalPaid": 250,
"userId": uuid,
"operation": "buy"
},{
"symbol": "META",
"date": "2024-09-17",
"shares": 2,
"totalReceived": 600,
"userId": uuid,
"operation": "sell",
"p&l":350
}
And after the sell transaction the db "portfolios" documents should be:
{
"userId": uuid,
"assets": {
"META": {
"shares": 2,
"totalPaid": 450,
"paidPerShare": 225
}
},
"lastRefreshed": {
"$date": {
"$numberLong": "1726344272599"
}
}
}
Observe with a lot of attention how all the calculations were made and the new documents structure. Be very detailed and provide a detailed step by step guide on how to implement the "sell" transaction feature. You have access to the entire codebase, don't be lazy and re-read all the relevant files as they have had lots of changes.
It is ok if you need multiple phases, it is better to improve step by step than not trying to do it all at once and fail. But then all the phases steps have to be stated the first thing to help next phases.
Remember our focus should be to make it the most simple possible, be VERY detailed and avoid mistakes.
This meta-prompting approach helped break down complex problems into manageable steps, leading to more accurate and efficient code generation.
What's next?
QianBao is now functional and open-source. All data is encrypted and securely distributed, but no need to trust me – trust the code or deploy it yourself on your own server.
I probably won't continue developing this project. The goal was to create a simple, privacy-first investment tracker, and it already achieves that. To maintain simplicity, I don't want to overfill it with features. For a more feature-rich alternative, check out getquin (which I discovered after starting QianBao, but it's not open-source).
This project isn't ideal from a business perspective. It's in a saturated market with big players (brokers, exchanges, banks) spending heavily on ads to capture investor leads. QianBao was a passion project to cover a personal need, learn AI-only development, and gain speed in shipping projects.
Maintenance costs are near zero, but growth is another story. If you're interested in trying QianBao, check it out here: qianbao.finance
Feedback is very welcomed! Feel free to message me or create a pull request :)
