@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.
1 messages · Page 1 of 1 (latest)
@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.
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:
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.
Set up authentication (optional) - You can choose Clerk or Lucia during the setup process.
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");
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>
);
}
Deploy to Vercel:
npx convex deploy --cmd 'npm run build'CONVEX_DEPLOY_KEY environment variable from your Convex dashboardRegarding 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.