Skip to content

Sudokuru/Frontend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Sudokuru Logo

The Official Cross-Platform Frontend for our Free Open Source Sudoku Project

๐Ÿ’ป Try our DEV site at: https://sudokuru.pages.dev/

โฌ‡๏ธ Download our alpha ๐Ÿ“ฑAndroid, ๐ŸงLinux, and ๐ŸชŸWindows app builds at: https://sudokuru.itch.io/sudokuru

Pipeline Coveralls Coverage Codecov Coverage FOSSA Status CodeFactor Codacy Badge Maintainability

Sudokuru is an open-source project focused on developing a world-class, cross-platform Sudoku app. We aim to provide a delightful user experience while also contributing to the community by building a collection of reusable software modules. These modules are designed to be free, well-documented, modern, and interoperable, allowing the open source community to easily incorporate them into their own Sudoku-related projects.

This frontend module is the primary user interface for Sudokuru, providing a cross-platform Sudoku experience built with React Native Web and TypeScript. It offers a clean, intuitive design with features such as:

  • ๐ŸŽฎ Play Sudoku across 9 different difficulty levels generated by the Sudokuru Clearinghouse module
  • ๐ŸŽ“ Learn how to play Sudoku with lessons from the basics all the way to advanced strategies
  • ๐Ÿ“Š Statistics to track your progress
  • โš™๏ธ Sensible default settings for casual players with options to customize the playing experience for users with different playstyles
  • ๐Ÿ’กCustom strategy based hints from the Sudokuru npm library module
  • ๐Ÿ“… Upcoming: drills which let you practice individual strategies also powered by the Sudokuru npm library module

๐Ÿ–ฅ๏ธ Supported Platforms

Tier 1 Support

๐Ÿšข Web

Tier 2 Support

โš’๏ธ Android

โš’๏ธ Windows

โš’๏ธ Linux

Planned Support

๐Ÿ“… iOS

๐Ÿ“… MacOS

Legend

๐Ÿšข Tier 1 Support - We have full end to end test coverage for all new and existing functionality. We do manual testing of new features before deployment.

โš’๏ธ Tier 2 Support - We have partial or zero end to end test coverage for new and existing functionality. We may not always do manual testing of new features before deployment.

๐Ÿ“… Planned Support - We do not currently support this platform, but we plan on supporting in the future.

๐Ÿ› ๏ธ Local development

โš™๏ธ General Setup:

  1. Git clone this repository

  2. Install Node.js v19.5.0 or later

  3. Install npm 9.3.1 or later

  4. Run npm i in the root folder

  5. Install pre-commit hooks

  6. Run pre-commit install to setup pre-commit hooks. Pre-commit hooks can be run manually with npm run pre-commit, but will always run before git commit and git push if setup correctly.

๐Ÿ“ฒ Mobile Setup (not needed to run website):

  1. Contact Thomas to get added to the Expo organization so that you can log in with your own email and password.
  2. Download the expo app on your mobile device.
  3. On your development device, e.g., laptop, login by running: expo login and fill out the parameters.

๐Ÿƒโ€โ™‚๏ธ Running the Application Locally

  1. Run npm run start from this repositories root folder
  2. For iOS, scan the QR code with your camera app, for Android you will need to scan the code from within the Expo app.
  3. For Web, hit the w key to start up the website at localhost:8081

๐Ÿงญ Navigating the Codebase

app

๐Ÿ“‚ sudokuru/app/ is the parent folder for all the application code

  • ๐Ÿ“ก Api/ contains classes to make it easier to interact with LocalStorage state data

  • ๐Ÿ–ผ๏ธ ๏ธComponents/ contains the React components displayed on the pages

    • Contains folders to store components for various pages
    • Due to its size and complexity we'll break down SudokuBoard directory further.
      • In addition to the SudokuBoard.tsx component, SudokuBoard contains a folder of subcomponents /Components, a folder of helper functions /Functions, and a sudoku.ts file with even more helper functions.
  • โš›๏ธ Contexts/ contains the React contexts code

    • TODO: explain this folder better
  • ๐Ÿ”ข Data/ contains files filled with Sudoku puzzles to serve to the user

  • ๐Ÿ”จ Functions/ contains files of helper functions

  • ๐Ÿงญ Navigation/ contains code for Drawer navigation

  • ๐Ÿ“„ Pages/ contains the applications pages

    • AboutUsPage.tsx lets users learn more about the Sudokuru project
      • AboutUsPage Screenshot
    • ContactPage.tsx lets users provide us with feedback from inside the app
      • ContactPage Screenshot
    • DrillGame.tsx is not currently available to users
    • DrillPage.tsx is not currently available to users
    • HomePage.tsx is the users entry into the app
      • HomePage Screenshot
    • LearnPage.tsx lets users select lessons to start
      • LearnPage Screenshot
    • Lesson.tsx lets users complete lessons
      • Lesson Screenshot
    • PlayPage.tsx lets users select puzzle to play based on difficulty
      • Play Screenshot
    • ProfilePage.tsx lets users select preferences e.g. theme
      • Profile Screenshot
    • ReleaseNotesPage.tsx lets users see what's added to the app with each version update
      • ReleaseNotes Screenshot
    • StatisticsPage.tsx lets users see their Sudoku playing statistics
      • Statistics Screenshot
    • SudokuPage.tsx lets users play Sudoku!
      • Sudoku Screenshot
  • ๐ŸŽจ Styling/ contains code for theme and highlighting colors

docs

๐Ÿ“‚ docs/ is the parent folder for all the documentation

  • ๐Ÿ“ก BackendApiCalls/ contains docs to help understand how to make API calls to Sudokuru npm library
  • ๐Ÿ–ผ๏ธ Components/ contains various docs related to Sudoku logic, terminology, and highlighting
  • ๐Ÿ“œ DesignDecisions/ contains docs explaining some historical design decisions made in the apps development
  • ๐Ÿ“ธ PageScreenshots/ contains screenshots of the apps pages used as reference in this README
e2e/web
  • ๐Ÿ–ผ๏ธ components/ contains testing components to help assert things about components including the SudokuBoard itself
  • ๐Ÿ“„ page/ contains testing components to help assert things about pages
  • ๐ŸŽญ specs/ contains the actual Playwright e2e tests
  • ๐Ÿ”ข data.ts contains test Sudoku game objects
  • ๐Ÿ—๏ธ fixture.ts contains test fixtures including to automatically get things setup like navigating to a page to be tested

๐ŸŽญ Playwright E2E Tests

โš™๏ธ Setup

  1. Run npm run playwright:init to install playwright dependencies
  2. Inside of e2e/web folder, create a .env file in for local development based on values in .env.example

๐Ÿƒโ€โ™‚๏ธ Running the Tests

  • โš ๏ธ Make sure that the website is running locally (or change baseURL to match where you want to test)
  • ๐Ÿ’ป Run npm run playwright:ui to run tests using playwright ui
  • โŒจ๏ธ Run npm run playwright:test to run tests using playwright cli
  • ๐Ÿ“‹ Run npm run playwright:report to view playwright report

๐Ÿ”ง Setup to use a Single Puzzle for Debugging

  • In the sudokuru/app/Api/Puzzles.ts file, the startGame function can be modified so that only a single game is used.
  • Replace returnGameOfDifficulty(difficulty) with returnGameOfDifficulty("dev") and the dev puzzle will be retrieved.
  • The returnGameOfDifficulty function can also be modified to return a desired puzzle. By default, it returns the first novice puzzle.

๐Ÿ›ก๏ธ๐Ÿถ Run Snyk scans

The command to run a Snyk Open Source scan is npm run snyk:opensource

The command to run a Snyk code scan is npm run snyk:code

Existing issues in the main branch can be viewed here

๐Ÿ›ฃ๏ธ Roadmap

Github Project Kanban Boards

We organize our future work using the Frontend Github Project Board which we currently have divided into the following columns. We also apply labels which are documented here and work towards milestones listed here.

๐Ÿ’ก Backlog

This is the general bucket for everything that we are considering doing someday but does not fit into any of the following boards.

โš™๏ธ In development

This is for all the tickets we are currently working. Requires an acceptance criteria to be added to the description at this stage.

๐Ÿšข Shipped

This is for all the cool things we have already accomplished!

About

No description or website provided.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages