{"id":50766129,"url":"https://github.com/kenken64/promptink","last_synced_at":"2026-06-11T14:01:22.959Z","repository":{"id":331687187,"uuid":"1131828035","full_name":"kenken64/Promptink","owner":"kenken64","description":"AI-powered image generation app with TRMNL e-ink display sync. Generate stunning images using OpenAI's DALL-E 3 and display them on your TRMNL device.","archived":false,"fork":false,"pushed_at":"2026-01-28T10:43:51.000Z","size":1985,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-28T18:22:33.744Z","etag":null,"topics":["ai","bun","dall-e","esp32","openai-api","railway","react","shadcn-ui","sqlite3","trmnl","trmnl-plugin"],"latest_commit_sha":null,"homepage":"https://promptink-production.up.railway.app/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kenken64.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"docs/SECURITY_IMPROVEMENTS.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-10T19:16:33.000Z","updated_at":"2026-01-28T10:43:56.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/kenken64/Promptink","commit_stats":null,"previous_names":["kenken64/promptink"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kenken64/Promptink","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kenken64%2FPromptink","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kenken64%2FPromptink/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kenken64%2FPromptink/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kenken64%2FPromptink/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kenken64","download_url":"https://codeload.github.com/kenken64/Promptink/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kenken64%2FPromptink/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34201842,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-11T02:00:06.485Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","bun","dall-e","esp32","openai-api","railway","react","shadcn-ui","sqlite3","trmnl","trmnl-plugin"],"created_at":"2026-06-11T14:01:10.770Z","updated_at":"2026-06-11T14:01:22.957Z","avatar_url":"https://github.com/kenken64.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PromptInk\n\nAI-powered image generation app with TRMNL e-ink display sync. Generate stunning images using OpenAI's DALL-E 3 and display them on your TRMNL device.\n\n[![YouTube](https://img.shields.io/badge/YouTube-@promptinkAI-red?logo=youtube)](https://www.youtube.com/@promptinkAI-h4o)\n![License](https://img.shields.io/badge/license-MIT-blue.svg)\n![Bun](https://img.shields.io/badge/Bun-1.0+-black.svg)\n![React](https://img.shields.io/badge/React-19-61dafb.svg)\n\n## Features\n\n- **AI Image Generation** - Create images using OpenAI DALL-E 3 with natural language prompts\n- **Voice Input** - Speak your prompts using Web Speech API (supports English \u0026 Chinese)\n- **TRMNL Sync** - Push generated images to TRMNL e-ink displays\n- **User Authentication** - Secure JWT-based authentication with email/password\n- **Multi-User Support** - Each user has their own TRMNL webhook and device settings\n- **Dark/Light Theme** - Toggle between themes with persistent preference\n- **Bilingual UI** - Full English and Chinese language support\n- **Mobile Responsive** - Optimized for all screen sizes\n\n## Screenshots\n\n| Chat Interface | Settings Page |\n|---------------|---------------|\n| Generate images with text or voice | Configure your TRMNL device |\n\n## Quick Start\n\n### Prerequisites\n\n- [Bun](https://bun.sh/) v1.0+\n- [OpenAI API Key](https://platform.openai.com/api-keys)\n- [TRMNL Device](https://usetrmnl.com/) (optional, for e-ink display sync)\n\n### Installation\n\n```bash\n# Clone the repository\ngit clone https://github.com/kenken64/Promptink.git\ncd Promptink\n\n# Install dependencies\n./scripts/install.sh\n\n# Configure environment\ncp .env.example backend/.env\n# Edit backend/.env with your API keys\n```\n\n### Configuration\n\nEdit `backend/.env`:\n\n```env\n# Required\nOPENAI_API_KEY=sk-your-openai-api-key\nJWT_SECRET=your-secure-random-string\n\n# Optional (for TRMNL admin operations)\nTRMNL_USER_API_KEY=your-trmnl-user-api-key\nTRMNL_CUSTOM_PLUGIN_UUID=your-plugin-uuid\n```\n\n\u003e **Note:** TRMNL device settings (Device API Key, MAC Address) are now configured per-user in the Settings page.\n\n### Running\n\n```bash\n# Start all services\n./scripts/start.sh\n\n# Check status\n./scripts/status.sh\n\n# Stop all services\n./scripts/stop.sh\n```\n\n**Services:**\n- Main App: http://localhost:3000\n- TRMNL Plugin Preview: http://localhost:4567\n\n## Architecture\n\n```\n┌─────────────────────────────────────────────────────────────────┐\n│                         PromptInk                                │\n├─────────────────────────────────────────────────────────────────┤\n│                                                                  │\n│  ┌──────────────┐    ┌──────────────┐    ┌──────────────────┐   │\n│  │   Frontend   │◄──►│   Backend    │◄──►│  OpenAI DALL-E   │   │\n│  │   (React)    │    │    (Bun)     │    │                  │   │\n│  └──────────────┘    └──────┬───────┘    └──────────────────┘   │\n│                             │                                    │\n│                      ┌──────┴───────┐                           │\n│                      │   SQLite DB  │                           │\n│                      │  - Users     │                           │\n│                      │  - Images    │                           │\n│                      │  - Settings  │                           │\n│                      └──────┬───────┘                           │\n│                             │                                    │\n│              /api/trmnl/webhook/:userId                         │\n│                             │                                    │\n│                      ┌──────┴───────┐                           │\n│                      │    TRMNL     │                           │\n│                      │   Device     │                           │\n│                      └──────────────┘                           │\n│                                                                  │\n└─────────────────────────────────────────────────────────────────┘\n```\n\n## Project Structure\n\n```\nPromptInk/\n├── backend/                 # Bun API server\n│   ├── src/\n│   │   ├── config/         # Environment configuration\n│   │   ├── db/             # SQLite database \u0026 queries\n│   │   ├── middleware/     # Auth middleware\n│   │   ├── routes/         # API endpoints\n│   │   ├── services/       # Business logic\n│   │   └── utils/          # Utilities\n│   └── package.json\n│\n├── frontend/               # React frontend\n│   ├── src/\n│   │   ├── components/     # UI components\n│   │   ├── hooks/          # Custom React hooks\n│   │   ├── pages/          # Page components\n│   │   └── lib/            # Utilities\n│   └── package.json\n│\n├── trmnl-plugin/           # TRMNL plugin\n│   └── src/                # Liquid templates\n│\n├── docs/                   # Documentation\n│   ├── ARCHITECTURE.md     # Detailed architecture docs\n│   ├── CHANGELOG.md        # Version history\n│   └── *.md                # Feature documentation\n│\n├── scripts/                # Management scripts\n├── Dockerfile              # Docker deployment\n└── railway.toml            # Railway deployment config\n```\n\n## API Endpoints\n\n### Authentication\n\n| Method | Endpoint | Description |\n|--------|----------|-------------|\n| POST | `/api/auth/register` | Register new user |\n| POST | `/api/auth/login` | Login user |\n| GET | `/api/auth/me` | Get current user |\n| POST | `/api/auth/logout` | Logout user |\n\n### Image Generation\n\n| Method | Endpoint | Description |\n|--------|----------|-------------|\n| POST | `/api/images/generate` | Generate image from prompt |\n\n### TRMNL Sync\n\n| Method | Endpoint | Description |\n|--------|----------|-------------|\n| POST | `/api/sync/trmnl` | Sync image to TRMNL (auth required) |\n| GET | `/api/trmnl/webhook/:userId` | Webhook for TRMNL polling |\n| GET | `/api/sync/status` | Get sync status |\n\n### Settings\n\n| Method | Endpoint | Description |\n|--------|----------|-------------|\n| GET | `/api/settings` | Get user settings |\n| PUT | `/api/settings` | Update user settings |\n\n## TRMNL Integration\n\n### Setup\n\n1. Register/Login to PromptInk\n2. Go to Settings (gear icon)\n3. Enter your TRMNL Device API Key and MAC Address\n4. Copy your webhook URL: `https://your-domain/api/trmnl/webhook/{userId}`\n5. Configure your TRMNL plugin to poll this URL\n\n### Plugin Deployment\n\n```bash\ncd trmnl-plugin\ntrmnlp login          # First time only\ntrmnlp push           # Upload to TRMNL server\n```\n\n## Deployment\n\n### Railway\n\n1. Connect your GitHub repo to Railway\n2. Set environment variables in Railway dashboard:\n   - `JWT_SECRET`\n   - `OPENAI_API_KEY`\n   - `TRMNL_USER_API_KEY` (optional)\n3. Add a volume mounted at `/app/data` for SQLite persistence\n4. Deploy\n\n### Docker\n\n```bash\ndocker build -t promptink .\ndocker run -p 3000:3000 \\\n  -e JWT_SECRET=your-secret \\\n  -e OPENAI_API_KEY=sk-... \\\n  -v promptink-data:/app/data \\\n  promptink\n```\n\n## Tech Stack\n\n| Layer | Technology |\n|-------|------------|\n| Runtime | Bun |\n| Backend | Bun.serve + SQLite |\n| Frontend | React 19 + Tailwind CSS + shadcn/ui |\n| Auth | JWT + Argon2id |\n| Database | SQLite (bun:sqlite) |\n| AI | OpenAI DALL-E 3 |\n| E-ink Display | TRMNL |\n\n## Development\n\n### Prerequisites\n\n- Bun v1.0+\n- Node.js (for some dev tools)\n\n### Commands\n\n```bash\n# Start development servers\n./scripts/start.sh\n\n# View logs\ntail -f logs/backend.log\n\n# Stop servers\n./scripts/stop.sh\n```\n\n### Frontend Development\n\nThe frontend is bundled by Bun's built-in HTML import feature. Changes hot-reload automatically.\n\n### Adding API Routes\n\n1. Create route file in `backend/src/routes/`\n2. Export routes object\n3. Import and spread in `backend/src/routes/index.ts`\n\n## Contributing\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Acknowledgments\n\n- [OpenAI](https://openai.com/) for DALL-E 3\n- [TRMNL](https://usetrmnl.com/) for e-ink display platform\n- [shadcn/ui](https://ui.shadcn.com/) for UI components\n- [Bun](https://bun.sh/) for the runtime\n\n---\n\nMade with Claude Code\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkenken64%2Fpromptink","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkenken64%2Fpromptink","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkenken64%2Fpromptink/lists"}