Skip to content

lyrcloud/Lyrshop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lyrshop - E-Commerce Platform

A complete e-commerce platform built with React featuring authentication, product management, and shopping functionality.

🎯 Features

✅ User Authentication

  • Google Sign-In (OAuth)
  • Facebook Login (OAuth)
  • Apple Sign-In (OAuth)
  • Email/Password authentication
  • User profile display and session management

✅ Product Management

  • Create products with form validation
  • Read products with search and filter
  • Update product details
  • Delete individual or multiple products
  • Search by name and description
  • Filter by category and price range
  • Sort by various criteria (price, name, rating, newest)
  • Admin Dashboard for complete product management
  • Bulk Operations for efficient management
  • Statistics showing inventory metrics

🛒 Shopping Features

  • Product catalog with categorized browsing
  • Shopping cart functionality
  • Cascading category menu
  • Product details and reviews
  • Social sharing capabilities

📚 Documentation

Start here: DOCUMENTATION_INDEX.md

Quick Start Guides

Complete Guides

Visual Guides

Quick References

Troubleshooting

🚀 Getting Started

Prerequisites

  • Node.js (v14+)
  • npm or yarn
  • OAuth provider accounts (Google, Facebook, Apple)

Installation

# Install dependencies
npm install

# Create .env file with OAuth credentials
# See .env.example for required variables
cp .env.example .env

# Start development server
npm start

The app will open at http://localhost:3000

🔧 Integration Steps

1. Setup Authentication

# Already integrated!
# Just configure OAuth credentials in .env
# See QUICK_START.md for details

2. Setup Product Management

// In src/App.js
import { ProductProvider } from './context/ProductContext';

function App() {
  return (
    <ProductProvider>
      {/* Your app content */}
    </ProductProvider>
  );
}

See PRODUCT_INTEGRATION_STEPS.md for full guide.

📦 Project Structure

src/
├── context/
│   ├── AuthContext.js          # Authentication state
│   └── ProductContext.js        # Product management state
├── components/
│   ├── Auth/                   # Authentication components
│   │   ├── AuthModal.js
│   │   ├── GoogleLoginButton.js
│   │   ├── FacebookLoginButton.js
│   │   └── AppleLoginButton.js
│   ├── ProductManager.js       # Admin dashboard
│   ├── ProductModal.js         # Add/Edit form
│   ├── UserProfile.js          # User info display
│   └── ... other components
├── styles/
│   ├── AuthModal.css
│   ├── UserProfile.css
│   ├── ProductManager.css
│   ├── ProductModal.css
│   └── ... other styles
└── data/
    └── products.js             # Sample products

🔑 Key Functions

Product Management

import { useProducts } from './context/ProductContext';

const {
  products,               // All products
  addProduct,            // Create
  updateProduct,         // Edit
  deleteProduct,         // Delete
  searchProducts,        // Search
  filterByCategory,      // Filter by category
  filterByPrice,         // Filter by price
  sortProducts           // Sort
} = useProducts();

Authentication

import { useAuth } from './context/AuthContext';

const {
  currentUser,           // Logged-in user
  logout,               // Sign out
  openAuthModal,        // Show login
  closeAuthModal        // Hide login
} = useAuth();

🎨 Components

ProductManager

Admin dashboard for managing products:

  • Table view with search and sort
  • Add/Edit/Delete operations
  • Bulk delete functionality
  • Statistics dashboard
  • Responsive design

ProductModal

Reusable form for adding/editing products:

  • Form validation
  • Image preview
  • All product fields
  • Error handling

AuthModal

User authentication interface:

  • OAuth buttons (Google, Facebook, Apple)
  • Email/password form
  • Form validation
  • Toggle login/signup

UserProfile

User information display:

  • Avatar and name
  • Dropdown menu
  • Logout button
  • Session info

📋 Available Scripts

npm start

Runs the app in development mode. Open http://localhost:3000 to view it in the browser.

npm test

Launches the test runner in interactive watch mode.

npm run build

Builds the app for production to the build folder.

npm run eject

Ejects from Create React App (one-way operation).

🔐 Environment Variables

Create .env file with:

REACT_APP_GOOGLE_CLIENT_ID=your_google_client_id
REACT_APP_FACEBOOK_APP_ID=your_facebook_app_id
REACT_APP_APPLE_TEAM_ID=your_apple_team_id

See .env.example for details.

🛠️ Tech Stack

  • Frontend: React 19.2.3
  • State Management: React Context API
  • Authentication: OAuth 2.0 (Google, Facebook, Apple)
  • Styling: CSS3 with responsive design
  • Icons: lucide-react
  • Build Tool: Create React App

📈 Features Summary

Feature Status Docs
Google OAuth ✅ Complete Link
Facebook OAuth ✅ Complete Link
Apple OAuth ✅ Complete Link
Email/Password ✅ Complete Link
User Profile ✅ Complete Link
Create Products ✅ Complete Link
Read Products ✅ Complete Link
Update Products ✅ Complete Link
Delete Products ✅ Complete Link
Search Products ✅ Complete Link
Filter Products ✅ Complete Link
Sort Products ✅ Complete Link
Admin Dashboard ✅ Complete Link

🚀 Next Steps

  1. Setup OAuth (if not done): See OAUTH_SETUP_GUIDE.md
  2. Integrate Products: See PRODUCT_INTEGRATION_STEPS.md
  3. Understand Architecture: See COMPLETE_FEATURE_COMPARISON.md
  4. Reference API: See PRODUCT_API_DOCUMENTATION.md

📞 Support

📚 Additional Resources

📄 License

This project is licensed under the MIT License.

🎉 Credits

Built with ❤️ for Lyrshop


Ready to get started? See DOCUMENTATION_INDEX.md for the complete documentation guide.

Available Scripts

In the project directory, you can run:

npm start

Runs the app in the development mode.
Open http://localhost:3000 to view it in your browser.

The page will reload when you make changes.
You may also see any lint errors in the console.

npm test

Launches the test runner in the interactive watch mode.
See the section about running tests for more information.

npm run build

Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.
Your app is ready to be deployed!

See the section about deployment for more information.

npm run eject

Note: this is a one-way operation. Once you eject, you can't go back!

If you aren't satisfied with the build tool and configuration choices, you can eject at any time. This command will remove the single build dependency from your project.

Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except eject will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own.

You don't have to ever use eject. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it.

Learn More

You can learn more in the Create React App documentation.

To learn React, check out the React documentation.

Code Splitting

This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting

Analyzing the Bundle Size

This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size

Making a Progressive Web App

This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app

Advanced Configuration

This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration

Deployment

This section has moved here: https://facebook.github.io/create-react-app/docs/deployment

npm run build fails to minify

This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published