An open API service indexing awesome lists of open source software.

https://github.com/yassercoder/wheel-of-luck

Wheel of luck is a web app where users can enter text or image-based entries and spin the wheel to randomly select a winner. Build with React + Typescript
https://github.com/yassercoder/wheel-of-luck

compound-components context-api css-modules hooks integration-testing react react-testing-library typescript unit-testing usereducer vite vitest

Last synced: 4 months ago
JSON representation

Wheel of luck is a web app where users can enter text or image-based entries and spin the wheel to randomly select a winner. Build with React + Typescript

Awesome Lists containing this project

README

          

# ๐ŸŽก Wheel of Luck

A modern and customizable **Wheel of Luck** app inspired by [wheelofnames.com](https://wheelofnames.com/), built with **Vite**, **React**, and **TypeScript**. Users can enter text or image-based entries and spin the wheel to randomly select a winner!

## ๐Ÿ“ธ Live Demo

A live version of the app is available here: **๐Ÿ‘‰ [Live Demo](https://wheel-of-luck-beta.vercel.app)**

## โœจ Features

- ๐ŸŽฐ **Random Winner Selection** โ€“ Enter names or images and spin to pick a winner.
- ๐ŸŽจ **Customizable Wheel Colors** โ€“ Choose a theme color or set individual slice colors.
- ๐ŸŒ‘ **Dark / Light Mode** โ€“ Seamless theme switching.
- ๐Ÿ’พ **Save & Load Entries** โ€“ Store your list and retrieve it later.
- ๐Ÿงฉ **Drag & Drop Sorting** โ€“ Reorder entries easily with drag-and-drop (via `SortableJS`).
- ๐Ÿ’ฌ **Sweet Alerts** โ€“ Smooth interactions with `SweetAlert2`.
- ๐Ÿ”„ **Flexible Entry Types** โ€“ Support for both **text** and **image** entries.
- โš™๏ธ **Modern React Patterns** โ€“ Includes:
- Custom Hooks
- Compound Components
- Context API + useReducer

## ๐Ÿ›  Tech Stack

- **Frontend**: [Vite](https://vitejs.dev/), [React](https://reactjs.org/), [TypeScript](https://www.typescriptlang.org/)
- **Testing**: [Vitest](https://vitest.dev/) + [React Testing Library](https://testing-library.com/docs/react-testing-library/intro/)
- **Styling & Interaction**:
- [react-icons](https://react-icons.github.io/react-icons/)
- [sweetalert2](https://sweetalert2.github.io/)
- [sortablejs](https://github.com/SortableJS/Sortable)

## ๐Ÿงช Testing

This project includes **unit and integration tests** using:

- `React Testing Library` for component behavior
- `Vitest` for test runner and assertions

Run tests:

```bash
npm run test
```

## ๐Ÿš€ Getting Started

### 1. Clone the repository

```bash
git clone https://github.com/your-username/wheel-of-luck.git
cd wheel-of-luck
```

### 2. Install dependencies

```bash
npm install
```

### 3. Run the development server

```bash
npm run dev
```

## Contact

For any questions or feedback, please reach out to:

- **Yasser Laissaoui**
- **Email**: yasser.laiss01@gmail.com
- **GitHub**: [YasserCoder](https://github.com/YasserCoder)
- **LinkedIn**: [Yasser Laissaoui](https://linkedin.com/in/yasser-laissaoui)