Skip to content

Repository files navigation

Quotes API 🌟

Next.js TypeScript Tailwind CSS Framer Motion License: MIT

API dan aplikasi web untuk koleksi quotes inspiratif bahasa Indonesia dengan interface yang modern dan interaktif.

Screenshot

✨ Demo

🌐 Live Demo: https://quotes.liupurnomo.com πŸ“š API Documentation: https://quotes.liupurnomo.com/docs

πŸš€ Features

🎬 Interactive Web App

  • Slideshow Mode - Auto-play quotes dengan interval customizable
  • Fullscreen Experience - Mode fullscreen untuk pengalaman immersive
  • Theme Switcher - 5 theme gradient yang berbeda
  • Responsive Design - Optimized untuk desktop dan mobile
  • Smooth Animations - Powered by Framer Motion

πŸ”Œ Powerful API

  • RESTful API dengan 3 endpoints utama
  • Pagination & Filtering - Support untuk large datasets
  • Rate Limiting - Protection dari abuse
  • Search Functionality - Global search across quotes
  • Sorting Options - Flexible sorting by multiple fields

πŸ“± Mobile-First Design

  • Bottom Dock Controls - Touch-friendly pada mobile
  • Glassmorphism UI - Modern transparent effects
  • Responsive Typography - Scalable text untuk semua device

πŸ—οΈ Tech Stack

Screenshot

πŸ“Š API Endpoints

Method Endpoint Description
GET /api/quotes Get all quotes with pagination & filtering
GET /api/quotes/random Get random quote (optional category filter)
GET /api/quotes/:id Get specific quote by ID

πŸ” Query Parameters

GET /api/quotes:

  • page - Page number (default: 1)
  • limit - Items per page (default: 5, max: 100)
  • category - Filter by category
  • author - Filter by author
  • search - Global search
  • sortBy - Sort field (id, text, author, category)
  • sortOrder - Sort order (asc, desc)

GET /api/quotes/random:

  • category - Optional category filter

πŸ“š Available Categories

  • motivasi - Motivational quotes
  • kesuksesan - Success quotes
  • kehidupan - Life wisdom
  • pendidikan - Educational quotes
  • kebahagiaan - Happiness quotes
  • cinta - Love quotes
  • teknologi - Technology quotes
  • bisnis - Business quotes
  • persahabatan - Friendship quotes
  • kerja-keras - Hard work quotes
  • kepemimpinan - Leadership quotes
  • kreativitas - Creativity quotes
  • pembelajaran - Learning quotes
  • perubahan - Change quotes
  • nasionalisme - Nationalism quotes

πŸ› οΈ Installation & Development

Prerequisites

  • Node.js 18+
  • npm atau yarn

Setup Local Development

  1. Clone repository

    git clone https://github.com/liu-purnomo/quotes.git
    cd quotes
  2. Install dependencies

    npm install
  3. Start development server

    npm run dev
  4. Open browser

    http://localhost:3000
    

πŸ—οΈ Build for Production

npm run build
npm start

πŸ§ͺ Linting & Type Check

npm run lint
npm run type-check

πŸ“Š Rate Limiting

Endpoint Limit Window
/api/quotes 30 requests per minute
/api/quotes/:id 30 requests per minute
/api/quotes/random 60 requests per minute

πŸ“ Response Format

All API responses follow this consistent structure:

{
  "status": "SUCCESS" | "ERROR",
  "message": "Descriptive message",
  "data": {...} | [...],
  "metadata": {...} // Optional
}

🎨 Usage Examples

Fetch Random Quote

const response = await fetch('https://quotes.liupurnomo.com/api/quotes/random');
const data = await response.json();
console.log(data.data.text); // Quote text

Search Quotes

const response = await fetch('https://quotes.liupurnomo.com/api/quotes?search=hidup&limit=10');
const data = await response.json();
console.log(data.data); // Array of matching quotes

Get Quotes by Category

const response = await fetch('https://quotes.liupurnomo.com/api/quotes/random?category=motivasi');
const data = await response.json();
console.log(data.data); // Random motivational quote

🀝 Contributing

We welcome contributions! Please see CONTRIBUTING.md for guidelines.

Quick Start for Contributors

  1. Fork the repository
  2. Create feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes
  4. Run tests and linting
  5. Commit using conventional commits
  6. Push to your fork
  7. Create Pull Request

πŸ“„ License

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

πŸ™ Acknowledgments

  • Quotes collected from various sources with proper attribution
  • Inspired by modern quote applications and APIs
  • Built with ❀️ using modern web technologies

πŸ“ž Contact & Support


Made with ❀️ by Liu Purnomo

About

Indonesian Quotes API project

Resources

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages