An AI-powered landing page generator that creates high-converting landing pages with built-in waitlist collection. Built with Next.js, PostgreSQL, and AI.
- AI-Powered Generation: Generate landing pages using Meta Llama 3.1 8B (free) via OpenRouter
- Multi-round Chat Interface: Refine your landing page through natural conversation (v0.dev style)
- Real-time Preview: See your landing page update in real-time as you chat
- Waitlist Collection: Built-in email collection with automatic backend storage
- User Management: Multi-user support with better-auth authentication
- Docker Ready: Easy deployment with Docker and Docker Compose
- Modern Tech Stack: Next.js 15, TypeScript, PostgreSQL, Drizzle ORM, tRPC
- Framework: Next.js 15 with App Router
- Language: TypeScript
- Database: PostgreSQL with Drizzle ORM
- Authentication: better-auth
- AI Integration: OpenRouter API with Meta Llama 3.1 8B
- UI: Tailwind CSS + llm-ui for chat interface
- API: tRPC for type-safe APIs
- Deployment: Docker + Docker Compose
- Node.js 20+
- PostgreSQL database
- OpenRouter API key (free tier available)
-
Clone the repository
git clone <your-repo-url> cd landingwise
-
Install dependencies
pnpm install
-
Set up environment variables
cp env.example .env.local
Edit
.env.localwith your configuration:DATABASE_URL="postgres://username:password@localhost:5432/landingwise" OPENROUTER_API_KEY="your_openrouter_api_key" BETTER_AUTH_SECRET="your_32_character_secret_key" BETTER_AUTH_URL="http://localhost:3000"
-
Set up the database
# Start your PostgreSQL database # Then run database migrations pnpm db:push
-
Start the development server
pnpm dev
Visit
http://localhost:3000to see the application.
-
Set up environment variables
cp env.example .env.local # Edit .env.local with your configuration -
Start with Docker Compose
docker-compose up -d
This will start:
- PostgreSQL database on port 5432
- LandingWise app on port 3000
-
Run database migrations
docker-compose exec app pnpm db:push
- Sign up/Login - Create an account or sign in
- Create Project - Fill in project details and describe your landing page
- Chat & Refine - Use the chat interface to refine your landing page
- Preview & Publish - Review in the preview pane and publish when ready
- Collect Emails - Share your published URL to start collecting waitlist signups
- Dashboard: View all your projects from the main dashboard
- Edit: Click "Edit" to continue working on a project
- Publish: Publish draft projects to make them live
- Analytics: View waitlist signups for each published project
- Published landing pages automatically include waitlist collection
- Emails are stored in your database
- Access collected emails through the project management interface
- Go to OpenRouter
- Create an account and get your API key
- Add the API key to your environment variables
The app uses the free Meta Llama 3.1 8B model by default. You can modify the model in src/server/lib/simple-ai.ts.
The application uses the following main tables:
users- User accountsprojects- Landing page projectsconversations- Chat historywaitlist_entries- Collected emailssessions- Authentication sessions
- User authentication via better-auth
- Environment variable validation
- SQL injection protection via Drizzle ORM
- XSS protection for user-generated content
- Set up a PostgreSQL database
- Configure environment variables for production
- Build and deploy using Docker or your preferred platform
Required for production:
DATABASE_URL: PostgreSQL connection stringOPENROUTER_API_KEY: Your OpenRouter API keyBETTER_AUTH_SECRET: 32+ character secret for authenticationBETTER_AUTH_URL: Your production URL
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License.
If you encounter any issues, please file them in the GitHub Issues section with:
- Clear description of the problem
- Steps to reproduce
- Environment details
- Screenshots if applicable
- Built with T3 Stack
- AI models powered by OpenRouter
- Chat interface using llm-ui
