beingkartik
beingkartik
CCConvex Community
Created by beingkartik on 5/21/2024 in #support-community
How can i switch from one project to another locally?
DO I just need to change the env variable?
11 replies
CCConvex Community
Created by beingkartik on 5/14/2024 in #support-community
Creating more than one environment
Convex has 2 environment one production and second development. Development can only be used for local development. But i want to create a dev environment similar to production which can be accessed by anyone in the team. Currenly only i can access the development environment. Please help!
13 replies
CCConvex Community
Created by beingkartik on 4/8/2024 in #support-community
How to use convex useMutation function inside Inngest functions
I am trying to run a mutation inside inngest function But its not working. I am getting this error
⨯ TypeError: Cannot read properties of null (reading 'useContext')
⨯ TypeError: Cannot read properties of null (reading 'useContext')
This is how I am using it
import { useMutation } from "convex/react";
import { inngest } from "./client";
import { api } from "../../convex/_generated/api";

const updateInteractiveVideo = useMutation(api.videos.updateInteractiveVideo);

export const generateTranscripts = inngest.createFunction(
{ id: "generate transcripts" },
{ event: "upload/generate.transcript" },
async ({ event, step }) => {
const response = await fetch(
`${process.env.NEXT_PUBLIC_BACKEND_CUSTOM_LLM_BASE_URL}/generate-transcript?video_playback_id=${event.data.playbackID}`,
{
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({}),
}
);
const transcriptData = await response.json();

updateInteractiveVideo({
id: event.data.id,
transcripts: { [event.data.videoID]: transcriptData },
// visuals_by_visual_id: {
// [event.data.videoID]: {
// transcript_details: transcriptData,
// video_id: event.data.videoID,
// visual_details: modules?.[index]?.chapters?.[0]?.details || "",
// visual_end: endTimestamp.current,
// visual_playback_id: playbackID,
// visual_start: "00:00:00.000",
// },
// },
max_timestamps: event.data.max_timestamps,
});
return { event, body: transcriptData };
}
);
import { useMutation } from "convex/react";
import { inngest } from "./client";
import { api } from "../../convex/_generated/api";

const updateInteractiveVideo = useMutation(api.videos.updateInteractiveVideo);

export const generateTranscripts = inngest.createFunction(
{ id: "generate transcripts" },
{ event: "upload/generate.transcript" },
async ({ event, step }) => {
const response = await fetch(
`${process.env.NEXT_PUBLIC_BACKEND_CUSTOM_LLM_BASE_URL}/generate-transcript?video_playback_id=${event.data.playbackID}`,
{
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({}),
}
);
const transcriptData = await response.json();

updateInteractiveVideo({
id: event.data.id,
transcripts: { [event.data.videoID]: transcriptData },
// visuals_by_visual_id: {
// [event.data.videoID]: {
// transcript_details: transcriptData,
// video_id: event.data.videoID,
// visual_details: modules?.[index]?.chapters?.[0]?.details || "",
// visual_end: endTimestamp.current,
// visual_playback_id: playbackID,
// visual_start: "00:00:00.000",
// },
// },
max_timestamps: event.data.max_timestamps,
});
return { event, body: transcriptData };
}
);
3 replies
CCConvex Community
Created by beingkartik on 3/19/2024 in #support-community
How to access logged in user details in next js server side?
I am trying to get the logged in user details in server side in next js.I am using clerk for authentication.
const { userId } = getAuth(req);
const { userId } = getAuth(req);
I am getting userId null here
50 replies
CCConvex Community
Created by beingkartik on 3/18/2024 in #support-community
Implement Stripe Payment with convex.
Hey, I want to implenent stripe with convex, I am using next js for my frontend and have some endpoints on next js server only. Can you please tell me how can I start ?
2 replies
CCConvex Community
Created by beingkartik on 3/13/2024 in #support-community
Import data on prod
I want to import documents from local to prod, how can i do that? I am not able to setup convex for prod
33 replies
CCConvex Community
Created by beingkartik on 3/13/2024 in #support-community
Export convex documents
Hey how can I export all my tables data?
3 replies
CCConvex Community
Created by beingkartik on 3/10/2024 in #support-community
Migrate MongoDb documents to convex
Hey, I have two table in my mongodb which has lots of documents and now I want to migrate them to convex. I can export the documents from mongo but to import it in convex I have to remove " " from keys and its not possible to do that for large no. of documents
20 replies
CCConvex Community
Created by beingkartik on 3/8/2024 in #support-community
Compiling Node.js script that uses convex _generated/api.js
I am using ts in node js and its generating a dist folder after the project is build but in dist folder I can't see _generated folder inside convex folder. And thats why getting this error
3 replies
CCConvex Community
Created by beingkartik on 2/29/2024 in #support-community
I want to switch from MongoDb to convex in Node Js project. How should I start?
Please help
46 replies