Skip to content

Latest commit

 

History

History
272 lines (208 loc) · 8.15 KB

File metadata and controls

272 lines (208 loc) · 8.15 KB

TechRaj Digital Bazaar

A comprehensive digital marketplace platform built with Next.js, offering a wide range of tech products and digital services.

About TechRaj Digital Bazaar

TechRaj Digital Bazaar is a modern e-commerce platform specializing in technology products and digital services. The platform provides:

  • 💻 Extensive catalog of tech products and gadgets
  • 🛒 Seamless shopping experience
  • 📱 Fully responsive design
  • 🔐 Secure payment processing
  • 📦 Order tracking and management
  • ⚡ Fast and optimized performance
  • 🎯 Advanced search and filtering
  • 💳 Multiple payment methods

Tech Stack

This project is built with:

  • Framework: Next.js (App Router)
  • Language: TypeScript/JavaScript
  • Styling: Tailwind CSS / CSS Modules
  • State Management: React Context API
  • Database: MongoDB / PostgreSQL
  • Authentication: NextAuth.js
  • Deployment: Vercel

Getting Started

Prerequisites

  • Node.js 18+ installed
  • npm, yarn, pnpm, or bun package manager

Installation

  1. Clone the repository:
git clone <repository-url>
cd techraj-digital-bazaar
  1. Install dependencies:
npm install
# or
yarn install
# or
pnpm install
  1. Create a .env.local file and add your environment variables:
NEXT_PUBLIC_API_URL=your_api_url
DATABASE_URL=your_database_url
NEXTAUTH_SECRET=your_nextauth_secret
NEXTAUTH_URL=http://localhost:3000
PAYMENT_GATEWAY_KEY=your_payment_key
PAYMENT_GATEWAY_SECRET=your_payment_secret
  1. Run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
  1. Open http://localhost:3000 with your browser to see the result.

Features

Core Functionality

  • Product Marketplace: Browse and purchase tech products
  • User Authentication: Secure login and registration
  • Shopping Cart: Manage cart items with real-time updates
  • Checkout Process: Streamlined multi-step checkout
  • Order Management: Track orders and view order history
  • Product Reviews: Customer ratings and reviews
  • Wishlist: Save products for later purchase
  • Search & Filter: Advanced product search and filtering
  • User Dashboard: Manage profile, orders, and preferences
  • Admin Panel: Product and order management for administrators

Product Categories

  • Laptops & Computers
  • Mobile Phones & Accessories
  • Gaming Consoles & Accessories
  • Smart Home Devices
  • Audio & Video Equipment
  • Networking Equipment
  • Software & Digital Products
  • Tech Accessories

Project Structure

techraj-digital-bazaar/
├── app/                    # Next.js app directory
│   ├── page.tsx           # Home page
│   ├── products/          # Product listing and details
│   ├── cart/              # Shopping cart
│   ├── checkout/          # Checkout process
│   ├── orders/            # Order management
│   ├── dashboard/         # User dashboard
│   └── admin/             # Admin panel
├── components/            # Reusable components
│   ├── ui/               # UI components
│   ├── layout/           # Layout components
│   ├── products/         # Product components
│   └── cart/             # Cart components
├── lib/                  # Utility functions and helpers
│   ├── db.ts            # Database connection
│   ├── auth.ts          # Authentication utilities
│   └── utils.ts         # Helper functions
├── public/              # Static assets
│   ├── images/          # Product images
│   └── icons/           # Icons and logos
├── styles/              # Global styles
└── types/               # TypeScript type definitions

Development

You can start editing the application by modifying files in the app directory. The page auto-updates as you edit files thanks to Next.js Fast Refresh.

This project uses next/font to automatically optimize and load fonts.

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 run type-check   # Run TypeScript type checking
npm run test         # Run tests

Environment Variables

Required environment variables:

# Database
DATABASE_URL=                    # Database connection string

# Authentication
NEXTAUTH_SECRET=                 # NextAuth secret key
NEXTAUTH_URL=                    # Application URL

# API
NEXT_PUBLIC_API_URL=             # Public API URL

# Payment Gateway
PAYMENT_GATEWAY_KEY=             # Payment gateway public key
PAYMENT_GATEWAY_SECRET=          # Payment gateway secret key

# Email Service
EMAIL_SERVICE_API_KEY=           # Email service API key
EMAIL_FROM=                      # Sender email address

# Storage
NEXT_PUBLIC_STORAGE_URL=         # File storage URL
STORAGE_ACCESS_KEY=              # Storage access key

API Routes

The application includes the following API routes:

  • /api/products - Product CRUD operations
  • /api/cart - Shopping cart management
  • /api/orders - Order processing
  • /api/users - User management
  • /api/auth - Authentication endpoints
  • /api/payments - Payment processing

Learn More

To learn more about the technologies used:

Deployment

Deploy on Vercel

The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.

Deploy with Vercel

Check out the Next.js deployment documentation for more details.

Live Site

Visit the live application at: https://techraj-digital-bazaar.vercel.app/

Performance Optimization

  • Image optimization with Next.js Image component
  • Code splitting and lazy loading
  • Server-side rendering (SSR) for improved SEO
  • Static generation for product pages
  • API route caching
  • Database query optimization

Security Features

  • Secure authentication with NextAuth.js
  • CSRF protection
  • XSS prevention
  • SQL injection protection
  • Secure payment processing
  • Data encryption
  • Rate limiting on API routes

Contributing

Contributions are welcome! Please feel free to submit a Pull Request. For major changes:

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

Contribution Guidelines

  • Follow the existing code style
  • Write meaningful commit messages
  • Add tests for new features
  • Update documentation as needed
  • Ensure all tests pass before submitting PR

Testing

npm run test              # Run all tests
npm run test:watch        # Run tests in watch mode
npm run test:coverage     # Generate coverage report

License

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

Support

For support and inquiries:

Acknowledgments

  • Next.js team for the amazing framework
  • Vercel for hosting and deployment
  • All contributors and supporters

Built with 💻 to revolutionize digital shopping experience.