AfterCart: What Happens Next, Handled.
Inspiration
Checkout feels like the end of shopping, but it often begins another set of tasks: remembering return deadlines, figuring out what to do when a product stops working, checking warranty options, and keeping track of unresolved issues.
These tasks are individually small, yet they can become fragmented and easy to forget. I wanted to explore a different kind of conversational assistant—one that doesn't stop at answering questions, but helps people organize the next steps after a purchase while keeping them in control.
That's the idea behind AfterCart.
What it does
AfterCart is a conversational post-purchase assistant that turns purchase records into actionable next steps.
With AfterCart, users can:
- See what needs attention: Get a summary of purchases with approaching return-window deadlines.
- Explore their options: Retrieve purchase-specific next steps for returns, warranty inquiries, and repairs without automatically opening a case.
- Check return windows: Compare a purchase's sample deadline with the current date.
- Prepare a case: Create a locally saved draft for a return, warranty inquiry, or repair.
- Stay in control: Explicitly confirm a prepared action through the interface.
- Pick up where they left off: Retrieve saved cases and their status, including after refreshing the page or restarting the local application.
- See what happened: Inspect the MCP activity log to view the tools invoked, their inputs, result summaries, status, and timing.
The goal is simple: make the next step clear without taking control away from the user.
How I built it
I built AfterCart with React, Vite, JavaScript, and CSS for the interface, and Node.js with Express for the backend.
The core integration uses the official Model Context Protocol (MCP) TypeScript SDK over Streamable HTTP. The server registers seven tools for purchase listing, attention summaries, support options, return-window checks, case preparation, case retrieval, and explicit case confirmation.
Rather than relying on a mock activity feed, the browser client communicates with the MCP server, invokes its tools, and displays the resulting tool activity. Local JSON persistence keeps the sample purchase records and case states available across restarts.
Intent routing is deterministic in this MVP. This makes the supported workflows predictable and allows the application to ask for clarification rather than guessing when a request is ambiguous. The project also includes automated tests and an MCP verification script for testing protocol initialization, tool discovery, and actual tool calls.
Challenges and design decisions
One of the central challenges was separating exploring an option from authorizing an action.
A request to see warranty or repair options should not unexpectedly create a case. Similarly, preparing a case should not automatically confirm it. I addressed this by separating read-only tools from case-changing tools and requiring an explicit confirmation step.
Another challenge was making the integration visible and verifiable. A conversational interface alone doesn't prove that an MCP server is working, so I added tool provenance and an activity log that exposes the actual request-and-response path.
I also added local origin checks and automated security tests to strengthen the development setup.
What I learned
Building AfterCart taught me that a useful agentic experience is about more than generating a convincing response. It also needs reliable tool calls, clear boundaries between read-only and state-changing actions, persistent state, useful error handling, and a way to inspect what happened.
MCP gave me a structured way to expose application capabilities as tools, while the verification script helped turn that integration into something testable rather than something that merely appeared to work.
Current scope and limitations
AfterCart is a hackathon prototype using four fictional, seeded sample purchases. It does not connect to real Amazon orders, retailer accounts, warranty providers, repair shops, or payment services. Return dates, eligibility results, and service options are illustrative demo data, and confirming an action updates only the local demo record.
Intent routing is deterministic rather than powered by a large language model.
These boundaries are intentional parts of the current MVP: they let the core experience be demonstrated transparently and repeatably without implying integrations that have not been built.
What's next
The longer-term direction is to explore consent-based integrations, richer purchase context, and more capable conversational orchestration while preserving clear user authorization and traceable actions.
AfterCart turns forgotten purchases into actionable next steps—while keeping the user in control.
Built With
- automated
- css
- express.js
- javascript
- json-persistence
- lucide-react
- model-context-protocol-(mcp)
- node.js
- react
- streamable-http
- vite
- zod
Log in or sign up for Devpost to join the conversation.