A project that converts uploaded images (UI designs, mockups, screenshots) into corresponding frontend code.
This application allows users to upload an image of a user interface design or a wireframe. The backend then processes this image, potentially using an AI model (like Grizzle), to generate HTML, CSS, and JavaScript code, React.js or components for frameworks like Next.js.
Before you begin, ensure you have the following installed:
Follow these instructions to set up the project locally.
Clone the repository:
git clone <your-repository-url>
cd WhiteBox-AI
Install dependencies:
npm install
# or
yarn install
Create a .env
file in the root of your project and add the necessary environment variables. Refer to .env.example
if you create one.
# Next.js
NEXT_PUBLIC_APP_URL=http://localhost:3000
# Firebase (Update with your Firebase project config)
NEXT_PUBLIC_FIREBASE_API_KEY=your_firebase_api_key
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=your_firebase_auth_domain
NEXT_PUBLIC_FIREBASE_PROJECT_ID=your_firebase_project_id
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=your_firebase_storage_bucket
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=your_firebase_messaging_sender_id
NEXT_PUBLIC_FIREBASE_APP_ID=your_firebase_app_id
# Neon (PostgreSQL Database URL)
DATABASE_URL=your_neon_database_url
# Grizzle AI (or other image-to-code service)
GRIZZLE_API_KEY=your_grizzle_api_key
Run database migrations (if applicable with Neon): (Add command if you are using a migration tool like Prisma or Drizzle ORM migrations)
# Example: npx prisma migrate dev
Start the development server:
npm run dev
# or
yarn dev
The application should now be running on http://localhost:3000.
(Add more specific steps or screenshots if possible)
Contributions are welcome! Please open an issue first to discuss what you would like to change or add.
This project is licensed under the MIT License.