-
16 |
-
17 | Get started by editing{" "}
18 |
19 | app/page.tsx 20 |
21 | . 22 |
23 | - Save and see your changes instantly. 24 |
├── .eslintrc.json ├── .gitignore ├── README.md ├── app ├── favicon.ico ├── fonts │ ├── GeistMonoVF.woff │ └── GeistVF.woff ├── globals.css ├── layout.tsx └── page.tsx ├── index.html ├── next.config.js ├── next.config.ts ├── package-lock.json ├── package.json ├── postcss.config.js ├── postcss.config.mjs ├── public ├── file.svg ├── globe.svg ├── next.svg ├── vercel.svg └── window.svg ├── src ├── App.tsx ├── api │ └── generate-scenes.ts ├── components │ ├── AddSceneDialog.tsx │ ├── LandingPage.tsx │ ├── MoviePreviewModal.tsx │ ├── SceneEditor.tsx │ ├── ScenesList.tsx │ └── VideoPreview.tsx ├── env.d.ts ├── hooks │ └── useAnimationFrame.ts ├── index.css ├── main.tsx ├── types.ts ├── types │ └── index.ts └── utils │ ├── animations.ts │ ├── exportMovie.ts │ └── langflow_flow │ └── Slides with images.json ├── tailwind.config.js ├── tailwind.config.ts ├── tsconfig.json ├── tsconfig.node.json ├── vercel.json └── vite.config.ts /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["next/core-web-vitals", "next/typescript"] 3 | } 4 | -------------------------------------------------------------------------------- /.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.* 7 | .yarn/* 8 | !.yarn/patches 9 | !.yarn/plugins 10 | !.yarn/releases 11 | !.yarn/versions 12 | 13 | # testing 14 | /coverage 15 | 16 | # next.js 17 | /.next/ 18 | /out/ 19 | 20 | # production 21 | /build 22 | 23 | # misc 24 | .DS_Store 25 | *.pem 26 | 27 | # debug 28 | npm-debug.log* 29 | yarn-debug.log* 30 | yarn-error.log* 31 | 32 | # env files (can opt-in for committing if needed) 33 | .env* 34 | 35 | # vercel 36 | .vercel 37 | 38 | # typescript 39 | *.tsbuildinfo 40 | next-env.d.ts 41 | 42 | 43 | # Build output 44 | dist 45 | dist-ssr 46 | *.local -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 🎬 ScenicFlow - Powered by Langflow and Groq 2 | 3 | A web-based scene/slide creator built with Vite and React that allows you to create engaging video presentations. Create slides and scenes manually by adding text and images, or let AI automatically generate scenes for you using Langflow integration. 4 | 5 | ## Table of Contents 6 | 7 | - [Prerequisites](#prerequisites) 8 | - [Installation](#installation) 9 | - [Configuration](#configuration) 10 | - [Running the Development Server](#running-the-development-server) 11 | - [Building for Production](#building-for-production) 12 | - [Linting](#linting) 13 | - [Learn More](#learn-more) 14 | - [Deploying](#deploying) 15 | 16 | ## Prerequisites 17 | 18 | Before you begin, ensure you have met the following requirements: 19 | 20 | - **Node.js**: Install the latest version from the [Node.js Official Website](https://nodejs.org/). 21 | - **Package Manager**: Choose one of the following for managing dependencies: 22 | - [npm](https://www.npmjs.com/) 23 | - [Yarn](https://yarnpkg.com/) 24 | - [pnpm](https://pnpm.io/) 25 | - [Bun](https://bun.sh/) 26 | 27 | ## Installation 28 | 29 | Follow these steps to set up the project locally: 30 | 31 | 1. **Clone the Repository** 32 | 33 | ```bash 34 | git clone https://github.com/misbahsy/txt-to-video 35 | cd video-editor 36 | ``` 37 | 38 | 2. **Install Dependencies** 39 | 40 | Choose your preferred package manager to install the required dependencies: 41 | 42 | ```bash 43 | # Using npm 44 | npm install 45 | 46 | # Using Yarn 47 | yarn install 48 | 49 | # Using pnpm 50 | pnpm install 51 | 52 | # Using Bun 53 | bun install 54 | ``` 55 | 56 | ## Configuration 57 | 58 | ### 1. Create a Free Langflow Account 59 | 60 | - Visit [Astra Datastax Langflow](https://astra.datastax.com/) to create a free Langflow account. 61 | - Follow the registration process and verify your email if required. 62 | 63 | ### 2. Obtain Langflow API Token and Base Path 64 | 65 | - After logging in, navigate to the Langflow dashboard. 66 | - Generate or retrieve your **API Token**. 67 | - Note down the **Base Path** for the Langflow API. 68 | 69 | ### 3. Set Up Environment Variables 70 | 71 | Create a `.env` file in the root directory of the project and add the following variables: 72 | ```env 73 | VITE_ASTRA_LANGFLOW_TOKEN=AstraCS:xxxx 74 | VITE_LANGFLOW_BASE_PATH="/api/langflow/lf/xxxxxx-xxxx-xxx-xxxx/api/v1/run/flow-id" 75 | ``` 76 | 77 | **Note:** Ensure that VITE_LANGFLOW_BASE_PATH starts with /api/langflow/... which is available from >API tab at the bottom right of the Langflow UI. Also make sure `.env` is **not** committed to version control to keep your API tokens secure. 78 | 79 | ### 4. Import Langflow Flow 80 | 81 | You can use the predefined flow located at `src/utils/langflow_flow/Slides with images.json`. Simply drag and drop this flow into the Langflow dashboard to get started. 82 | 83 | ## Running the Development Server 84 | 85 | Start the development server using your chosen package manager: 86 | 87 | ```bash 88 | # Using npm 89 | npm run dev 90 | 91 | # Using Yarn 92 | yarn dev 93 | 94 | # Using pnpm 95 | pnpm dev 96 | 97 | # Using Bun 98 | bun dev 99 | ``` 100 | 101 | - Open [http://localhost:3000](http://localhost:3000) in your browser to view the application. 102 | - The app will automatically reload if you make changes to the code. 103 | 104 | ## Building for Production 105 | 106 | To create an optimized production build, run the following command with your preferred package manager: 107 | 108 | ```bash 109 | # Using npm 110 | npm run build 111 | 112 | # Using Yarn 113 | yarn build 114 | 115 | # Using pnpm 116 | pnpm build 117 | 118 | # Using Bun 119 | bun build 120 | ``` 121 | 122 | The build artifacts will be stored in the `dist/` directory. 123 | 124 | ## Linting 125 | 126 | Ensure code quality and consistency by running the linter: 127 | 128 | ```bash 129 | # Using npm 130 | npm run lint 131 | 132 | # Using Yarn 133 | yarn lint 134 | 135 | # Using pnpm 136 | pnpm lint 137 | 138 | # Using Bun 139 | bun lint 140 | ``` 141 | 142 | The linter checks for syntax errors and enforces coding standards based on the `.eslintrc.json` configuration. 143 | 144 | ## Learn More 145 | 146 | To learn more about the technologies used in this project, check out the following resources: 147 | 148 | - [Vite Documentation](https://vitejs.dev/guide/) 149 | - [React Documentation](https://reactjs.org/docs/getting-started.html) 150 | - [Langflow Documentation](https://docs.langflow.org/) 151 | - [TypeScript Documentation](https://www.typescriptlang.org/docs/) 152 | - [Tailwind CSS Documentation](https://tailwindcss.com/docs) 153 | 154 | ## Deploying 155 | 156 | Deploy your application using your preferred hosting platform. For optimal performance and ease of deployment, consider using platforms like [Vercel](https://vercel.com/) or [Netlify](https://www.netlify.com/). 157 | 158 | For more details on deploying with Vite, refer to the [Vite Deployment Guide](https://vitejs.dev/guide/static-deploy.html). 159 | 160 | ``` -------------------------------------------------------------------------------- /app/favicon.ico: -------------------------------------------------------------------------------- 1 |
-------------------------------------------------------------------------------- /app/fonts/GeistMonoVF.woff: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/fonts/GeistVF.woff: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/globals.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | 5 | :root { 6 | --background: #ffffff; 7 | --foreground: #171717; 8 | } 9 | 10 | @media (prefers-color-scheme: dark) { 11 | :root { 12 | --background: #0a0a0a; 13 | --foreground: #ededed; 14 | } 15 | } 16 | 17 | body { 18 | color: var(--foreground); 19 | background: var(--background); 20 | font-family: Arial, Helvetica, sans-serif; 21 | } 22 | -------------------------------------------------------------------------------- /app/layout.tsx: -------------------------------------------------------------------------------- 1 | import type { Metadata } from "next"; 2 | import localFont from "next/font/local"; 3 | import "./globals.css"; 4 | 5 | const geistSans = localFont({ 6 | src: "./fonts/GeistVF.woff", 7 | variable: "--font-geist-sans", 8 | weight: "100 900", 9 | }); 10 | const geistMono = localFont({ 11 | src: "./fonts/GeistMonoVF.woff", 12 | variable: "--font-geist-mono", 13 | weight: "100 900", 14 | }); 15 | 16 | export const metadata: Metadata = { 17 | title: "Create Next App", 18 | description: "Generated by create next app", 19 | }; 20 | 21 | export default function RootLayout({ 22 | children, 23 | }: Readonly<{ 24 | children: React.ReactNode; 25 | }>) { 26 | return ( 27 | 28 | 31 | {children} 32 | 33 | 34 | ); 35 | } 36 | -------------------------------------------------------------------------------- /app/page.tsx: -------------------------------------------------------------------------------- 1 | import Image from "next/image"; 2 | 3 | export default function Home() { 4 | return ( 5 |
19 | app/page.tsx
20 |
21 | .
22 |