A Next.js application that lets plants send personalized SMS reminders to their owners. Each plant gets a QR sticker that users can scan to claim their plant and set up SMS reminders with different personalities.
- QR Code Plant Claiming: Scan QR stickers to claim plants
- SMS Reminders: Personalized messages based on plant species and personality
- Multiple Personalities: Choose from Funny, Coach, Zen, or Classic personalities
- Smart Scheduling: Adaptive watering schedules based on user feedback
- Stripe Billing: Free tier (1 plant) and Pro tier (up to 10 plants)
- Admin Dashboard: Generate QR codes and manage plants
- Frontend: Next.js 14, TypeScript, Tailwind CSS, shadcn/ui
- Authentication: Clerk
- Database: PostgreSQL with Prisma ORM
- SMS: Twilio
- Payments: Stripe
- Background Jobs: Inngest
- QR Codes: qrcode library
git clone <your-repo>
cd houseplant
npm installCopy the environment template and fill in your credentials:
cp env.template .env.localRequired environment variables:
# Database
DATABASE_URL="postgresql://username:password@localhost:5432/houseplant"
# Clerk Auth
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_...
CLERK_SECRET_KEY=sk_test_...
# Stripe
STRIPE_SECRET_KEY=sk_test_...
STRIPE_WEBHOOK_SECRET=whsec_...
NEXT_PUBLIC_STRIPE_PRICE_PRO=price_...
# Razorpay (India)
RAZORPAY_KEY_ID=rzp_test_...
RAZORPAY_KEY_SECRET=...
NEXT_PUBLIC_RAZORPAY_KEY_ID=rzp_test_...
# Twilio
TWILIO_ACCOUNT_SID=AC...
TWILIO_AUTH_TOKEN=...
TWILIO_MESSAGING_SERVICE_SID=MG...
# App URLs
NEXTAUTH_URL=http://localhost:3000
APP_BASE_URL=http://localhost:3000# Push the schema to your database
npm run db:push
# Seed with species data
npm run db:seednpm run devVisit http://localhost:3000 to see the app.
Option A: Local PostgreSQL
# Install PostgreSQL locally
# Create database
createdb houseplantOption B: Supabase (Recommended)
- Go to supabase.com
- Create new project
- Get connection string from Settings > Database
- Add to
.env.local
Option C: Neon
- Go to neon.tech
- Create new database
- Get connection string
- Add to
.env.local
- Go to clerk.com
- Create new application
- Copy publishable key and secret key
- Add to
.env.local
- Go to twilio.com
- Create account and get phone number
- Get Account SID and Auth Token
- Create Messaging Service
- Add credentials to
.env.local
- Go to stripe.com
- Create account
- Get API keys from Dashboard
- Create a product and price for Pro plan
- Add credentials to
.env.local
- Go to razorpay.com
- Create account and complete KYC
- Get API keys from Dashboard
- Add credentials to
.env.local
- Go to inngest.com
- Create account
- Get event key
- Add to
.env.local
- Sign in to the app
- Go to
/admin/qr - Generate QR codes (e.g., 10 codes)
- Download PDF with stickers
- Print and cut stickers
- Stick on plant pots
- User scans QR code or visits
/claim?token=... - Signs in with Clerk
- Fills out plant details form
- Plant is claimed and first reminder is scheduled
- Plants send reminders based on species and pot size
- Users reply with "watered", "moved", "droopy", "too dry"
- System adjusts watering schedule based on feedback
- View all plants in dashboard
- See watering status and next due date
- Manual watering triggers
- Plant details and message history
GET /api/species- List all plant speciesPOST /api/plants/claim- Claim a plant with tokenPOST /api/twilio/inbound- Twilio webhook for SMSPOST /api/admin/qr/generate- Generate QR codesPOST /api/admin/qr/pdf- Download QR sticker PDF
Key models:
User- User accounts with Clerk integrationPlant- Individual plants with species and personalitySpecies- Plant species with default watering intervalsMessage- SMS messages sent/receivedClaimToken- QR code tokens for plant claimingSubscription- Stripe billing information
npm run dev # Start development server
npm run build # Build for production
npm run start # Start production server
npm run lint # Run ESLint
npm run typecheck # Run TypeScript checks
npm run db:push # Push schema changes
npm run db:migrate # Create migration
npm run db:seed # Seed database
npm run db:studio # Open Prisma Studio- Seed the database:
npm run db:seed - Generate QR codes: Visit
/admin/qrand generate 5 codes - Claim a plant: Use one of the tokens in
/claim?token=... - Simulate SMS: Use Twilio webhook or manually trigger reminders
- Test billing: Upgrade to Pro plan via Stripe
- Push code to GitHub
- Connect to Vercel
- Add environment variables
- Deploy
# Build image
docker build -t houseplant .
# Run container
docker run -p 3000:3000 houseplant- Sentry: Error tracking and performance monitoring
- PostHog: Analytics and user behavior tracking
- Inngest: Background job monitoring and retries
- Fork the repository
- Create feature branch
- Make changes
- Add tests
- Submit pull request
MIT License - see LICENSE file for details.
For issues and questions:
- Create GitHub issue
- Check documentation
- Join Discord community
Made with 🌱 for plant lovers