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

https://github.com/larsbergqvist/sudoku-app

A Sudoku app implemented with React/Redux and TypeScript
https://github.com/larsbergqvist/sudoku-app

react redux typescript

Last synced: 2 months ago
JSON representation

A Sudoku app implemented with React/Redux and TypeScript

Awesome Lists containing this project

README

          

# sudoku-app

![Build and deploy](https://github.com/larsbergqvist/sudoku-app/actions/workflows/deploy.yml/badge.svg)

App screenshot

## Project Setup
```bash
git clone https://github.com/LarsBergqvist/sudoku-app.git
cd sudoku-app
npm install
npm run dev
```

## Mock API

By default, the app uses a mock API to fetch a random sudoku puzzle with a specified difficulty level from a predefined set. The mock data is located in the `src/mocks/sudokuData.ts` file.

## Use the real API

To use the real API that generates new random puzzles for every request, you need to clone the sudoku-puzzler api (C#, NET8) and run it locally:

On mac/linux:
```bash
git clone https://github.com/LarsBergqvist/sudoku-puzzler.git
cd sudoku-puzzler
dotnet build
export ASPNETCORE_ENVIRONMENT=Development
dotnet run --project Sudoku.Web/Sudoku.Web.csproj --http_ports "5100" --https_ports "5400"
```

On Windows:
```bash
git clone https://github.com/LarsBergqvist/sudoku-puzzler.git
cd sudoku-puzzler
dotnet build
set ASPNETCORE_ENVIRONMENT=Development
dotnet run --project Sudoku.Web/Sudoku.Web.csproj --http_ports "5100" --https_ports "5400"
```

Then, modify `.env.development` in the sudoku-app project to point to the local API and set VITE_USE_MOCK_API to false.

```bash
VITE_USE_MOCK_API=false
VITE_API_URL='https://localhost:5400'
```