Open
Conversation
This commit introduces a new page in the dashboard (`/dashboard/v0-tester`)
that allows you to test the v0 API project generation functionality.
Key changes:
1. **New Page Structure:**
* Created `app/dashboard/v0-tester/page.tsx` (server component) to fetch
workspace details.
* Created `components/v0-tester/V0TesterClientContent.tsx` (client component)
to handle UI and interactions.
2. **UI for V0 Project Generation:**
* `V0TesterClientContent.tsx` includes input fields for:
* Project Description
* URL to Scrape (for SiteConfig data)
* Project Name (for directory and GitHub repo)
* GitHub Token (for creating repositories)
* Buttons to trigger:
* "Generate Project Files" (calls `generateV0Text` then `createProjectFromV0Output`)
* "Generate & Push to GitHub" (calls all three actions: `generateV0Text`, `createProjectFromV0Output`, `createGithubRepoAndPush`)
3. **Client-Side Logic:**
* Implemented functions to call the relevant server actions.
* Handles loading states for buttons.
* Provides you feedback via toast notifications for success and error messages.
* Displays results such as raw v0 API output, generated file paths, and GitHub repository URLs.
4. **Navigation:**
* Added a link "V0 Tester" to the main dashboard sidebar in
`components/app-sidebar.tsx` pointing to `/dashboard/v0-tester`.
This page provides a dedicated interface for testing the end-to-end v0 project generation flow, from providing inputs to generating files and optionally creating a GitHub repository.
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit introduces a new page in the dashboard (
/dashboard/v0-tester) that allows you to test the v0 API project generation functionality.Key changes:
New Page Structure:
app/dashboard/v0-tester/page.tsx(server component) to fetchworkspace details.
components/v0-tester/V0TesterClientContent.tsx(client component)to handle UI and interactions.
UI for V0 Project Generation:
V0TesterClientContent.tsxincludes input fields for:generateV0TextthencreateProjectFromV0Output)generateV0Text,createProjectFromV0Output,createGithubRepoAndPush)Client-Side Logic:
Navigation:
components/app-sidebar.tsxpointing to/dashboard/v0-tester.This page provides a dedicated interface for testing the end-to-end v0 project generation flow, from providing inputs to generating files and optionally creating a GitHub repository.