๐ป Try our DEV site at: https://sudokuru.pages.dev/
โฌ๏ธ Download our alpha ๐ฑAndroid, ๐งLinux, and ๐ชWindows app builds at: https://sudokuru.itch.io/sudokuru
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
๐ข 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.
-
Git clone this repository
-
Install Node.js
v19.5.0
or later -
Install npm
9.3.1
or later -
Run
npm i
in the root folder -
Run
pre-commit install
to setup pre-commit hooks. Pre-commit hooks can be run manually withnpm run pre-commit
, but will always run before git commit and git push if setup correctly.
- Contact Thomas to get added to the Expo organization so that you can log in with your own email and password.
- Download the expo app on your mobile device.
- On your development device, e.g., laptop, login by running:
expo login
and fill out the parameters.
- Run
npm run start
from this repositories root folder - For iOS, scan the QR code with your camera app, for Android you will need to scan the code from within the Expo app.
- For Web, hit the w key to start up the website at
localhost:8081
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
- ContactPage.tsx lets users provide us with feedback from inside the app
- 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
- LearnPage.tsx lets users select lessons to start
- Lesson.tsx lets users complete lessons
- PlayPage.tsx lets users select puzzle to play based on difficulty
- ProfilePage.tsx lets users select preferences e.g. theme
- ReleaseNotesPage.tsx lets users see what's added to the app with each version update
- StatisticsPage.tsx lets users see their Sudoku playing statistics
- SudokuPage.tsx lets users play Sudoku!
-
๐จ 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
- Run
npm run playwright:init
to install playwright dependencies - Inside of e2e/web folder, create a
.env
file in for local development based on values in.env.example
โ ๏ธ 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
- In the
sudokuru/app/Api/Puzzles.ts
file, thestartGame
function can be modified so that only a single game is used. - Replace
returnGameOfDifficulty(difficulty)
withreturnGameOfDifficulty("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 firstnovice
puzzle.
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
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.
This is the general bucket for everything that we are considering doing someday but does not fit into any of the following boards.
This is for all the tickets we are currently working. Requires an acceptance criteria to be added to the description at this stage.
This is for all the cool things we have already accomplished!