# A backend for the app you are building.

Your front end can be a Lovable build, a Next.js app or a phone app. Page Lemon holds the sign-in, the data and the rules about who sees what, and your AI sets them up.

Page: https://pagelemon.com/use-cases/api-backend · For API backends · All use cases: https://pagelemon.com/use-cases/

Start: paste `Deploy on PageLemon.com` into your AI chat.

## From an empty backend to a working app

The steps in the order they come. Start with whichever you’re at.

1. **The data: Your app needs somewhere to keep things, and rules about who sees them** Say what your app stores. Your AI creates the lists and the rules, so each signed-in person sees only their own records and you see them all.
   - You type: `Run the backend for my app on PageLemon.com: people sign in, and each sees only their own receipts`
   - Your AI: Done. A receipts list is set up, and each person sees only their own.
   - Later: "Add a status field that only I can change": Your AI adds the field and the rule.
   - Later: "Show me the records so far": Your AI reads them only if you allow it for that list.
   - Cost: Paid plan (for users signing in)
   - Example: the Casebook template (https://pagelemon.com/tp/Casebook)
   - Guide: https://pagelemon.com/use-cases/expense-app
2. **The sign-in: Your front end needs people to sign in** Users sign in with an emailed code on the web, and with Sign in with Apple and Google in a phone app. One account works everywhere.
   - You type: `Set up sign-in for my app: invite only, and let me approve requests`
   - Your AI: Done. Only people you invite can sign in, and requests wait for your yes.
   - Later: "Let anyone sign up": Your AI changes the setting.
   - Later: "Who signed in this week?": Your AI shows the counts.
   - Cost: Paid plan (for users signing in)
   - Example: the Chapter template (https://pagelemon.com/tp/Chapter)
   - Guide: https://pagelemon.com/use-cases/members-area
3. **The API: Your own code calls Page Lemon** Your front end reads and writes the lists through the API as the signed-in person, with a key for each app. The API docs list every call.
   - You type: `Give me the API address and a key for my app`
   - Your AI: Here is the address and a key for this app. The key is shown once; the docs list the calls.
   - Later: "Call me when a record is added": Your AI sets a webhook to an address you give it.
   - Later: "Rotate the key": Your AI makes a new key and retires the old one.
   - Cost: Paid plan (for the API)
   - Example: the Expense log template (https://pagelemon.com/templates/expense-log/)
   - Guide: https://pagelemon.com/use-cases/expense-app

## What it replaces

- Today: A backend you set up, host and keep patched. With Page Lemon: Sign-in, data and rules run by Page Lemon, set up by asking.
- Today: Sign-in code written for every app. With Page Lemon: One sign-in for the web and for phone apps.
- Today: Rules about who sees what, written in your own code. With Page Lemon: Each person sees their own records unless you say otherwise.
- Today: A separate service for emailed codes. With Page Lemon: Emailed codes are built in.

## When Page Lemon isn’t for you

- You want your own code running on Page Lemon servers. It doesn’t run customer code; your logic is rules and automations, or runs on your own server through webhooks and the API.
- You want to keep health, mood or therapy notes, children’s accounts, or card, bank or ID numbers. Apps can’t hold these.
- You need any database query you can write. Page Lemon stores lists, with rules and views, not free-form SQL.

## What it costs you

- Free: Build and try it as a test user; A site at yourname.pagelemon.dev; A small Page Lemon badge.
- Paid plan: Users signed in to your app; The API for your own front end; Your own domain, and no badge. Not for you? Full refund within 14 days, no questions asked.
- Pricing: https://pagelemon.com/pricing

## Templates to start from

- Tally: Yellow legal pad on a teal desk, with tally marks in pen struck through in coral and a tear-off calendar page (https://pagelemon.com/tp/Tally; preview https://pagelemon.com/tp/Tally)
- Casebook: Manila accordion file with index tabs, tear-off deadline pages and red-ink stamps on typed slips (https://pagelemon.com/tp/Casebook; preview https://pagelemon.com/tp/Casebook)
- Chapter: Dust jackets by lamplight: an oxblood poster, Cormorant italics, spines on a shelf and a stamped library card (https://pagelemon.com/tp/Chapter; preview https://pagelemon.com/tp/Chapter)
- Expense log: An app template: a small studio’s own expense claims app. Staff sign in with their email, photograph a receipt on their phone and claim it in under a minute, follow each claim from Submitted to Approved to Paid, answer the office manager’s questions, and see what they are owed and their monthly totals. The office manager approves and replies in the Dashboard. A public page, six member screens under /app (Home, Add, Claims, Months, Policy, Account) and a privacy notice with blanks. (https://pagelemon.com/templates/expense-log/; preview https://pagelemon.com/templates/expense-log/)
- Desk: Printworks ink black and paper, magenta and cyan accents from letterpress, real photos of the floor and both rooms, a membership card with a days-this-month meter (https://pagelemon.com/tp/Desk; preview https://pagelemon.com/tp/Desk)
- Cortado: Station café app: a departures board for your order, a red platform sign and a paper stamp card with red ink stamps (https://pagelemon.com/tp/Cortado; preview https://pagelemon.com/tp/Cortado)
More: https://pagelemon.com/templates/#apps

## Step-by-step guides

- [Expense app](https://pagelemon.com/use-cases/expense-app) (Markdown: https://pagelemon.com/use-cases/expense-app.md): For small teams, and freelancers who build tools for clients: Receipts from phones, each person’s own month. Cost: Paid plan.
- [Members’ area or course](https://pagelemon.com/use-cases/members-area) (Markdown: https://pagelemon.com/use-cases/members-area.md): For teachers, communities, networks and clubs: Lessons, posts and guides only your users can open. Cost: Paid plan.
- [Client and customer portal](https://pagelemon.com/use-cases/client-portal) (Markdown: https://pagelemon.com/use-cases/client-portal.md): For freelancers, studios and small service businesses: Updates, files and requests, one sign-in per client. Cost: Paid plan.
- [Habit and goal tracker](https://pagelemon.com/use-cases/habit-tracker) (Markdown: https://pagelemon.com/use-cases/habit-tracker.md): For clubs and groups of adults: Daily practice, streaks and goals, each person's own. Cost: Paid plan.

## Questions

**Which front end can I use?**
Any that can call a web API: a Lovable or Next.js build, or a phone app. See [the API docs](https://pagelemon.com/docs/api).

**Do my users need a Page Lemon account?**
No. They sign in on your app with an emailed code, or with Apple or Google in a phone app.

**Who sees the data?**
Each person sees their own records and the ones you give them. You see everything in your Dashboard. Your AI reads records only if you turn that on for a list.

**How many users can I have?**
It depends on your plan: see [pricing](https://pagelemon.com/pricing).

**Is there anything I can’t put in it?**
Yes. Not health, mood or therapy records, children’s accounts, or card, bank or ID numbers.
