Skip to content

Repository files navigation

KainKain - Handmade Art & Print Collections

A modern e-commerce platform built with Next.js 16, showcasing handmade art pieces and premium print collections. KainKain offers a seamless shopping experience with an elegant design and smooth animations.

🎨 Overview

KainKain is a full-stack e-commerce application that features:

  • Curated collections of handmade art and print artwork
  • Dynamic product catalog with detailed product pages
  • Shopping cart with Zustand state management
  • Secure checkout with Paystack payment integration
  • Responsive design optimized for all devices
  • Smooth animations using Framer Motion
  • MongoDB database for transaction management

πŸš€ Tech Stack

Frontend

  • Framework: Next.js 16.0.10 (React 19)
  • Styling: Tailwind CSS v4 with DaisyUI
  • Animations: Framer Motion
  • State Management: Zustand
  • Icons: Lucide React & React Icons
  • Font: Big Shoulders Display (Google Fonts)

Backend

  • Database: MongoDB with Mongoose ODM
  • API Routes: Next.js API Routes
  • Payment: Paystack Integration

Development Tools

  • Language: TypeScript
  • Linting: ESLint
  • CSS Processing: PostCSS with Autoprefixer & LightningCSS
  • Package Manager: pnpm

πŸ“ Project Structure

KainKain/
β”œβ”€β”€ app/                          # Next.js App Router
β”‚   β”œβ”€β”€ layout.tsx               # Root layout with metadata
β”‚   β”œβ”€β”€ page.tsx                 # Home page
β”‚   β”œβ”€β”€ globals.css              # Global styles
β”‚   β”œβ”€β”€ not-found.tsx            # 404 page
β”‚   β”œβ”€β”€ about/                   # About page
β”‚   β”œβ”€β”€ api/                     # API routes
β”‚   β”‚   └── transactions/        # Transaction endpoints
β”‚   β”œβ”€β”€ cart/                    # Shopping cart page
β”‚   β”œβ”€β”€ checkout/                # Checkout page
β”‚   β”œβ”€β”€ collections/             # Collection pages
β”‚   β”‚   β”œβ”€β”€ hand-made/          # Handmade collection
β”‚   β”‚   └── print-art/          # Print art collection
β”‚   β”œβ”€β”€ newProducts/             # New products page
β”‚   β”œβ”€β”€ order-success/           # Order confirmation page
β”‚   └── products/                # Product listing & details
β”‚       └── [slug]/             # Dynamic product page
β”‚
β”œβ”€β”€ components/                  # React components
β”‚   β”œβ”€β”€ ArtistStatement.tsx     # Artist bio component
β”‚   β”œβ”€β”€ Footer.tsx              # Footer component
β”‚   β”œβ”€β”€ Hero.tsx                # Hero section
β”‚   β”œβ”€β”€ HomeProductCard.tsx     # Product card for home
β”‚   β”œβ”€β”€ Marquee.tsx             # Scrolling marquee
β”‚   β”œβ”€β”€ MotionWrapper.tsx       # Animation wrapper
β”‚   β”œβ”€β”€ NavBar.tsx              # Navigation bar
β”‚   β”œβ”€β”€ ProductList.tsx         # Product listing
β”‚   β”œβ”€β”€ cart/                   # Cart components
β”‚   β”œβ”€β”€ checkout/               # Checkout components
β”‚   β”œβ”€β”€ collections/            # Collection-specific components
β”‚   β”œβ”€β”€ products/               # Product components
β”‚   └── ui/                     # Reusable UI components
β”‚
β”œβ”€β”€ lib/                        # Utilities and configurations
β”‚   └── database/               # Database setup
β”‚       β”œβ”€β”€ mongodb.ts          # MongoDB connection
β”‚       └── models/             # Mongoose models
β”‚           └── Transaction.ts  # Transaction schema
β”‚
β”œβ”€β”€ store/                      # State management
β”‚   └── cartStore.ts           # Zustand cart store
β”‚
β”œβ”€β”€ public/                     # Static assets
β”‚   β”œβ”€β”€ data/                  # JSON product data
β”‚   β”‚   β”œβ”€β”€ combinedProducts.json
β”‚   β”‚   β”œβ”€β”€ handMadeData.json
β”‚   β”‚   β”œβ”€β”€ printArtsData.json
β”‚   β”‚   └── productData.json
β”‚   └── images/                # Image assets
β”‚
└── Configuration Files
    β”œβ”€β”€ next.config.ts         # Next.js configuration
    β”œβ”€β”€ tailwind.config.js     # Tailwind CSS config
    β”œβ”€β”€ tsconfig.json          # TypeScript config
    β”œβ”€β”€ eslint.config.mjs      # ESLint config
    └── postcss.config.mjs     # PostCSS config

πŸ› οΈ Installation & Setup

Prerequisites

  • Node.js 20.x or higher
  • pnpm (recommended) or npm
  • MongoDB database (local or Atlas)

Getting Started

  1. Clone the repository

    git clone https://github.com/adeoyetunmise/KainKain.git
    cd KainKain
  2. Install dependencies

    pnpm install
  3. Set up environment variables

    Create a .env.local file in the root directory:

    # MongoDB
    MONGODB_URI=your_mongodb_connection_string
    
    # Paystack
    NEXT_PUBLIC_PAYSTACK_PUBLIC_KEY=your_paystack_public_key
    
    # Site URL
    NEXT_PUBLIC_SITE_URL=http://localhost:3000
  4. Run the development server

    pnpm dev
  5. Open your browser

    Navigate to http://localhost:3000

πŸ“œ Available Scripts

Command Description
pnpm dev Start development server on port 3000
pnpm build Build production-ready application
pnpm start Start production server
pnpm lint Run ESLint to check code quality
pnpm cleanup Run cleanup script
pnpm build:fresh Clean and build fresh

🎯 Features

Pages

  • Home (/) - Hero section, featured products, and artist statement
  • About (/about) - About the artist and brand
  • Products (/products) - Browse all products
  • Product Details (/products/[slug]) - Individual product page with related items
  • Collections (/collections) - View all collections
    • Handmade (/collections/hand-made) - Handcrafted pieces
    • Print Art (/collections/print-art) - Premium prints
  • New Products (/newProducts) - Latest additions
  • Cart (/cart) - Shopping cart management
  • Checkout (/checkout) - Secure checkout with Paystack
  • Order Success (/order-success) - Order confirmation

Key Features

  • πŸ›’ Shopping Cart - Add, remove, and update quantities
  • πŸ’³ Secure Payments - Paystack integration
  • πŸ“± Responsive Design - Mobile-first approach
  • ⚑ Fast Performance - Optimized with Next.js 16
  • 🎭 Smooth Animations - Framer Motion effects
  • πŸ” SEO Optimized - Meta tags and Open Graph
  • 🎨 Modern UI - Tailwind CSS with DaisyUI

πŸ—„οΈ Database Schema

Transaction Model

{
  reference: string (unique),
  amount: number,
  status: string,
  customerEmail: string,
  customerName: string,
  items: [{
    productId: string,
    name: string,
    price: number,
    quantity: number,
    image: string
  }],
  createdAt: Date,
  updatedAt: Date
}

🎨 Styling

  • CSS Framework: Tailwind CSS v4
  • Component Library: DaisyUI
  • Background Color: #ece8e5 (soft cream)
  • Typography: Big Shoulders Display font family
  • Animations: Framer Motion for page transitions and interactions

πŸ”§ Configuration

Next.js Configuration

  • App Router enabled
  • TypeScript support
  • Image optimization
  • API routes for backend functionality

Tailwind Configuration

  • Custom color schemes
  • DaisyUI plugin integration
  • Responsive breakpoints

πŸ“¦ State Management

Uses Zustand for lightweight state management:

  • Cart state (items, quantities, totals)
  • Product selections
  • Checkout information

πŸš€ Deployment

Build for Production

pnpm build

Deploy to Vercel (Recommended)

vercel

Or connect your GitHub repository to Vercel for automatic deployments.

Environment Variables

Ensure all environment variables are set in your deployment platform:

  • MONGODB_URI
  • NEXT_PUBLIC_PAYSTACK_PUBLIC_KEY
  • NEXT_PUBLIC_SITE_URL

πŸ“ License

This project is private and proprietary.

πŸ‘₯ Author

KainKain

🀝 Contributing

This is a private project. For any questions or suggestions, please contact the repository owner.


Built with ❀️ using Next.js and modern web technologies.

Releases

Packages

Used by

Contributors

Languages