This is a game built with React Native. It is a trivia game where the user has to guess the correct country to a question.
nb. Sign in with Google doesn't work yet
- Clone the repository
- Install Node
- Install Yarn
- Install Expo Go on your phone -- optional
- Add your Google Gemini API key to your local .env file so that the game can generate hints
- Run
cd backend/StackedOverFlag/
to navigate into the backend folder - Run
npm install
to install all required packages
- Run
cd frontend/StackedOverFlag/
to navigate to the frontend project folder - Run
yarn
to install the dependencies- You may have to run
npm install ts-node typescript @types/node --save-dev
if you encounter errors related tots-node/register
- You may have to run
- Run
npx expo start
to start the development server - Respond yes to any package installation prompts
- Scan the QR code with the Expo Go app on your phone or tablet
- For this to work, you need to be on the same network as your backend. I used wihotspot to set up an access point on my Ubuntu box and gave the gateway an ip of 10.10.10.1. You are free to do the same.
- Instead of using expo go, you can use your web browser. You only need to change the baseUrl in QuestionScreen.tsx on line 42 to
http://localhost:3000/api
and change the listening ip address in server.js on line 167 to localhost by removing the 0.0.0.0. - After this you should re-run the backend server with
node server.js
, runnpx expo start
in a different terminal window, and press thew
key in the terminal to run the game in the web browser. - In the automatically opened browser window, switch to dev mode by clicking the
Toggle Developer Menu
button and switching to a mobile device view. - You can now play the game in the browser.
starting.services.mp4
full.game.mp4
rr-smaller.MP4
nb. I used the Ignite template to build this project to save time. The old README.md is in ReadMe.old.md
- leaderboard
- offline mode
- authentication
- difficulty levels
- different categories
- (maybe) monetization :-)