This is a Boggle game implemented using Next.js, allowing players to form words from adjacent letters on a grid in a timed setting. The game offers multi-language support and dynamic configuration options such as grid size and play time.
To install the necessary dependencies, run the following command:
npm installTo start the development server, use:
npm run devOpen http://localhost:3000 to see your app in the browser.
To create a production build, run:
npm run buildTo start dev server, use:
npm run devThe project is structured as follows:
boggle-main
├── src
│ ├── app
│ ├── components
│ ├── containers
│ ├── contexts
│ ├── layouts
│ ├── lib
│ ├── screens
│ ├── server
│ ├── types
│ └── utils
├── public
├── components.json
├── next.config.ts
├── package.json
├── README.md
└── tsconfig.json
- src/app: Contains main application routes and pages.
- src/components: UI components used throughout the app.
- src/containers: Container components handling complex logic and state management.
- src/contexts: React context implementations for global state management.
game-controller-context.tsx: Manages game configurations and player states.boogle-grid-context.tsx: Handles the logic for the Boggle grid.
- src/layouts: Defines page layouts.
- src/lib: Contains utility functions.
- src/server: Server-side logic for word validation.
- src/types: TypeScript type definitions.
- src/utils: Utility data or constants.
- public: Static assets.
-
Configuration Screen (RootScreen)
- Users choose game configurations: number of players, language, time per round, and grid size.
- Configurations are managed by the
GameConfigurationcomponent. - Players can add or remove participants and adjust the timer and grid settings.
-
Play Screen (PlayScreen)
- Displays the Boggle grid and a timer.
- Players trace letters to form words.
- Uses
BoogleGridandTimercomponents for gameplay mechanics.
-
Results Screen (ResultsScreen)
- Summarizes players' scores and words formed.
- Players can restart the game using the "Play Again" button.
-
GameControllerContext:
- Handles player management, game state, and configurations.
- Actions include adding/removing players, starting/ending games, and handling grid and time settings.
-
BoogleGridContext:
- Manages the Boggle grid, capturing user interactions, and tracing word paths.
- The
word-api.tsfile contains logic to validate words against a predefined list.
- The app uses Tailwind CSS for styling.
- The
globals.cssfile contains global styles and theme configurations. - The
ThemeProviderprovides dark/light theme toggling capability.
This documentation provides an overview of the Boggle game app. For further details, refer to the code within each module and directory, and explore modifying or extending the functionality as needed.
- Boggle - https://en.wikipedia.org/wiki/Boggle#Rules
- Mouse Events - https://www.w3schools.com/jsref/obj_mouseevent.asp
- Design System - https://ui.shadcn.com/
- Lucide Icons - https://lucide.dev/icons/
- ChatGPT - Contents of this Readme are written using AI.