MyReceipt Mini App (a.k.a. NOTA Mini App) is an experimental Mini App for the Base app and Farcaster, built by Prof. NOTA as a sandbox for playful and reflective onchain experiences.
It takes the NOTA concept and turns it into:
“Your onchain receipt of today.”
The current default experience is a simple “NOTA fortune” flow:
- A user opens the Mini App inside the Base app or a Farcaster client.
- The Mini App reads MiniKit context (including
displayName/username). - The app generates a short “NOTA of the day” line from a curated template list.
- That line is rendered as a visual receipt card (1074×1474 canvas) — a “living receipt” of the moment.
- The user can:
- Get another receipt,
- Download the receipt image,
- Create a cast on Farcaster,
- Save / pin the Mini App.
This repository is intentionally small and opinionated so that it can serve as a playground for NOTA / MyReceipt flows maintained by Prof. NOTA and Prof. NOTA Inc.:
- Personalised NOTA content,
- Per-user receipt history,
- Eventual onchain integrations on Base (minting, stamping, proofs).
- Next.js 15 (App Router,
app/directory) with TypeScript - OnchainKit / MiniKit from Coinbase:
OnchainKitProvideras the root provider (Base chain)SafeArea,useMiniKit,useComposeCast,useAddFramefor Mini App integration
- Farcaster Mini App manifest:
minikit.config.ts+app/.well-known/farcaster.json/route.ts
- Farcaster Mini App SDK / MiniKit runtime for running in Farcaster clients & Base app
next/og:/api/receiptfor generating image-based receipts
@farcaster/quick-auth:/api/authto verify Farcaster JWTs when needed
- Styling:
- CSS Modules + global styles (
app/globals.css) - Component-scoped CSS modules co-located with key components
- CSS Modules + global styles (
The app is structured so that:
- Pages (in
app/) are thin and mostly compose hooks + components. - Components (in
app/components/andapp/success/components/) handle UI only. - Hooks (in
app/hooks/) encapsulate behaviour and side effects. - Lib modules (in
app/lib/+app/receiptTemplates.ts) handle environment, share text, templates, and canvas rendering. - CSS is split between:
- Page-level layout modules, and
- Component-scoped modules for visual details.
All routes use the App Router.
-
app/layout.tsx
Root layout:- Wraps the tree with
RootProvider(OnchainKitProviderfor Base + MiniKit). - Includes
SafeAreato render correctly inside host Mini App frames.
- Wraps the tree with
-
app/page.tsx— Home / Main MyReceipt Experience
Thin page component that:- Derives
displayName/ avatar from MiniKit context. - Marks the Mini App frame as ready.
- Wires:
useReceiptContent— receipt text + image state.useMiniAppActions— share / tips / pin / open handlers.
- Renders:
<AppShell><ReceiptCard><ReceiptEditor><ActionsBar>
- Derives
-
app/open/page.tsx— Open / Viewer- Uses an inner client component with
useSearchParams()to read?text=...&name=.... - Uses
useReceiptOpen(text, name)to:- Render the receipt image from text via the canvas helper.
- Handle copy + download actions.
- Reuses the same visual language as the home page.
- Uses an inner client component with
-
app/success/page.tsx— Success Screen- Uses
useSuccessActions()for:- Close / back behaviour.
- Get / Tips / Pin / Share actions.
- Renders:
<SuccessHero>— avatar + main copy.<SuccessActions>— CTA buttons (built fromIconButton).
- Uses
-
API routes (
app/api/)app/api/webhook/route.ts
Base Mini App webhook (currently logs events, extendable for metrics).app/api/receipt/route.tsx
Image generator for receipts vianext/og(server-side alternative to canvas).app/api/auth/route.ts
Farcaster JWT verification endpoint using@farcaster/quick-auth.
-
Manifest route
app/.well-known/farcaster.json/route.ts
Generates the Farcaster Mini App manifest fromminikit.config.ts.
-
app/AppShell.tsx- Shared layout shell used by pages.
- Renders
<NavBar>and a content wrapper.
-
app/components/NavBar.tsx- Header layout with:
- Title (e.g.
$MyReceipt), - Avatar URL,
- Display name.
- Title (e.g.
- Header layout with:
-
IconButton.tsx- Reusable “icon + label” button shell.
- Used by
ActionsBarandSuccessActionsto keep CTAs consistent.
-
ReceiptCard.tsx- Shows:
- Receipt image (canvas render result).
- Loader / “rendering…” state.
- Fallback when no image yet.
- Receives display text + display name from hooks.
- Shows:
-
ReceiptEditor.tsx- Textarea/editor for the current receipt text.
- Shows text limit + “has changes” state.
- Buttons for:
- Apply / use this text.
- Open as image.
-
ActionsBar.tsx- Footer action bar on the home page.
- Buttons (via
IconButton) for:- Get
- Tips
- Pin
- Share
- Behaviour is provided entirely by
useMiniAppActions.
-
SuccessHero.tsx- Avatar + hero text for the success state.
-
SuccessActions.tsx- Buttons (via
IconButton) for:- Get
- Tips
- Pin
- Share
- Hooks into
useSuccessActions.
- Buttons (via
Hooks centralize all behavioural logic.
-
useReceiptContent.ts- Manages receipt text state and image generation.
- Uses
renderReceiptImagefromapp/lib/receiptCanvas. - Exposes:
- Editor text.
- Applied display text.
- Image data URL.
isRenderingstate.- Handlers for text change / apply / re-render.
-
useMiniAppActions.ts- Encapsulates Mini App actions on the home page:
- Share to cast,
- Tips (open external URL),
- Pin Mini App,
- Open
/openviewer.
- Uses:
getBaseUrl/getTipUrlfromapp/lib/env.- Share text builders from
app/lib/shareText. - MiniKit APIs (
useComposeCast,useAddFrame, etc.).
- Encapsulates Mini App actions on the home page:
-
useReceiptOpen.ts- For the
/openroute. - Given
text+name:- Triggers
renderReceiptImage. - Exposes image data URL + loading state.
- Handles copy + download actions.
- Triggers
- For the
-
useSuccessActions.ts- Success page logic:
- Close / back behaviour.
- Get / Tips / Pin / Share actions.
- Also uses env + shareText helpers and
minikit.config.
- Success page logic:
Located mostly under app/lib/ plus one thin helper at app/receiptTemplates.ts.
-
getBaseUrl()
Derives app base URL fromNEXT_PUBLIC_URL,
falling back tohttps://mini.endhonesa.com. -
getTipUrl()
Derives tip URL fromNEXT_PUBLIC_TIP_URL,
falling back tohttps://warpcast.com/myreceipt.
-
buildShareText(body: string)
Main share/cast text (e.g. “My Receipt of Today…” style). -
buildTipCastText()
Generated text for tip/support casts. -
buildSuccessShareText(miniappName: string)
Text used on the success page when sharing.
Updating copy here changes behaviour across the app without touching components.
-
app/lib/receiptTemplates.data.tsTemplateFntype.RECEIPT_TEMPLATESarray (all receipt templates; data-only).
-
app/receiptTemplates.ts- Thin helper that:
- Re-exports
TemplateFn. - Provides:
generateReceipt(...)getMaxReceiptLength()
- Internally imports
RECEIPT_TEMPLATESfrom.data.ts.
- Re-exports
- Thin helper that:
-
app/lib/receiptCanvas.ts- Handles canvas-based receipt rendering:
- Text wrapping,
- Drawing header/body/footer,
- Generating a PNG data URL.
- Export:
renderReceiptImage(text: string, name: string): Promise<string>
- Handles canvas-based receipt rendering:
minikit.config.ts- Source-of-truth configuration for the Mini App.
- Used by
app/.well-known/farcaster.json/route.tsto emit the manifest consumed by Base and Farcaster.
Styling is intentionally simple and split into:
-
Global styles
app/globals.css
Resets, box-sizing, base typography, global colors, dark-mode preferences.
-
Page-level CSS Modules
app/page.module.css
Layout + shell-level styles for the main page and shared structures.app/success/page.module.css
Layout + typography for the success page shell.
-
Component-scoped CSS Modules
app/components/ReceiptCard.module.cssapp/components/ReceiptCTA.module.cssapp/components/ActionsBar.module.cssapp/success/components/SuccessHero.module.cssapp/success/components/SuccessActions.module.css
Each visual component imports its own .module.css, so if you want to tweak a specific piece, you go straight to:
X.tsx+X.module.css
There is no Tailwind in this project at the moment.
High-level layout of the app (reflecting the current architecture):
app/
layout.tsx
rootProvider.tsx
AppShell.tsx
globals.css
page.tsx
page.module.css
open/
page.tsx
success/
page.tsx
page.module.css
components/
SuccessHero.tsx
SuccessHero.module.css
SuccessActions.tsx
SuccessActions.module.css
components/
NavBar.tsx
IconButton.tsx
ReceiptCard.tsx
ReceiptCard.module.css
ReceiptEditor.tsx
ReceiptCTA.module.css
ActionsBar.tsx
ActionsBar.module.css
hooks/
useReceiptContent.ts
useMiniAppActions.ts
useReceiptOpen.ts
useSuccessActions.ts
lib/
env.ts
shareText.ts
receiptCanvas.ts
receiptTemplates.data.ts
receiptTemplates.ts
api/
webhook/route.ts
receipt/route.tsx
auth/route.ts
.well-known/
farcaster.json/route.ts
minikit.config.ts
public/
-
The user opens MyReceipt inside the Base app or a Farcaster client.
-
app/layout.tsxwraps the tree with:RootProvider(OnchainKitProvider for Base + MiniKit),SafeArea(MiniKit utility for in-frame rendering).
-
app/page.tsx:-
Reads user context via MiniKit hooks (
displayName,username, etc.). -
Generates a NOTA line from
generateReceipt(...). -
Uses
useReceiptContentto manage the text and trigger canvas rendering. -
Converts the canvas output into a
data:URL used byReceiptCard. -
Provides actions via:
useMiniAppActions→ share, tips, pin, open viewer.
-
-
/open:- Reads text + name from query string.
- Uses
useReceiptOpento render, copy, and download the receipt image.
-
/success:- Uses
useSuccessActionsfor the final action set.
- Uses
-
/api/receipt:- Alternative, server-side image generator.
-
/api/webhook:- Receives Base Mini App events for logging/metrics.
To use and extend this project the way it was designed, you’ll eventually want:
- A Base app account
- A Farcaster account
- A Vercel account (for hosting)
- A Coinbase Developer Platform (CDP) API key for OnchainKit / MiniKit
These are not required just to explore the code locally, but are needed if you want to ship the Mini App publicly inside Base and Farcaster.
git clone https://github.com/myreceiptt/nota-mini-app.git
cd nota-mini-appnpm install
# or
pnpm installUse the provided .example.env file as a reference and create a new .env.local file in the project root:
cp .example.env .env.localThen edit .env.local and set the values that apply to you:
NEXT_PUBLIC_PROJECT_NAME="NOTA Mini App"
NEXT_PUBLIC_ONCHAINKIT_API_KEY=<REPLACE_WITH_YOUR_CDP_API_KEY>
NEXT_PUBLIC_URL=-
NEXT_PUBLIC_PROJECT_NAMEHuman-readable project name shown in the UI and/or metadata. -
NEXT_PUBLIC_ONCHAINKIT_API_KEYYour CDP API key used by OnchainKit / MiniKit to talk to Base. -
NEXT_PUBLIC_URLThe public URL of your deployed app (keep this empty while developing locally).
The code may also rely on Vercel-injected environment variables during deployment:
VERCEL_ENVVERCEL_PROJECT_PRODUCTION_URLVERCEL_URL
These are set automatically by Vercel and usually don’t need to be added manually for local development.
npm run dev
# or
pnpm devOpen your browser and go to:
http://localhost:3000
You should see the MyReceipt / NOTA Mini App running in your local environment.
Note: Some MiniKit features that depend on host context (Base app / Farcaster) will only function fully when the app is embedded as a Mini App in a compatible client.
The file minikit.config.ts defines the configuration that is used to generate the Mini App manifest at:
app/.well-known/farcaster.json
This manifest is read by both Farcaster and the Base app to understand:
- The name and description of your Mini App
- Icons and images to use
- How to display the Mini App as an embed and as a launchable action
- Webhook configuration (e.g.
webhookUrlpointing to/api/webhook)
To personalise your NOTA / MyReceipt Mini App:
-
Open
minikit.config.ts. -
Update fields such as:
name,subtitle,description,tags,- image URLs (hero image, icon, etc.).
-
Put any custom images in the
/publicfolder. -
Update the image URLs in
minikit.config.tsto point to your assets.
You can skip the accountAssociation configuration at first. That step is only needed when you want to cryptographically associate the Mini App domain with your Farcaster account.
You can deploy this project using the Vercel CLI or the Vercel dashboard.
vercel --prodAfter a successful deployment, you should get a URL similar to:
https://your-vercel-project-name.vercel.app/
Once you have a production URL, add it to .env.local:
NEXT_PUBLIC_PROJECT_NAME="NOTA Mini App"
NEXT_PUBLIC_ONCHAINKIT_API_KEY=<REPLACE_WITH_YOUR_CDP_API_KEY>
NEXT_PUBLIC_URL=https://your-vercel-project-name.vercel.app/If you have a custom domain (for example https://mini.endhonesa.com), use that as NEXT_PUBLIC_URL instead.
To ensure your production deployment has the same values:
vercel env add NEXT_PUBLIC_PROJECT_NAME production
vercel env add NEXT_PUBLIC_ONCHAINKIT_API_KEY production
vercel env add NEXT_PUBLIC_URL productionFollow the prompts to paste the values from your .env.local file.
When you are ready to formally associate your NOTA / MyReceipt Mini App with your Farcaster account, you can sign the manifest and embed the resulting proof.
- Navigate to the Farcaster Mini App manifest tool in your browser.
- Enter your deployed Mini App domain (for example:
mini.endhonesa.comor your Vercel URL). - Use your Farcaster wallet to sign the manifest as instructed.
- Copy the generated
accountAssociationobject (it containsheader,payload, andsignaturefields).
In minikit.config.ts, include the object you copied:
export const minikitConfig = {
accountAssociation: {
header: "your-header-here",
payload: "your-payload-here",
signature: "your-signature-here",
},
miniapp: {
// ...rest of your Mini App configuration
},
};After you commit this change and redeploy, the manifest at /.well-known/farcaster.json will include your signed association.
vercel --prodThis will publish the updated manifest and associated proof.
This repository is intended as a living playground for NOTA-themed experiments by Prof. NOTA and Prof. NOTA Inc. Some natural next steps include:
-
Alternative NOTA / MyReceipt experiences
- “NOTA of the day”
- Reflection prompts
- User-authored receipts (“My receipt of today is…”)
-
Personalisation
- Allow users to append or fully author their own MyReceipt text
- Different “modes” (random template vs. custom-first)
-
Receipt history (offchain)
- Store per-user receipt logs keyed by Farcaster
fid - Surface recent receipts as a personal timeline or “ledger”
- Store per-user receipt logs keyed by Farcaster
-
Webhook + metrics
- Use
/api/webhookto log Base Mini App events (e.g. saves, launches) - Simple dashboards / stats around MyReceipt usage
- Use
-
Onchain hooks (Base)
- Mint or “stamp” a MyReceipt as an onchain artefact
- Proof-of-presence / proof-of-reflection flows
- Tiny utilities around $MyReceipt or other Prof. NOTA narratives (purely experimental, non-financial)
Any actual use, remix, or redistribution of this codebase must follow the terms described in the LICENSE file. If you are interested in collaborations or specific permissions, please refer to the contact information in LICENSE.
This repository started from a public demo template intended for learning how to build Mini Apps for the Base app and Farcaster. It is provided for educational and experimental purposes within the boundaries defined in the LICENSE file.
- There is no official token, cryptocurrency, or investment product associated with this repository, with NOTA Mini App / MyReceipt Mini App, or with the examples shown here.
- Any external token, app, or social account claiming to be “officially” tied to Coinbase, Base, or to this demo should be treated with caution and independently verified.
- Never sign transactions or connect wallets to untrusted sites.
License, permitted uses, and restrictions are defined in the LICENSE file at the root of this repository. For official information about Base and its developer ecosystem, please refer to: