Skip to content

feat: Add V0 project generator tester page#2

Open
Codehagen wants to merge 1 commit intomainfrom
feat/v0-tester-page
Open

feat: Add V0 project generator tester page#2
Codehagen wants to merge 1 commit intomainfrom
feat/v0-tester-page

Conversation

@Codehagen
Copy link
Owner

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.

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.
@vercel
Copy link

vercel bot commented May 26, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sitemint ❌ Failed (Inspect) May 26, 2025 0:44am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant