Ingests, analyzes, and aggregates transaction data from various financial sources so I don't have to.
I need to collect statements from various places where API access (like Plaid) is not easily available. However, all this information still needs to be itemized and logged on a monthly basis.
Finance
allows me to upload different kinds of statements and use OCR & ChatGPT to extract data from them. Then, I can record all my expenses and invoices to make sure I don't overspend.
- Apple Card
- Amex
- CitiBank
- Wells Fargo
- Apple Savings
- AWS
- NextJS + Typescript + Kysely
- Postgres
- GPT-4
The following environment variables must be configured in the Next.JS app:
OPENAI_API_KEY
AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY
POSTGRES_CONN_URL
The IAM user configured with those credentials must have access to S3 and Textract.
Artifacts uploaded through the dashboard are stored in an S3 bucket. The bucket is hardcoded to finance-uploads-592951731404
.
Here's how the frontend works:
- Frontend makes a POST request to
/api/upload
, the bodies are described below:
export type UploadRequest = {
name: string;
};
export type UrlResponse = {
name: string;
key: string;
bucket: string;
getUrl: string;
uploadUrl: string;
expires: number;
};
- Uploads artifact to S3 bucket using the returned presigned urls
- Makes POST request to
/api/extract
with the following bodies:
export type ExtractRequest = {
file: UrlResponse;
type: StatementType;
};
export type ExpenseResponse = {
spending: number;
transactions: FormattedExpense[];
};
[
{
"AllowedHeaders": ["*"],
"AllowedMethods": ["GET", "PUT", "POST"],
"AllowedOrigins": ["*"],
"ExposeHeaders": []
}
]