#agentic saas

1 messages · Page 1 of 1 (latest)

ripe cobalt
#

@ionic owl

i want to create a ui on top of https://mastra.ai/ for generating crud application. list me steps to achive this in a next shadcn react typecript mono repo saas boilerplate to deploy on vercel.

The Typescript AI framework

ionic owlBOT
#

Hi @ripe cobalt. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

I understand you're interested in creating a UI for generating CRUD applications with mastra.ai. While I can provide some guidance on using Convex with Next.js, TypeScript, and Shadcn UI, I should note that the knowledge sources don't contain specific information about integrating with mastra.ai.

From what I can see in the knowledge sources, there was a discussion in the Convex Discord about potential integration with mastra.ai, but no concrete implementation details were provided. A community member mentioned that it would be "totally possible to have a Convex adapter in through a ConvexEngine class but doubtless much rearchitecting required" Discord support thread: Convex's compatibility.

Here are the steps to set up a Next.js, Shadcn UI, TypeScript project with Convex that you could deploy on Vercel:

  1. Create a new Convex project using the npm create command:

    npm create convex@latest -- -t nextjs-shadcn
    

    This will set up a project with Next.js and Shadcn UI components A New Command to Start Building Faster: npm create convex.

  2. Set up authentication (optional) - You can choose Clerk or Lucia during the setup process.

  3. Develop your Convex backend - Create your database schema and CRUD functions in the convex/ directory. Convex provides helpers for implementing CRUD operations:

    // in convex/users.ts
    import { crud } from "convex-helpers/server/crud";
    import schema from "./schema.js"
    
    export const { create, read, update, destroy } = crud(schema, "users");
    

    CRUD APIs: Functional, but Inefficient

#
  1. Build your frontend UI with Next.js and Shadcn UI components. You can use the useQuery hook to fetch data from your Convex backend:

    "use client";
    
    import { useQuery } from "convex/react";
    import { api } from "../convex/_generated/api";
    
    export default function Home() {
      const tasks = useQuery(api.tasks.get);
      return (
        <main className="flex min-h-screen flex-col items-center justify-between p-24">
          {tasks?.map(({ _id, text }) => <div key={_id}>{text}</div>)}
        </main>
      );
    }
    

    Next.js Quickstart

  2. Deploy to Vercel:

    • Create a Vercel account if you don't have one
    • Link your project on Vercel
    • Override the build command to be npx convex deploy --cmd 'npm run build'
    • Set up the CONVEX_DEPLOY_KEY environment variable from your Convex dashboard
    • Deploy your site
      Using Convex with Vercel

Regarding the specific integration with mastra.ai for generating CRUD applications, the knowledge sources don't provide detailed information. You might need to explore mastra.ai's documentation to understand how to integrate it with your Convex backend.

If you're looking for AI-powered development with Convex, there are examples of using tools like Cursor, Claude, and other AI tools with Convex as shown in some of the knowledge sources, but nothing specific to mastra.ai integration.

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: