This web application is a game of cities for time. The goal of the game is to name as many real cities as possible. The application includes a game with “AI” validation of cities, animation of progress bar and display of game results.
- Validation on existing cities.
- Game rule support: cities cannot be repeated.
- Game rule support: no city names with “ъ”, "ы" and “ь” signs.
- Game rule support: each player is given 2 minutes to think.
- BONUS: Display error messages for inappropriate cities.
- React (React Router)
- TypeScript
- Tailwind CSS
To get a local copy up and running, follow these steps:
- Node.js and npm installed on your machine.
-
Clone the repository:
git clone https://github.com/eugenepokalyuk/react-personik.git cd react-personik
-
Install dependencies:
npm install
-
Start the development server:
npm start
-
Open the application:
Open your browser and navigate to
http://localhost:3000
.
src/
├── assets/
│ └── icons
├── components/
│ ├── App ── App.tsx
│ ├── GameFrame ── GameFrame.tsx
│ └── LoadingDots ── LoadingDots.tsx, LoadingDots.css
├── pages/
│ ├── GamePage ── GamePage.tsx
│ ├── ResultPage ── ResultPage.tsx
│ └── WelcomePage ── WelcomePage.tsx
├── utils/
│ ├── getLastChar.tsx
│ ├── getNextCity.tsx
│ ├── validateExistingCity.tsx
│ └── validateCityName.tsx
├── data/
│ └── cities.ts
├── index.css
└── index.tsx
src/components
: Contains common components used in the application.src/pages
: Contains page components.src/utils
: Contains utilities and validation functions.src/data
: Contains data such as a list of cities.
To build the application for production, run:
npm run build
The built files will be in the build
directory, which can be deployed to any static hosting service.