An open-source AI code generator that lets you create small apps with a single prompt. Powered by advanced AI models and the Pollinations.ai platform.
- Generate full-stack apps or code snippets from a single prompt
- Uses state-of-the-art models for code and text generation
- Live code sandbox powered by Sandpack
- Built with Next.js, Tailwind CSS, and modern web tech
- Analytics and observability ready (Plausible, Helicone)
- Pollinations AI for LLM inference
- Sandpack for the code sandbox
- Next.js app router with Tailwind
- Helicone for observability (optional)
- Plausible for website analytics
- Clone the repo:
git clone https://github.com/iotserver24/pollin-coder - Copy
.env.exampleto.env.localand configure your environment variables:cp .env.example .env.local
- Install dependencies:
pnpm install(ornpm install) - Start the dev server:
pnpm dev(ornpm run dev) - Visit
http://localhost:3000and click "Connect with Pollinations" to authenticate
The application uses the following environment variables:
TURSO_DATABASE_URL: Turso database URL (required) - Get one from TursoTURSO_AUTH_TOKEN: Turso auth token (required for production)
If you want to enable the admin panel for user and content moderation:
ALLOW_ADMIN_REGISTRATION: Set totrueto allow admin account creation (disable after first admin is created)ADMIN_REGISTRATION_KEY: Secret key required for admin registration (recommended for production)
This app uses the BYOP model: Users authenticate with their own Pollinations accounts, and each user pays for their own AI usage. This means:
- ✅ Zero API costs for you - No matter how many users you have
- ✅ No API key management - Users bring their own keys
- ✅ Built-in rate limiting - Each user has their own quota
- ✅ Transparent billing - Users see exactly what they're paying for
How it works:
- User clicks "Connect with Pollinations" in your app
- They're redirected to
enter.pollinations.aito authorize - They're redirected back with an API key in the URL fragment
- The key is stored client-side in localStorage (base64 encoded with checksum validation)
- All API calls send the key in the
X-Pollinations-Keyheader - Security: Enhanced CSP headers prevent XSS attacks; keys never touch server storage
For users to get started:
- Sign up at enter.pollinations.ai
- Get some free Pollen to start (included with signup)
- Connect your account to this app
No server-side API key needed! Each user brings their own.
The admin panel provides full control over users, content, and system statistics.
-
Enable registration (temporarily):
ALLOW_ADMIN_REGISTRATION=true ADMIN_REGISTRATION_KEY=your_secret_key_here
-
Create first admin account:
curl -X POST http://localhost:3000/api/admin/auth/register \ -H "Content-Type: application/json" \ -d '{ "email": "admin@example.com", "password": "secure_password", "registrationKey": "your_secret_key_here" }'
-
Disable registration (recommended for production):
ALLOW_ADMIN_REGISTRATION=false
-
Access admin panel at
/admin/login
- Dashboard: System statistics, recent activity, model usage breakdown
- User Management: View all users, delete accounts (cascade deletes chats/messages)
- Chat Moderation: View and delete inappropriate content
- Feature Flags: View current feature flag states
- Audit Log: All admin actions are logged with metadata
- Separate authentication system from user auth (email/password with bcrypt)
- Session tokens stored in-memory (15-minute TTL)
- Rate limiting on login attempts (5 attempts per 15 minutes)
- All admin actions logged to audit trail
See CONTRIBUTING.md for guidelines.
- R3AP3R / iotserver24 - Created the original Pollin Coder project
- GitHub: iotserver24/pollin-coder
- spit-fires - Current maintainer and developer
- Responsible for BYOP authentication migration, feature flags, and ongoing improvements
- Pollinations AI - Advanced AI models for code generation
© 2025 Pollin Coder Project. Licensed under MIT.
