Summary

  • Deployed a scalable MCP server handling complex business workflows.
  • Implemented secure authentication supporting AI agents with session management
  • Built comprehensive API with 10 specialized tools for coupon management and course analytics
  • Achieved production stability with proper error handling, logging, and monitoring
  • Demonstrated full-stack expertise in serverless deployment

I developed a comprehensive coupon management system as part of a live industry project with Ausbiz Consulting, implementing the Model Context Protocol (MCP) to enable seamless AI agent integration. This full-stack application serves as a bridge between AI assistants like Claude and a robust coupon management backend, allowing users to interact with complex business workflows through natural language commands.

The system is built with Next.js 15 and TypeScript, featuring a PostgreSQL database managed through Drizzle ORM for type-safe database operations.

The architecture includes 10 specialized MCP tools, these including:

  • Check coupon tokens
  • Check a coupon token’s details, including
    • Associated course (if unused)
    • Expiry date (if unused)
    • Course activated (if used)
    • Used date (if used)
    • Person & person’s email who used (if used)
    • Duplication warning (if any)
  • Bulk coupon token creation
    • Automatically associate coupon with the course specified
    • Check and prevent skip token already exist to avoid duplication
  • Check if list of students used their coupon token
  • Course enrollment tracking
  • Course completion tracking
  • Course feedback reporting
  • Send/broadcast emails to students
    • Markdown-to-HTML conversion
    • Template rendering with React Email
    • Send with Resend APIs

To ensure secure access, privacy control and ease of use, authentication system have been implemented.

Phase 1: Custom AI session management

I implemented a sophisticated authentication flow that integrated traditional Clerk authentication with custom AI session tokens.

Users can initiate requests through AI assistants, visit secure authentication links, and seamlessly return to their AI session with full access to coupon management capabilities.

For deployment, I configured the application for Vercel serverless functions with Edge Config for session management, implementing proper CORS handling and optimizing for the serverless execution model.

Phase 2: OAuth 2.1

After OAuth auth demo developped successfully, I have replace the customized authentication and session management with OAuth 2.1 (with Google Login).

Once Google validates the user, JWT tokens (using the jose library) will be created, with encrypted session data (including permissions, role, and device information ) and refresh capabilities.

This project demonstrates expertise in modern web development, API design, database architecture, authentication systems, and the emerging field of AI agent integration through MCP. It successfully handles real-world business requirements while maintaining scalability, security, and user experience standards.

More PROJECTS