Skip to content

rumduth/ProStore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

19 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ›οΈ ProStore - Modern E-commerce Platform

A full-featured, modern e-commerce platform built with Next.js 15, featuring a complete shopping experience with admin dashboard, user management, and multiple payment options.

ProStore Homepage

🌐 Live Demo

Visit ProStore Live

✨ Features

πŸ›’ Customer Features

  • Product Browsing: Browse products with advanced filtering and search
  • Shopping Cart: Add/remove items with persistent cart across sessions
  • User Authentication: Secure login/register with NextAuth.js
  • Order Management: Complete checkout process with order tracking
  • Product Reviews: Rate and review products with verified purchase badges
  • Responsive Design: Optimized for desktop, tablet, and mobile devices
  • Dark/Light Mode: Theme switching with system preference detection

πŸ’³ Payment Integration

  • Multiple Payment Methods: PayPal, Stripe, and Cash on Delivery
  • Secure Transactions: PCI-compliant payment processing
  • Order Confirmation: Email receipts and order confirmations

πŸ‘¨β€πŸ’Ό Admin Dashboard

  • Product Management: Create, edit, and manage product inventory
  • Order Management: View and update order status
  • User Management: Manage customer accounts and roles
  • Analytics Dashboard: Sales overview and performance metrics
  • Inventory Tracking: Real-time stock management

Admin Dashboard

πŸ” Security & Authentication

  • Role-based Access Control: Admin and user role management
  • Protected Routes: Secure checkout and admin areas
  • Session Management: Persistent login sessions
  • Password Encryption: Secure password hashing

πŸ› οΈ Tech Stack

Frontend

  • Next.js 15 - React framework with App Router
  • React 19 - Latest React features
  • TypeScript - Type-safe development
  • Tailwind CSS - Utility-first CSS framework
  • Radix UI - Accessible component primitives
  • Lucide React - Beautiful icons
  • Next Themes - Dark/light mode support

Backend & Database

  • Prisma ORM - Type-safe database client
  • PostgreSQL - Robust relational database
  • Neon Database - Serverless PostgreSQL
  • NextAuth.js - Authentication solution

Payments & Services

  • Stripe - Credit card processing
  • PayPal - PayPal payments integration
  • UploadThing - File upload service
  • Resend - Email delivery service
  • React Email - Email template system

Development & Testing

  • Jest - Testing framework
  • ESLint - Code linting
  • TypeScript - Static type checking
  • Zod - Schema validation

πŸ“Έ Screenshots

Product Catalog

Product Catalog

Shopping Cart & Checkout

Shopping Cart

πŸš€ Getting Started

Prerequisites

  • Node.js 18+
  • npm or yarn
  • PostgreSQL database (or Neon account)

Installation

  1. Clone the repository

    git clone https://github.com/rumduth/ProStore.git
    cd ProStore
  2. Install dependencies

    npm install
  3. Environment Setup Create a .env.local file in the root directory:

    # Database
    DATABASE_URL="your_postgresql_connection_string"
    
    # NextAuth
    NEXTAUTH_SECRET="your_nextauth_secret"
    NEXTAUTH_URL="http://localhost:3000"
    
    # Payment Providers
    PAYPAL_CLIENT_ID="your_paypal_client_id"
    PAYPAL_CLIENT_SECRET="your_paypal_client_secret"
    STRIPE_PUBLISHABLE_KEY="your_stripe_publishable_key"
    STRIPE_SECRET_KEY="your_stripe_secret_key"
    STRIPE_WEBHOOK_SECRET="your_stripe_webhook_secret"
    
    # File Upload
    UPLOADTHING_SECRET="your_uploadthing_secret"
    UPLOADTHING_APP_ID="your_uploadthing_app_id"
    
    # Email
    RESEND_API_KEY="your_resend_api_key"
    SENDER_EMAIL="your_sender_email"
    
    # App Configuration
    NEXT_PUBLIC_APP_NAME="ProStore"
    NEXT_PUBLIC_APP_DESCRIPTION="A modern ecommerce store built with NextJs"
    NEXT_PUBLIC_SERVER_URL="http://localhost:3000"
    
    # Default Test Credentials (Development)
    DEFAULT_TEST_EMAIL="[email protected]"
    DEFAULT_TEST_PASSWORD="123456"
    DEFAULT_TEST_NAME="Admin User"
    
    # Payment Methods (comma-separated)
    PAYMENT_METHODS="PayPal, Stripe, CashOnDelivery"
    DEFAULT_PAYMENT_METHOD="PayPal"
    
    # Pagination
    PAGE_SIZE="10"
    LATEST_PRODUCTS_LIMIT="4"
    
    # User Roles
    USER_ROLES="admin, user"
  4. Database Setup

    # Generate Prisma client
    npx prisma generate
    
    # Run database migrations
    npx prisma migrate dev
    
    # Seed the database with sample data
    npm run seed
  5. Start the development server

    npm run dev
  6. Open your browser Navigate to http://localhost:3000

Default Admin Account

πŸ“ Project Structure

pro-store/
β”œβ”€β”€ app/                    # Next.js App Router
β”‚   β”œβ”€β”€ (auth)/            # Authentication pages
β”‚   β”œβ”€β”€ (root)/            # Public pages
β”‚   β”œβ”€β”€ admin/             # Admin dashboard
β”‚   β”œβ”€β”€ api/               # API routes
β”‚   └── user/              # User account pages
β”œβ”€β”€ components/            # Reusable components
β”‚   β”œβ”€β”€ admin/             # Admin-specific components
β”‚   β”œβ”€β”€ shared/            # Shared components
β”‚   └── ui/                # UI components (Radix UI)
β”œβ”€β”€ lib/                   # Utility functions
β”‚   β”œβ”€β”€ actions/           # Server actions
β”‚   └── constants/         # App constants
β”œβ”€β”€ prisma/                # Database schema and migrations
β”œβ”€β”€ public/                # Static assets
β”œβ”€β”€ types/                 # TypeScript type definitions
└── tests/                 # Test files

πŸ§ͺ Testing

Run the test suite:

# Run all tests
npm test

# Run tests in watch mode
npm run test:watch

πŸ“§ Email Templates

The project includes responsive email templates for:

  • Order confirmations
  • Purchase receipts
  • Account notifications

Preview emails in development:

npm run email

πŸ”§ Available Scripts

  • npm run dev - Start development server
  • npm run build - Build for production
  • npm run start - Start production server
  • npm run lint - Run ESLint
  • npm test - Run tests
  • npm run email - Preview email templates
  • npx prisma studio - Open Prisma Studio (database GUI)

🌟 Key Features Explained

Cart Management

  • Persistent cart across browser sessions
  • Automatic cart merging when users log in
  • Real-time price calculations including tax and shipping

Order Processing

  • Multi-step checkout process
  • Address validation
  • Payment method selection
  • Order confirmation emails

Admin Dashboard

  • Real-time sales analytics
  • Product inventory management
  • Order status updates
  • User role management

Security

  • Protected API routes
  • Role-based access control
  • Secure payment processing
  • Input validation with Zod

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

πŸ“ž Support

If you have any questions or need help with setup, please open an issue on GitHub.


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

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published