├── .eslintrc.json ├── app ├── favicon.ico ├── components │ ├── SvgComps │ │ ├── EnterSvg.tsx │ │ ├── Search.tsx │ │ ├── BotSvg.tsx │ │ └── loading.tsx │ ├── Copy.tsx │ ├── GithubButton.tsx │ ├── YoutubeVideoComponent.tsx │ └── ActionComponent.tsx ├── layout.tsx ├── page.tsx ├── api │ ├── content │ │ └── route.ts │ ├── new │ │ └── route.ts │ └── chat │ │ └── route.ts ├── tweet │ └── [id] │ │ └── page.tsx ├── blog │ └── [id] │ │ └── page.tsx ├── globals.css └── chat │ └── [id] │ └── page.tsx ├── vercel.json ├── next.config.js ├── postcss.config.js ├── .env.example ├── prisma ├── db.ts └── schema.prisma ├── Dockerfile ├── .gitignore ├── public ├── vercel.svg └── next.svg ├── tsconfig.json ├── tailwind.config.js ├── LICENSE ├── package.json ├── README.md └── utils ├── initDb.js └── index.ts /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next/core-web-vitals" 3 | } 4 | -------------------------------------------------------------------------------- /app/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vgulerianb/crucible/HEAD/app/favicon.ico -------------------------------------------------------------------------------- /vercel.json: -------------------------------------------------------------------------------- 1 | { 2 | "functions": { 3 | "app/api/**/*": { 4 | "maxDuration": 300 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /next.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('next').NextConfig} */ 2 | const nextConfig = {} 3 | 4 | module.exports = nextConfig 5 | -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | OPENAI_API_KEY=sk-123 2 | SQL_CONNECTION_STRING=postgres://postgres:----:6543/postgres?pgbouncer=true 3 | NEXT_PUBLIC_SUPABASE_URL=https://12222.supabase.co 4 | SUPABASE_SERVICE_ROLE_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.------ 5 | -------------------------------------------------------------------------------- /prisma/db.ts: -------------------------------------------------------------------------------- 1 | import { PrismaClient } from "@prisma/client"; 2 | 3 | const globalForPrisma = globalThis as unknown as { 4 | prisma: PrismaClient | undefined; 5 | }; 6 | 7 | export const prisma = globalForPrisma.prisma ?? new PrismaClient(); 8 | 9 | if (process.env.NODE_ENV !== "production") globalForPrisma.prisma = prisma; 10 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:lts as builder 2 | 3 | WORKDIR /docnavigator 4 | 5 | COPY package.json yarn.lock ./ 6 | RUN yarn install --frozen-lockfile 7 | 8 | COPY . . 9 | RUN yarn build 10 | 11 | FROM node:lts 12 | 13 | WORKDIR /docnavigator 14 | 15 | COPY --from=builder /docnavigator . 16 | 17 | # Copy .env if it exists 18 | # COPY --from=builder /docnavigator/.env* ./ 19 | 20 | EXPOSE 3000 21 | 22 | CMD ["yarn", "start"] 23 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # next.js 12 | /.next/ 13 | /out/ 14 | 15 | # production 16 | /build 17 | 18 | # misc 19 | .DS_Store 20 | *.pem 21 | 22 | # debug 23 | npm-debug.log* 24 | yarn-debug.log* 25 | yarn-error.log* 26 | 27 | # local env files 28 | .env*.local 29 | 30 | # vercel 31 | .vercel 32 | 33 | # typescript 34 | *.tsbuildinfo 35 | next-env.d.ts 36 | .env 37 | -------------------------------------------------------------------------------- /app/components/SvgComps/EnterSvg.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | function Icon() { 4 | return ( 5 | 20 | ); 21 | } 22 | 23 | export default Icon; 24 | -------------------------------------------------------------------------------- /app/components/Copy.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | const CopyComp = ({ text }: { text: string }) => { 4 | return ( 5 | 15 | ); 16 | }; 17 | 18 | export default CopyComp; 19 | -------------------------------------------------------------------------------- /public/vercel.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/layout.tsx: -------------------------------------------------------------------------------- 1 | import "./globals.css"; 2 | import type { Metadata } from "next"; 3 | import { Inter } from "next/font/google"; 4 | 5 | const inter = Inter({ subsets: ["latin"] }); 6 | 7 | export const metadata: Metadata = { 8 | title: "Crucible - Copilot for your videos", 9 | description: 10 | "Crucible is a tool that helps you to chat with your video and convert your videos into blogs, twitter threads, and more.", 11 | }; 12 | 13 | export default function RootLayout({ 14 | children, 15 | }: { 16 | children: React.ReactNode; 17 | }) { 18 | return ( 19 | 20 |
{children} 21 | 22 | ); 23 | } 24 | -------------------------------------------------------------------------------- /app/page.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | import { useState } from "react"; 3 | import { YoutubeVideoComponent } from "./components/YoutubeVideoComponent"; 4 | import { ActionComponent } from "./components/ActionComponent"; 5 | 6 | export default function Home() { 7 | const [sessionId, setSessionId] = useState