Skip to content

AmmarAsif-cmd/Quotes-Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“š Quotes Library - A Personal Learning Project

A modern, full-featured quotes application built with React and Vite. This is a personal project created to practice modern web development, explore React patterns, and build something beautiful and functional.

React Vite License Status

πŸ“Έ Screenshots

Hero Section with Auto-Scrolling Philosopher Portraits

Hero Section Screenshot

The hero section features a beautiful auto-scrolling grid of philosopher and author portraits with a rotating quote display in the center.

🎯 About This Project

This is a personal learning project I built to:

  • Practice modern React development with hooks and functional components
  • Learn Vite as a build tool and development server
  • Explore API integration and error handling patterns
  • Practice responsive design and modern CSS techniques
  • Build a complete, production-ready application from scratch

The application features a beautiful hero section with auto-scrolling philosopher portraits, dynamic quote fetching, and a fully responsive design.

✨ Features

🎨 User Interface

  • Hero Section - Full-screen hero with auto-scrolling philosopher portraits and rotating quotes
  • Modern Design - Clean, minimalist aesthetic with smooth animations
  • Responsive Layout - Fully responsive design that works on all devices
  • Interactive Cards - Beautiful quote cards with hover effects and transitions

πŸ” Functionality

  • Search Quotes - Real-time search by quote text or author name
  • Category Filtering - Filter quotes by category (Wisdom, Success, Motivational, Life, etc.)
  • Copy & Share - One-click copy to clipboard and native share functionality
  • Smart Fallback - Reliable fallback system ensures quotes always display
  • Pagination - Load more quotes with infinite scroll support

πŸ› οΈ Technical Features

  • API Integration - Fetches quotes from external APIs with CORS proxy support
  • Error Handling - Graceful error handling with fallback quotes
  • Performance - Optimized with lazy loading and efficient rendering
  • Accessibility - Semantic HTML and ARIA labels for better accessibility

πŸš€ Getting Started

Prerequisites

  • Node.js (version 16 or higher)
  • npm or yarn package manager

Installation

  1. Clone the repository

    git clone https://github.com/yourusername/quotes-project.git
    cd quotes-project
  2. Install dependencies

    npm install
  3. Start the development server

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

Build for Production

npm run build

The production build will be in the dist directory.

Preview Production Build

npm run preview

πŸ“ Project Structure

quotes-project/
β”œβ”€β”€ public/                 # Static assets
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/         # React components
β”‚   β”‚   β”œβ”€β”€ HeroSection.jsx
β”‚   β”‚   β”œβ”€β”€ QuoteCard.jsx
β”‚   β”‚   β”œβ”€β”€ CategoryFilter.jsx
β”‚   β”‚   └── SearchBar.jsx
β”‚   β”œβ”€β”€ data/              # Data files
β”‚   β”‚   β”œβ”€β”€ fallbackQuotes.js
β”‚   β”‚   └── philosophers.js
β”‚   β”œβ”€β”€ App.jsx            # Main application component
β”‚   β”œβ”€β”€ App.css            # Main styles
β”‚   β”œβ”€β”€ main.jsx           # Application entry point
β”‚   └── index.css          # Global styles
β”œβ”€β”€ index.html             # HTML template
β”œβ”€β”€ package.json           # Dependencies and scripts
β”œβ”€β”€ vite.config.js         # Vite configuration
└── README.md              # Project documentation

πŸ› οΈ Technologies & Tools

Core Technologies

  • React 18.2.0 - Modern UI library with hooks
  • Vite 5.0.8 - Next-generation frontend tooling
  • JavaScript (ES6+) - Modern JavaScript features

Styling

  • CSS3 - Modern CSS with:
    • Flexbox & Grid layouts
    • CSS animations and transitions
    • Custom properties (CSS variables)
    • Responsive design patterns

APIs & Data

  • Quotable API - Primary quotes API (https://api.quotable.io) - Free, open-source API with thousands of quotes
  • ZenQuotes API - Fallback quotes API (https://zenquotes.io) - Provides inspirational quotes
  • Forismatic API - Fallback quotes API (https://api.forismatic.com) - Random inspirational quotes
  • QuoteGarden API - Fallback quotes API (https://quotegarden.io) - Collection of famous quotes
  • Fallback Quotes - 105+ local quotes for reliability when APIs are unavailable
  • Lorem Picsum - Portrait images service (https://picsum.photos) - For philosopher/author portraits

Development Tools

  • Vite - Fast build tool and dev server
  • ESLint - Code linting (if configured)
  • Git - Version control

πŸŽ“ What I Learned

This project helped me practice and learn:

  • React Hooks - useState, useEffect, and custom hooks
  • Component Architecture - Building reusable, modular components
  • API Integration - Fetching data, error handling, and fallback strategies
  • Responsive Design - Mobile-first approach with CSS Grid and Flexbox
  • Performance Optimization - Lazy loading, code splitting, and efficient rendering
  • Modern CSS - Animations, transitions, and advanced styling techniques
  • Git Workflow - Version control and project management

πŸ“Έ Features Showcase

Hero Section

  • Auto-scrolling background with philosopher portraits
  • Rotating inspirational quotes
  • Smooth animations and transitions
  • Full-screen immersive experience

Quote Cards

  • Clean, modern card design
  • Copy and share functionality
  • Category badges
  • Hover effects

Search & Filter

  • Real-time search functionality
  • Category-based filtering
  • Smooth UI interactions

πŸ”§ Configuration

Vite Configuration

The project uses Vite with React plugin. Configuration can be found in vite.config.js.

API Configuration

The app uses a multi-API system with automatic fallback:

  1. Primary API: Quotable API (https://api.quotable.io)

    • Free, open-source quotations API
    • No authentication required
    • Supports pagination and category filtering
    • Returns up to 50 quotes per request
  2. Fallback APIs (tried in order if primary fails):

  3. Final Fallback: Local quotes database

    • 105+ curated quotes across all categories
    • Always available, no network dependency
    • Ensures the app always displays quotes

Image APIs

  • Lorem Picsum (https://picsum.photos) - Provides portrait-style images for philosophers and authors
    • Uses seed-based URLs for consistent images
    • No authentication required
    • Reliable image delivery

πŸ› Known Issues & Future Improvements

Potential Improvements

  • Add user authentication for saving favorite quotes
  • Implement quote of the day feature
  • Add dark mode toggle
  • Create quote collections/categories
  • Add social sharing with custom images
  • Implement quote export functionality

Current Limitations

  • API dependency (with extensive fallback support)
  • 105+ fallback quotes available locally
  • No persistent storage

πŸ“ License

This project is licensed under the MIT License - feel free to use it for learning purposes!

πŸ™ Acknowledgments

Quote APIs

Image Services

Development Tools

  • React & Vite Communities - For excellent documentation and tools
  • GitHub - For hosting and version control

πŸ’‘ Personal Notes

This project was created as part of my journey to learn modern web development. It combines several concepts I wanted to practice:

  • Building complete applications from scratch
  • Working with external APIs
  • Creating beautiful, responsive UIs
  • Implementing proper error handling

Feel free to explore the code, suggest improvements, or use it as a learning resource!


Built with ❀️ as a personal learning project

If you find this project helpful or interesting, feel free to star it or fork it for your own learning!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors