This application demonstrates modern web development practices and implements core e-commerce functionality. It's designed to provide a seamless shopping experience with features like user authentication, product management, shopping cart, and secure checkout process.
|
|
|
|
|
|
| Category | Technologies |
|---|---|
| Frontend |
|
| State Management |
|
| Authentication |
|
| Payment |
|
- Node.js (v14 or later)
- npm or yarn
- Stripe account for payment processing
- OAuth credentials (optional for social login)
- Node.js (v14 or later)
- npm or yarn
- Git
Click to expand installation steps
- Clone the repository
git clone https://github.com/username/amazon_next_yt.git
cd amazon_next_yt- Install dependencies
npm install
# or
yarn install- Set up environment variables
Create a .env.local file in the root directory with the following variables:
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=your_nextauth_secret
# OAuth Providers (optional)
GITHUB_ID=your_github_client_id
GITHUB_SECRET=your_github_client_secret
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret
# Stripe
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=your_stripe_publishable_key
STRIPE_SECRET_KEY=your_stripe_secret_key- Run the development server
npm run dev
# or
yarn dev- Open http://localhost:3000 in your browser
/src
/components # Reusable UI components
/auth # Authentication related components
/header # Header components
/images # Static images
/slider # Slider images
/lib # Utility functions and authentication
/auth # Authentication utilities
/pages # Next.js pages and API routes
/api # API routes
/store # Redux store configuration
/styles # Global styles
/public
/assets # Public assets
- Component-Based Architecture: Modular components for better reusability and maintainability
- Container/Presentational Pattern: Separation of logic and UI
- Redux Ducks Pattern: Grouping related actions, reducers, and selectors
- Responsive Design: Mobile-first approach with Tailwind breakpoints
- API Route Pattern: Serverless functions for backend operations
- Authentication Strategies: JWT with secure HTTP-only cookies
- Password hashing with bcrypt
- JWT-based authentication
- Protected API routes
- Form validation
- Secure payment processing with Stripe
This application can be easily deployed on Vercel:
Click to expand GitHub instructions
- Go to GitHub and sign in to your account
- Click on the '+' icon in the top right corner and select 'New repository'
- Name your repository (e.g., 'amazon-clone')
- Choose whether to make it public or private
- Do not initialize with README, .gitignore, or license as we already have these files
- Click 'Create repository'
git initgit add .git commit -m "Initial commit"git remote add origin https://github.com/yourusername/your-repo-name.gitgit push -u origin main
# or if you're using master branch
git push -u origin masterGo to your GitHub repository URL to verify that your code has been pushed successfully.
This project is licensed under the MIT License - see the LICENSE file for details.
Abdelrahman Samy
Made with ❤️ by Abdelrahman Samy
