Skip to content

Majkan1/Cocktail-App

Repository files navigation

🍹 Cocktail Browser

A React + TypeScript app for browsing cocktails using the KNS Cocktails API by KN Solvro.

🚀 Live Demo

https://majkan1.github.io/Cocktail-App/

📸 Preview

image

🛠️ Tech Stack

  • React 18 — UI
  • TypeScript — type safety
  • React Router v6 — routing & pagination
  • KNS Cocktails API — data source (cocktails.solvro.pl)
  • CSS — custom responsive styles

📁 Project Structure

src/
├── App.tsx        # All components and logic
├── App.css        # Styles
└── main.tsx       # Entry point

⚙️ Features

  • Browse 250 cocktails fetched from the KNS API
  • Search cocktails by name in real time
  • Pagination — 5 pages, 50 cocktails each
  • Each card shows:
    • Name
    • Alcoholic / Non-alcoholic label
    • Cocktail image
    • Ingredient list
    • Favourite checkbox

📦 Installation

# Clone the repository
git clone https://github.com/Majkan1/Cocktail-App.git

# Navigate to the project folder
cd your-repo-name

# Install dependencies
npm install

# Start the development server
npm run dev

App will be available at http://localhost:5173


🌐 API

This project uses the KNS Cocktails API:

Endpoint Description
GET /api/v1/cocktails?page=N&perPage=50 Paginated list of cocktails
GET /api/v1/cocktails/{id} Single cocktail with full ingredient details

📋 Data Model

interface Ingredient {
  name: string
}

interface SingleCocktail {
  id: number
  name: string
  alcoholic: boolean
  imageUrl: string
  ingredients: Ingredient[]
}

📄 License

MIT

About

React and TypeScript cocktail browser with search, pagination, favourites, and responsive UI powered by an external API.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors