Spaces:
No application file
No application file
|
Download SETUP-GUIDE.md from Humbl3m33/WEB.BUILDING.GENIOUS: direct link, hf CLI and curl.
- Browser
- Download file 4.2 kB
-
https://huggingface.co/spaces/Humbl3m33/WEB.BUILDING.GENIOUS/resolve/70dbc8380ebac43520e6a2f6369078aaf4fb208e/SETUP-GUIDE.md
- Command line
-
hf download hf://spaces/Humbl3m33/WEB.BUILDING.GENIOUS@70dbc8380ebac43520e6a2f6369078aaf4fb208e/SETUP-GUIDE.md
-
curl -L -o SETUP-GUIDE.md https://huggingface.co/spaces/Humbl3m33/WEB.BUILDING.GENIOUS/resolve/70dbc8380ebac43520e6a2f6369078aaf4fb208e/SETUP-GUIDE.md
4.2 kB
| # π DEEP.REBUILD Complete Setup Guide | |
| ## π Required API Keys & Configuration | |
| ### 1. **Supabase Database** (Primary Storage) | |
| - **Where to get**: [supabase.com](https://supabase.com) | |
| - **Steps**: | |
| 1. Create free account β New Project | |
| 2. Go to Settings β API β Copy URL and Service Role Key | |
| - **Required Variables**: | |
| \`\`\`env | |
| NEXT_PUBLIC_SUPABASE_URL=https://your-project.supabase.co | |
| SUPABASE_SERVICE_ROLE_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9... | |
| \`\`\` | |
| ### 2. **AI Providers** (Choose at least one) | |
| #### OpenAI (Recommended) | |
| - **Where to get**: [platform.openai.com/api-keys](https://platform.openai.com/api-keys) | |
| - **Cost**: Pay-per-use (~$0.01-0.06 per 1K tokens) | |
| - **Models**: GPT-4o, GPT-4o-mini, GPT-4-turbo | |
| - **Variable**: | |
| \`\`\`env | |
| OPENAI_API_KEY=sk-proj-abc123... | |
| \`\`\` | |
| #### OpenRouter (Multi-Model Access) | |
| - **Where to get**: [openrouter.ai/keys](https://openrouter.ai/keys) | |
| - **Cost**: Varies by model ($0.002-0.10 per 1K tokens) | |
| - **Models**: Claude, Llama, Gemini, GPT-4, and 200+ others | |
| - **Variable**: | |
| \`\`\`env | |
| OPENROUTER_API_KEY=sk-or-v1-abc123... | |
| \`\`\` | |
| #### Groq (Ultra-Fast Inference) | |
| - **Where to get**: [console.groq.com/keys](https://console.groq.com/keys) | |
| - **Cost**: Free tier available, then pay-per-use | |
| - **Models**: Llama 3.1, Mixtral (500+ tokens/sec) | |
| - **Variable**: | |
| \`\`\`env | |
| GROQ_API_KEY=gsk_abc123... | |
| \`\`\` | |
| #### Grok (xAI) | |
| - **Where to get**: [console.x.ai](https://console.x.ai) | |
| - **Cost**: Pay-per-use | |
| - **Models**: Grok-beta, Grok-vision-beta | |
| - **Variable**: | |
| \`\`\`env | |
| XAI_API_KEY=xai-abc123... | |
| \`\`\` | |
| ### 3. **MongoDB** (Optional Backup Storage) | |
| - **Where to get**: [mongodb.com/atlas](https://mongodb.com/atlas) | |
| - **Steps**: | |
| 1. Create free cluster (512MB) | |
| 2. Database Access β Add User | |
| 3. Network Access β Add IP (0.0.0.0/0 for development) | |
| 4. Connect β Connect Application β Copy connection string | |
| - **Variable**: | |
| \`\`\`env | |
| MONGODB_URI=mongodb+srv://username:password@cluster0.xxxxx.mongodb.net/deep_rebuild?retryWrites=true&w=majority | |
| \`\`\` | |
| ### 4. **Deployment Tokens** (For CI/CD) | |
| #### Vercel | |
| - **Where to get**: [vercel.com/account/tokens](https://vercel.com/account/tokens) | |
| - **Variable**: | |
| \`\`\`env | |
| VERCEL_TOKEN=abc123... | |
| \`\`\` | |
| #### HuggingFace | |
| - **Where to get**: [huggingface.co/settings/tokens](https://huggingface.co/settings/tokens) | |
| - **Permissions**: Write access to create/update Spaces | |
| - **Variables**: | |
| \`\`\`env | |
| HF_TOKEN=hf_abc123... | |
| HF_SPACE_NAME=your-username/deep-rebuild | |
| \`\`\` | |
| ## π§ Quick Setup Commands | |
| ### Local Development | |
| \`\`\`bash | |
| # 1. Clone and install | |
| git clone <your-repo> | |
| cd deep-rebuild | |
| npm install | |
| # 2. Copy environment file | |
| cp .env.example .env.local | |
| # 3. Add your API keys to .env.local | |
| # 4. Run development server | |
| npm run dev | |
| \`\`\` | |
| ### Deploy to Vercel | |
| \`\`\`bash | |
| # Option 1: One-click deploy | |
| # Click: https://vercel.com/new/clone?repository-url=<your-github-repo> | |
| # Option 2: Vercel CLI | |
| npm i -g vercel | |
| vercel --prod | |
| \`\`\` | |
| ### Deploy to HuggingFace | |
| \`\`\`bash | |
| # 1. Create Space at huggingface.co/new-space | |
| # 2. Choose Docker SDK | |
| # 3. Push your code to the Space repository | |
| # 4. Add environment variables in Space settings | |
| \`\`\` | |
| ## π― Minimum Required Setup | |
| **For basic functionality, you only need**: | |
| 1. **Supabase** (free tier) - Database | |
| 2. **One AI Provider** (OpenAI recommended) - AI Generation | |
| 3. **Environment variables** in your deployment platform | |
| **Optional enhancements**: | |
| - MongoDB for backup storage | |
| - Multiple AI providers for redundancy | |
| - Deployment tokens for automated CI/CD | |
| ## π¨ Security Notes | |
| - **Never commit API keys** to version control | |
| - Use **environment variables** in production | |
| - **Rotate keys** regularly | |
| - Set **usage limits** on AI provider accounts | |
| - Use **service role keys** for Supabase (not anon keys) | |
| ## π Cost Estimates (Monthly) | |
| - **Supabase**: Free (up to 500MB) | |
| - **MongoDB Atlas**: Free (up to 512MB) | |
| - **OpenAI**: $5-50 (depending on usage) | |
| - **Groq**: $0-20 (generous free tier) | |
| - **Vercel**: Free (hobby projects) | |
| - **HuggingFace**: Free (public spaces) | |
| **Total estimated cost**: $5-70/month depending on AI usage | |
| \`\`\` | |
| ```dockerfile file="" isHidden | |