--- license: mit title: Prompta sdk: docker emoji: 🚀 colorFrom: purple colorTo: blue short_description: 'Transform your ideas into complete websites instantly.' --- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference # Prompta Transform your ideas into complete websites instantly. Powered by AI. Try it at: https://huggingface.co/spaces/[YOUR_USERNAME]/Prompta This project is inspired by [llamacoder](https://github.com/Nutlope/llamacoder). Please follow [Nutlope](https://github.com/Nutlope) and give them a star. ## Tech Stack - [Gemini API](https://ai.google.dev/gemini-api/docs) for AI generation - [Sandpack](https://sandpack.codesandbox.io/) for code sandbox - Next.js app router with Tailwind CSS You can also experiment with Gemini in [Google AI Studio](https://aistudio.google.com/). ## Cloning & Running Locally 1. Clone the repo: `git clone https://github.com/[YOUR_USERNAME]/Prompta` 2. Create a `.env` file and add your [Google AI Studio API key](https://aistudio.google.com/app/apikey): `GOOGLE_AI_API_KEY=` 3. Run `npm install` and `npm run dev` to install dependencies and run locally **This is a personal project and not a Google official project** --- ### Troubleshooting Build Issues If your Hugging Face Space isn't building properly: 1. **Dockerfile Requirements**: - Ensure you have a `Dockerfile` in your root directory - Example Dockerfile: ```dockerfile FROM node:18-alpine WORKDIR /app COPY package*.json ./ RUN npm install COPY . . RUN npm run build EXPOSE 7860 CMD ["npm", "start"] ``` 2. **Port Configuration**: - Hugging Face Spaces requires port 7860 - In your Next.js app, add to `next.config.js`: ```js /** @type {import('next').NextConfig} */ const nextConfig = { output: 'standalone', images: { unoptimized: true } } module.exports = nextConfig ``` 3. **Environment Variables**: - Add `GOOGLE_AI_API_KEY` as a secret in your Space settings - Don't commit `.env` files to your repository 4. **Build Command**: - Ensure your `package.json` has: ```json { "scripts": { "dev": "next dev", "build": "next build", "start": "next start" } } ``` 5. **Common Issues**: - Missing dependencies: Check all packages are in `package.json` - Build timeouts: Optimize build process or increase Space resources - Port conflicts: Ensure nothing else uses port 7860 - File paths: Verify all paths in Dockerfile are correct