This is my final project for Full Stack open. It is a game where you get to use your geography knowledge to try to guess a country.
Click on "new game" button in main menu, then select a country and click on "guess". Your guess will appear in the list below, along with some additional information about the country (region, population, area, etc). You need to use this info to figure out the correct answer.
If your guess is in the same region as the correct answer, the game will display a green check mark next to it (same for subregion). If the guess has larger area than the correct answer, a downward arrow will be displayed next to it (upward arrow if it's smaller). You can think of this as "the area is too high, guess lower". Same goes for population.
If your guess and the correct answer have any common neighbours or languages, they will be shown. For example if the correct answer is Germany and you guess Spain, France will be displayed in the "common neighbours" section.
git clonethis projectnpm install- fill out values in
backend/.env- change url in
frontend/.envif needed
- change url in
- set up a PostgreSQL database. Note: Postgres is required, other dialects do not work
- for development you can use a Docker container (see below)
- populate the database with country data
cd backendnpm run setup:import-country-data
- see backend's README for more info
- setup is done
npm run start-dev-envnpm run dev:backnpm run dev:front- open http://localhost:5173/ in browser
npm run buildnpm start- frontend can be accessed in
localhost:<backend_port>/ - backend can be accessed in
localhost:<backend_port>/api/
Run application in production mode. You need to build the app before running this command.
Run backend in development mode.
Run frontend in development mode.
Build application so it can be run in production mode.
Import frontend and common builds to backend.
Clear build directories.
Starts Postgres container.
See Docker documentation for more info on Docker Compose.
Stops Postgres container.
Runs backend's tests.
Runs Playwright's end-to-end tests.
Currently I'm not accepting any pull requests as this is my personal project. However, you can always open issues on GitHub if you find any bugs or would like to request a feature.
Full Stack open - for amazing course on web development
restcountries.com - for providing country data
Natural Earth - world map
SVG Repo - app icon