A React-based prompt generation tool with a Node.js backend, designed for creating and managing AI prompts.
- Interactive Prompt Builder: Create prompts with customizable elements
- User Authentication: Secure login via Replit OIDC
- Persistent Storage: Save and manage prompts with PostgreSQL
- News Integration: Fetch current news for prompt inspiration
- Responsive Design: Mobile-friendly interface with dark theme
- Frontend: React 18, TypeScript, Tailwind CSS, Vite
- Backend: Node.js, Express, TypeScript
- Database: PostgreSQL with Drizzle ORM
- Authentication: Replit OIDC with express-session
- UI Components: Radix UI, Lucide React icons
- Node.js 20+
- PostgreSQL database
- Replit OIDC configuration (for authentication)
-
Install dependencies:
npm install
-
Environment variables: Create a
.envfile with:DATABASE_URL=postgresql://username:password@localhost:5432/prompt_producer SESSION_SECRET=your-session-secret NEWS_API_KEY=your-news-api-key ISSUER_URL=https://replit.com/oidc REPL_ID=your-repl-id REPLIT_DOMAINS=your-replit-domains -
Database setup:
npm run db:push
-
Start development server:
npm run dev
npm run buildnpm run checkThe application is configured for Replit Autoscale deployment. See replit.md for detailed configuration.
Deploy to Cloudflare Workers for global edge distribution:
-
Install Wrangler:
npm install -g wrangler
-
Login to Cloudflare:
wrangler login
-
Configure secrets:
wrangler secret put DATABASE_URL wrangler secret put SESSION_SECRET wrangler secret put NEWS_API_KEY # Add other secrets as needed -
Deploy:
npm run deploy
For detailed Cloudflare setup instructions, see CLOUDFLARE_DEPLOYMENT.md.
├── client/ # React frontend
│ ├── src/
│ │ ├── components/
│ │ ├── pages/
│ │ └── lib/
│ └── index.html
├── server/ # Express backend
│ ├── routes.ts # API routes
│ ├── storage.ts # Database operations
│ ├── replitAuth.ts # Authentication
│ └── index.ts # Server entry point
├── shared/ # Shared types and schemas
├── worker.ts # Cloudflare Workers entry point
└── wrangler.toml # Cloudflare configuration
npm run dev- Start development servernpm run build- Build for production (Replit)npm run build:worker- Build for Cloudflare Workersnpm run start- Start production servernpm run check- TypeScript type checkingnpm run db:push- Push database schema changesnpm run deploy- Deploy to Cloudflare Workersnpm run cf:dev- Local Cloudflare Workers development
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests and type checking
- Submit a pull request
MIT License - see LICENSE file for details.