# Node SQLite uploads receipt box

A receipt box keeps each uploaded image with its merchant, amount, category, and purchase date, then totals the selected month. Tokay runs it as one Web Service and preserves both the SQLite records and image files.

This shape works well when your app naturally treats a small database and local uploads as one unit. You can keep that simple layout while Tokay gives the directory a durable home.

## Facts

- Runtime: Node.js
- Framework: Express
- Service types: Web Service
- Resources: SQLite, Persistent files
- Required secrets: None

## What it does

The page begins with two sample receipts and shows their combined amount for the current month.

Use **Add a receipt** to save a merchant, amount, category, date, and JPEG, PNG, or WebP image. The new card links to the full upload.

Choose another month and press **Show month** to see only that period's receipts and total.

## Deploy it

Bring this folder to Tokay any way you like. Paste or upload it in the dashboard, push it with git, or hand it to your AI agent along with [our agent instructions](https://app.tokay.io/llms.txt). Tokay figures out the rest.

Working in Claude, ChatGPT, VS Code, or another MCP client? Connect the [Tokay MCP server](https://tokay.io/docs/platform-mcp) and ask your agent to deploy this example. It signs in through your browser, so there is no token to paste.

New to Tokay? The [getting started guide](https://tokay.io/getting-started) walks you through your first deploy.

## Try it

1. Add a receipt with your own image and open its thumbnail at full size.
2. Note the monthly total, then deploy the same code again.
3. Return to that month. The record, total, and uploaded image remain together.

The two sample receipt illustrations are original assets dedicated to CC0 1.0 Universal.

## How it works

You can follow the data without crossing systems. SQLite records what you bought, and the uploads directory keeps the matching image under the same persistent root.

The server checks file type and enforces a 3 MB limit before saving an upload. Tokay replicates the resulting data beyond the app and takes periodic offsite snapshots. Read [Files and persistent storage](https://tokay.io/docs/persistent-storage) for details.

## Secrets

There are no secrets to add. SQLite and the uploaded images use Tokay's persistent storage.

## Grow from here

Try the [Prisma migrations walkthrough](/examples/node-prisma-migrations-walkthrough) when you want PostgreSQL and reviewed schema changes.

## Source files

- [package.json](https://tokay.io/examples/src/node-sqlite-uploads-receipt-box/package.json)
- [src/assets/market-receipt.svg](https://tokay.io/examples/src/node-sqlite-uploads-receipt-box/src/assets/market-receipt.svg)
- [src/assets/transit-receipt.svg](https://tokay.io/examples/src/node-sqlite-uploads-receipt-box/src/assets/transit-receipt.svg)
- [src/server.ts](https://tokay.io/examples/src/node-sqlite-uploads-receipt-box/src/server.ts)
- [tsconfig.json](https://tokay.io/examples/src/node-sqlite-uploads-receipt-box/tsconfig.json)

## Download and source

- [Download the complete project](https://tokay.io/examples/downloads/node-sqlite-uploads-receipt-box.zip)
- Last updated: 2026-07-31
- Example revision: `52c7b7f`
- [View this revision on GitHub](https://github.com/tokayio/tokay-examples/tree/52c7b7ffd52e157375b08f1f11ff4fbe6c498642/node-sqlite-uploads-receipt-box)
- [Deploy an app that uses SQLite](https://tokay.io/use-cases/deploy-app-with-sqlite)
