A mobile-first plant care application with grow journeys, gamification, community, and AI-powered plant health analysis.
Tech Stack: Next.js 14 (App Router) · TypeScript · Tailwind CSS · Prisma ORM · PostgreSQL (Neon) · Netlify
- Node.js 18+
- npm 9+
- PostgreSQL database (local or Neon)
git clone https://github.com/your-username/lufora.git
cd lufora
npm installcp .env.example .env.localEdit .env.local with your database credentials:
# Neon Postgres (pooled connection — used at runtime)
DATABASE_URL="postgresql://user:pass@ep-xxx-pooler.us-east-2.aws.neon.tech/lufora?sslmode=require"
# Neon Postgres (direct connection — used for migrations)
DIRECT_URL="postgresql://user:pass@ep-xxx.us-east-2.aws.neon.tech/lufora?sslmode=require"
# Auth (generate with: openssl rand -base64 32)
NEXTAUTH_SECRET="your-secret-here"
NEXTAUTH_URL="http://localhost:3000"Note: Also create a
.envfile with the sameDATABASE_URLandDIRECT_URLvalues — Prisma CLI reads from.env, not.env.local.
# Push schema to database (creates all tables)
npm run db:push
# Seed demo data (Ada Green + 8 users, plants, journeys, tasks, posts, badges)
npm run db:seednpm run devVisit these pages:
/api/health— Database connectivity check/home— Dashboard with tasks, plants, streak/plants— Plant collection/grow— Grow journeys/calendar— Today's tasks (try completing one!)/community— Community posts/profile— User profile & badges/leaderboard— Rankings
- Go to neon.tech and create a free account
- Create a new project → choose a region near your users
- Copy two connection strings from the Neon dashboard:
- Pooled connection →
DATABASE_URL - Non-pooled / Direct connection →
DIRECT_URL
- Pooled connection →
# Set your .env with Neon credentials, then:
npm run db:push # Creates schema on Neon
npm run db:seed # Seeds demo datagit init
git add .
git commit -m "🌿 Lufora v0.1 — ready for deployment"
git remote add origin https://github.com/your-username/lufora.git
git push -u origin main- Go to app.netlify.com
- Click "Add new site" → "Import an existing project"
- Connect your GitHub repo
- Netlify will auto-detect the
netlify.tomlconfig - Add environment variables in Netlify Dashboard → Site → Environment Variables:
| Variable | Value | Required |
|---|---|---|
DATABASE_URL |
Neon pooled connection string | ✅ |
DIRECT_URL |
Neon direct connection string | ✅ |
NEXTAUTH_SECRET |
openssl rand -base64 32 |
✅ |
NEXTAUTH_URL |
https://your-site.netlify.app |
✅ |
NEXT_PUBLIC_APP_URL |
https://your-site.netlify.app |
✅ |
AUTH_SECRET |
Same as NEXTAUTH_SECRET | ✅ |
CLOUDINARY_CLOUD_NAME |
— | 🔜 Future |
CLOUDINARY_API_KEY |
— | 🔜 Future |
CLOUDINARY_API_SECRET |
— | 🔜 Future |
- Click Deploy
Visit your deployed site and check:
https://your-site.netlify.app/api/health→ Should return{ "ok": true, "database": { "status": "connected" } }https://your-site.netlify.app/home→ Dashboard loads with seeded datahttps://your-site.netlify.app/plants→ Plants list shows seeded plantshttps://your-site.netlify.app/calendar→ Tasks with working complete button
| Script | Command | Description |
|---|---|---|
| Generate | npm run db:generate |
Regenerate Prisma Client |
| Push | npm run db:push |
Push schema to DB (no migration files) |
| Migrate | npm run db:migrate |
Run pending migrations |
| Migrate Dev | npm run db:migrate:dev |
Create new migration (dev only) |
| Seed | npm run db:seed |
Seed demo data |
| Studio | npm run db:studio |
Open Prisma Studio GUI |
| Reset | npm run db:reset |
- 🏷️ 14 badges across plant care, grow journey, community, and streak categories
- 👤 9 users — Ada Green (demo user) + 8 leaderboard users
- 🪴 4 plants — Monstera, Cactus, Orchid, Pothos (Ada's collection)
- 📊 5 health logs — Monstera health history
- 📸 3 plant photos — Growth progression
- 🌱 2 grow journeys — Basil (from seed, day 12) + Avocado (from seed, day 24)
- 📸 4 journey photos — Journey progress
- 🏆 9 milestones — Journey stage milestones
- ✅ 12 tasks — Mix of plant care + journey tasks (1 completed)
- 💬 7 community posts — From various users
- 💬 12 replies — Community discussions
- 💰 8 point transactions — Ada's points history
- 🏅 4 earned badges — Ada's unlocked badges
- Current user is mocked —
src/lib/current-user.tsreturns the first user (Ada Green) - Real NextAuth integration is planned for Phase 6
- All API routes work without authentication for demo purposes
- Plant Doctor and Grow Guide use mock AI responses
- Located in
src/lib/ai/mock-ai-service.ts - Ready to swap with OpenAI/Anthropic/Gemini SDK calls
- Uses placeholder image URLs (
placehold.co) - Ready for Cloudinary/Supabase Storage integration
src/
├── app/
│ ├── (main)/ # Pages with bottom navigation
│ │ ├── home/ # Dashboard
│ │ ├── plants/ # My Plants + Plant Detail
│ │ ├── grow/ # Grow Journeys + Journey Detail
│ │ ├── calendar/ # Tasks with complete button
│ │ ├── community/ # Community posts
│ │ ├── profile/ # User profile + badges
│ │ └── leaderboard/ # Rankings
│ └── api/ # 28 API routes
│ ├── ai/ # Mock AI endpoints
│ ├── badges/ # Badge management
│ ├── community/ # Posts + replies + likes
│ ├── grow-journeys/ # Journey CRUD
│ ├── health/ # Health check
│ ├── leaderboard/ # Rankings
│ ├── me/ # Current user
│ ├── plants/ # Plant CRUD + photos + health logs
│ ├── profile/ # Profile management
│ └── tasks/ # Task CRUD + complete
├── components/ui/ # Reusable UI components
├── hooks/ # Custom React hooks (useApi)
├── lib/ # Business logic
│ ├── ai/ # AI service abstraction
│ ├── api-client.ts # Typed fetch helpers
│ ├── api-helpers.ts # API response helpers
│ ├── current-user.ts # Mock auth (TODO: real NextAuth)
│ ├── mock-data.ts # Frontend fallback data
│ ├── points.ts # Points/badge business logic
│ ├── prisma.ts # Prisma singleton
│ ├── utils.ts # Utility functions
│ └── validations.ts # Zod schemas
└── types/ # Shared TypeScript types
npm run dev # Start development server
npm run build # Production build (includes prisma generate)
npm run lint # ESLint check
npx tsc --noEmit # TypeScript check
npx prisma validate # Validate Prisma schema
npx prisma studio # Open database GUIMIT