In this categoryCursor ยท 26
- How to Install Cursor and Import VS Code Settings (6 Minutes)Start
- Cursor Setup Guide: From Install to Your First AI Edit
- How to Set Up Project Rules in the .cursor/rules Folder
- How to Set Up Codebase Indexing in Cursor
- How to Enforce Project Conventions with Cursor Rules
- How to Write a Team Rule That Applies Only to Certain Files
- How to Migrate a Legacy .cursorrules File to the New Rules Folder
- How to Use Cursor Rules to Guide AI Edits
- How to Set Project Rules in Cursor
- How to Add a .cursorrules File to Steer Cursor
- How to Customize Cursor Keyboard Shortcuts
- How to Edit Multiple Files at Once with Cursor Composer
- How to Use Cursor Tab Completion Effectively
- How to Edit Code Inline with Cmd+K in Cursor
- How to Add Context to Cursor Chat with @ Mentions
- How to Choose and Switch AI Models in Cursor
- How to Add Library Docs as Context with @Docs in Cursor
- How to Generate and Maintain Tests with Cursor Composer
- How to Undo a Composer Change with Checkpoints in Cursor
- How to Use Cursor Agent Mode to Build a Feature End to End
- How to Connect an MCP Server to Cursor
- How to Refactor Across Your Whole Codebase in Cursor
- How to Query Your Database from Cursor with a Postgres MCP Server
- How to Let Cursor Run Commands Automatically (and Keep It Safe)
- How to Build a Full Feature Across Frontend and Backend with Composer
- How to Debug an MCP Server That Will Not Connect in Cursor
How to Build a Full Feature Across Frontend and Backend with Composer
Plan and implement an end-to-end feature touching API, types, and UI in a single Composer session.
The real payoff of Composer is shipping a feature that spans layers: a new API route, the shared types, and the UI that consumes it. Done well, all of those land as one coherent change. This guide builds a small feature, adding a favorites endpoint and the button that calls it, while keeping each layer in sync.
- A full-stack project open in Cursor
- Composer open (Cmd+I or Ctrl+I)
- The folders for your API, shared types, and components
- A clear one-line description of the feature
Ask for a plan first
For anything spanning multiple layers, ask Composer to outline the change before writing code. A plan lets you catch a wrong assumption cheaply and gives the agent a structure to follow when it edits.
I want users to favorite a post. Before editing, outline the files
you would change across the API, shared types, and the UI. Do not
write code yet.Approve and let it implement
Once the plan looks right, tell Composer to implement it. It edits each file in the plan and shows the combined diff. Because the types are part of the change, the API and UI stay type-compatible.
import type { FavoriteRequest } from '@/types/post';
export async function addFavorite(req: FavoriteRequest) {
return db.favorites.create({
userId: req.userId,
postId: req.postId,
});
}Review each layer separately
Step through the diff one layer at a time. Check the types match between client and server, that the endpoint is wired to the route table, and that the button calls the right function. This is where a layer-spanning change usually breaks.
Verify end to end
Result: a favorites feature implemented across types, API, client, and UI in one session, with the shared types keeping every layer consistent and the type checker confirming it.
Watch related tutorials
28:00
22:00
41:30
12:08
1:42:18
28:14New guides in your inbox
Fresh step-by-step how-to guides as we publish them. One email a week, no more.