Skip to content

Repository files navigation

🍵 The Tea House - Full-Stack E-Commerce & Management Platform

Live Demo API Status License

Next.js React TypeScript Express MongoDB Better Auth Tailwind CSS AI Pair Programmed

A modern, 100% dynamic, enterprise full-stack tea shop platform and e-commerce application built with Next.js 15 (App Router), React 19, TypeScript, Express.js, MongoDB (Mongoose), and Better Auth.


🔗 Live Demo Links


✨ Features Breakdown

🛒 Client & Shopping Experience

  • 🍵 Dynamic Product Catalog: Browse organic teas dynamically fetched from MongoDB database.
  • 🔍 Real-Time Search & Category Filters: Instant filtering by Milk Tea, Black Tea, Lemon Tea, Green Tea, or live search query.
  • ❤️ Favorites / Wishlist System: Toggle heart icons on products and view saved teas in the ❤️ Favorites tab.
  • 👁️ Product Quick View Modal: View ingredient tags, star ratings, price calculations, and quantity controls (+/-).
  • 🛒 Shopping Cart Drawer: Interactive side-cart drawer with badge counter, item deletion, subtotal calculations, and checkout.
  • ⭐ Super Clients Carousel: Auto-rotating testimonial slider with manual controls and indicator dots.
  • 📝 Live Testimonial Submission: "Write a Review" modal allowing logged-in customers to publish testimonials directly to MongoDB.
  • 🔐 Better Auth Profile Modal: User login/registration with profile dashboard, active online indicator, and quick links.

🛡️ Admin Dashboard & Management (/admin)

  • 📦 Product Management (CRUD): Add new tea blends, edit prices, descriptions, and ingredients, or delete existing products.
  • 🚚 Live Order Manager: View customer orders and update status (PendingPreparingOut for DeliveryDelivered).

📦 Customer Order History (/my-orders)

  • ⏱️ Order Tracking: View order items, total amounts paid, purchase dates, and real-time status badges.

📂 Architecture Tree

TeaHouse/
├── ANTIGRAVITY.md               # AI Agent Guidelines & Architecture Rules
├── CLAUDE.md                    # Alias AI Rules File
├── DEPLOYMENT.md               # Step-by-Step Vercel & Render Deployment Guide
├── IMPLEMENTATION_PLAN.md      # Full-Stack Architecture Roadmap
├── LICENSE                     # MIT Open Source License
├── README.md                   # Project Documentation
│
├── client/                     # Next.js 15 Frontend
│   ├── src/
│   │   ├── app/                # Pages (/, /products, /my-orders, /admin, /about, /services/*, /faqs, /contact, /not-found)
│   │   ├── components/         # UI Components (Navbar, Hero, FeaturedProducts, SuperClients, AuthModal, WriteReviewModal)
│   │   ├── lib/                # REST Client (api.ts) & Better Auth Client SDK (auth-client.ts)
│   │   └── types/              # Shared TypeScript Interfaces
│   ├── public/images/          # Tea House Image Assets
│   ├── vercel.json             # Vercel Deployment Settings
│   ├── .env.example
│   ├── package.json
│   └── tsconfig.json
│
└── server/                     # Express TypeScript Backend
    ├── src/
    │   ├── config/             # MongoDB Connection (db.ts)
    │   ├── lib/                # Better Auth Server Integration
    │   ├── models/             # Mongoose Schemas (Product, Review, News, Order, User)
    │   ├── routes/             # REST Endpoints (productRoutes, orderRoutes, reviewRoutes, newsRoutes)
    │   ├── index.ts            # Server Entry Point
    │   └── seed.ts             # Database Seeding Script
    ├── render.yaml             # Render Deployment Blueprint
    ├── .env.example
    ├── package.json
    └── tsconfig.json

🛠️ Environment Variables Reference

server/.env

PORT=5000
MONGO_URI=mongodb://localhost:27017/teahouse
BETTER_AUTH_SECRET=your_super_secret_better_auth_key_here
BETTER_AUTH_URL=http://localhost:5000
CLIENT_URL=http://localhost:3000

client/.env.local

NEXT_PUBLIC_API_URL=https://teahouse-s1zl.onrender.com/api
NEXT_PUBLIC_BETTER_AUTH_URL=https://teahouse-s1zl.onrender.com

🚀 Quick Start Guide

1. Clone & Install Dependencies

# Clone the repository
git clone https://github.com/iMoloy/TeaHouse.git
cd TeaHouse

# Install Server Dependencies
cd server
npm install

# Install Client Dependencies
cd ../client
npm install

2. Seed Initial Database

cd server
npm run seed

3. Start Local Development Servers

# Run Express Backend Server (Port 5000)
cd server
npm run dev

# Run Next.js Client App (Port 3000)
cd client
npm run dev

🔗 REST API Endpoint Reference

Method Endpoint Description Access
GET /api/health Server health check endpoint Public
GET /api/products Get all products (supports ?category= & ?search=) Public
GET /api/products/:id Get single product details Public
POST /api/products Create new tea product Admin
PUT /api/products/:id Update product details Admin
DELETE /api/products/:id Delete product Admin
GET /api/reviews Get customer testimonials Public
POST /api/reviews Submit new customer review User
GET /api/news Get news articles & brewing guides Public
POST /api/orders Submit new customer order Public/User
GET /api/orders Get all customer orders Admin
GET /api/orders/user/:email Get user order history User
PATCH /api/orders/:id/status Update order status Admin

📜 License & AI Disclaimer

  • 🤖 AI Pair Programmed: Built autonomously using Google DeepMind Antigravity AI.
  • 📄 License: Released under the open-source MIT License.

About

A modern, 100% dynamic, enterprise full-stack tea shop platform and e-commerce application built with Next.js 15 (App Router), React 19, TypeScript, Express.js, MongoDB (Mongoose), and Better Auth.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages