
From Idea to Full-Stack App: Building a Bookmark Manager with AWS Blocks
Every developer has a collection of useful links-AWS documentation, GitHub repositories, blog posts, YouTube videos, Stack Overflow answers, and conference talks. The problem isn't finding great resources; it's remembering where you saved them.
Series: Series: AWS User Group Madurai - Skill Sprint Challenge - DevTool Month - AWS Blocks (3 articles)
- 1From Idea to Full-Stack App: Building a Bookmark Manager with AWS Blocks This article
I realised I had bookmarks everywhere.
Chrome Bookmarks. Browser Reading List. Slack messages. Notion. GitHub Stars. WhatsApp.
Whenever I wanted to revisit something, I spent more time searching than learning.
So I decided to build something simple - a personal bookmark manager. One place. Every link. Saved with a title, a URL, and a tag so I could actually find things again.
But I wanted to focus on building the app, not the plumbing around it.
Normally a project like this means setting up authentication, a database, REST APIs, authorization rules, persistence logic, and frontend integration - before you've written a single line of the thing you actually wanted to build.
That's where AWS Blocks changed the equation.
Instead of stitching together services, I composed four building blocks: AuthBasic for sign-up and sign-in, DistributedTable for storing bookmarks, ApiNamespace to expose backend operations, and Scope to keep each user's data private. The frontend imports the API directly - no HTTP client, no fetch calls, just typed functions.
The result: a working full-stack app, running locally in minutes, deployable to AWS when ready.
Why AWS Blocks?
Instead of spending hours wiring infrastructure together, AWS Blocks lets you compose applications from reusable building blocks — each one handling a specific concern, each one working locally out of the box.
For the bookmark manager, I only needed four.
Block | Purpose |
|---|---|
AuthBasic | Sign-up, sign-in, sign-out, session management |
DistributedTable | Persistent bookmark storage, partitioned per user |
ApiNamespace | Typed backend operations the frontend can call directly |
Scope | Namespaces resources and enforces data boundaries |
The biggest surprise was what I didn't have to write.
No REST endpoints. No route handlers. No API Gateway configuration. The frontend imports backend operations directly - import { api } from 'aws-blocks' - and calls them like local functions.
const result = await api.createBookmark({ url, title, tag });No fetch. No Axios. No manually maintained request/response types. The same TypeScript types flow from the database schema through the backend service all the way to the React component. Change a field name anywhere and the compiler tells you everywhere else that needs updating.
That end-to-end type safety isn't something you bolt on. It comes for free from the architecture.
What We're Building
┌─────────────────────────────────────┐│ React Frontend ││ ││ Save · Delete · View · Sign Out │└───────────────┬─────────────────────┘ │ import { api } from 'aws-blocks'┌───────────────▼─────────────────────┐│ ApiNamespace (Typed Backend) ││ createBookmark · listBookmarks ││ deleteBookmark │└───────────────┬─────────────────────┘ │ requireAuth(context)┌───────────────▼─────────────────────┐│ AuthBasic (Sessions) ││ Register · Sign In · Sign Out │└───────────────┬─────────────────────┘ │┌───────────────▼─────────────────────┐│ DistributedTable (Bookmarks) ││ Persists to .bb-data/ locally ││ Deploys to DynamoDB on AWS │└─────────────────────────────────────┘
Users can:
- Register and sign in with a password
- Save bookmarks with a URL, title, and tag
- View their own collection, sorted newest first
- Delete bookmarks they no longer need
- Only ever see their own data - never anyone else's**.**
Date Persists across:
- Page refreshes
- Dev server restarts
- Local development - no AWS account needed until you deploy
The whole stack runs locally from a single npm run dev. When you're ready to ship, npm run deploy provisions everything on AWS automatically.
Architecture Diagram:

The diagram has three clear swimlane layers:
Browser - AuthGate, App, useBookmarks hook, pure reducer, components
Backend - ApiNamespace, requireOwner (trust boundary highlighted in red), AuthBasic, service layer, shared schemas
Persistence - DistributedTable with arrows showing .bb-data/ locally and DynamoDB on deploy
The bold blue flex arrow between layers labels the key concept: import { api } from 'aws-blocks' - no fetch, no HTTP.
Authentication
AuthBasic handles the full auth lifecycle - sign-up, sign-in, sign-out, and session management - with no custom code required.
Every backend method starts the same way:
const owner = await requireOwner(context);if (!owner.ok) return owner;requireOwner calls auth.requireAuth(context) under the hood. If there's no valid session, the method returns immediately. No database read. No database write. Nothing happens until identity is confirmed.
The frontend never decides who the user is. It never sends a user ID. The backend derives identity from the session on every single call - and that derived ID is the only thing that touches the database.
Data Layer
Each bookmark is stored as a record with seven fields:
userId · bookmarkId · url · title · tag · createdAt · createdAtEpochThe table is structured with userId as the partition key and bookmarkId as the sort key.
That one decision eliminates an entire category of bug.
User A's bookmarks live in User A's partition. User B's bookmarks live in User B's partition. There's no query you can write that crosses that boundary - not because there's a filter checking ownership, but because the partition key makes it structurally unrepresentable. You'd have to already know the other user's ID and actively query their partition. The app never does that.
Backend API
ApiNamespace exposes three operations:
api.createBookmark({ url, title, tag })api.listBookmarks()api.deleteBookmark({ bookmarkId })These aren't REST endpoints. They're TypeScript functions imported directly into the React frontend:
import { api } from 'aws-blocks';const result = await api.createBookmark({ url, title, tag });No REST. No fetch. No JSON parsing. No manually maintained API contract between frontend and backend. The types flow straight through - change a field name in the schema and the compiler tells you everywhere that breaks, on both sides.
How I Built It
I started by declaring an AuthBasic block - one config object that handed me sign-up, sign-in, sign-out, and session management with no custom auth code.
Next I defined the bookmark schema in Zod. Seven fields, one definition, shared by the backend table and the React frontend. What gets stored and what gets displayed can never drift apart.
Then I created the DistributedTable, partitioned by userId and sorted by bookmarkId. Data isolation wasn't something I had to implement - it was just the shape of the table.
The three API methods followed the same pattern every time: confirm the session, extract the userId, pass it to the service function, return the result. The userId never came from the request payload. Ever.
The last piece was the React frontend. Instead of this:
const res = await fetch('/api/bookmarks');const data = await res.json();
I wrote this:
import { api } from 'aws-blocks';const result = await api.listBookmarks();
Fully typed. No request headers. No response parsing. No API contract to maintain between frontend and backend.
Authentication

Verification Code

Bookmarks page



Security
One thing I appreciated early on was how security stopped being something I had to bolt on - it became part of the structure.
The browser never sends a userId. The backend derives it from the authenticated session on every single call. That one rule means:
Anonymous users can't touch any API
A signed-in user can't read another user's bookmarks
A signed-in user can't delete another user's bookmarks
Ownership is enforced by the backend, not the UI. There's no frontend validation to bypass, no userId field to tamper with. The partition key is the user - so crossing that boundary isn't a permissions failure, it's just not a query that exists.
Local Development Experience
This was my favourite part of the whole build.
Normally local development means installing Postgres or SQLite, spinning up Docker, configuring LocalStack, and wiring everything together before writing a single line of business logic.
With AWS Blocks I installed nothing. Ran npm run dev and started building.
DistributedTable automatically wrote JSON to .bb-data/ on disk. No configuration. No setup.
I refreshed the page. Bookmarks were still there.
I restarted the dev server. Bookmarks were still there.
The local persistence just worked - exactly the same way the deployed version works, just without AWS.
Challenges
Every honest builder post has this section.
The first challenge was unlearning REST. My instinct was to think in terms of endpoints — GET /bookmarks, POST /bookmarks, DELETE /bookmarks/:id. ApiNamespace doesn't work that way. Once I stopped thinking about routes and started thinking about typed functions, everything became simpler and the code got shorter.
The second challenge was server-side ownership. My first instinct was to pass userId from the frontend. Then I caught myself — that's exactly the kind of thing an attacker would tamper with. The rule became: the browser proves identity through a session, the backend extracts it, and that's the only userId that ever touches the database.
The third challenge was changing my mental model entirely. I used to think:
Frontend → REST → Lambda → DatabaseWith AWS Blocks I started thinking:
Auth Block → API Block → Table Block → ReactOnce that clicked, the whole project felt cleaner. Each block owns one responsibility. Nothing bleeds into anything else.
What I Learned
The biggest lesson wasn't about bookmarks.
It was about how AWS Blocks changes the questions you ask when building a full-stack app.
Before, I'd ask: "How do I expose this as a REST endpoint?"
With Blocks I found myself asking: "Which block should own this responsibility?"
That shift matters. Authentication became a block. Storage became a block. The API became a block. And because each block handles its own concern completely, the application code shrank -not because I cut corners, but because the infrastructure disappeared into the blocks and stopped being my problem.
The result was a codebase where almost every line was about bookmarks, not plumbing.
Final Thoughts
The bookmark manager isn't a complicated app — and that's precisely why it works as an example. Simple projects expose the developer experience more honestly than large ones. There's nowhere for the friction to hide.
What stood out most wasn't any single feature. It was the cumulative effect of not having to configure authentication, not having to write REST endpoints, not having to set up a local database, and not having to maintain a contract between frontend and backend types. All of that time went into the actual product instead.
If you're exploring AWS Blocks for the first time, start small. Build something you'd actually use. The bookmark manager is a good choice — familiar enough that you're not learning the problem domain at the same time as the tools, and complete enough that every major block gets used.
The infrastructure fades into the background. That's the point.
Series: Series: AWS User Group Madurai - Skill Sprint Challenge - DevTool Month - AWS Blocks (3 articles)
- 1From Idea to Full-Stack App: Building a Bookmark Manager with AWS Blocks This article
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article