Welcome! We’re excited that you’re interested in contributing to Daily GeoGame. This project is open source and welcomes contributions from developers of all skill levels.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/igorek05m/daily-geogame/llms.txt
Use this file to discover all available pages before exploring further.
Ways to contribute
There are many ways you can help improve Daily GeoGame:- Write code: Fix bugs, add new features, or improve existing functionality
- Improve documentation: Help others understand the project better
- Report bugs: Let us know when something doesn’t work as expected
- Share ideas: Suggest new features or improvements
- Test the game: Play daily and provide feedback on the experience
Development setup
Before you start contributing code, you’ll need to set up your development environment. Follow the installation guide to get Daily GeoGame running locally. Make sure you have:- Node.js 20 or higher
- pnpm installed globally
- MongoDB Atlas connection string (for database access)
Project structure
Daily GeoGame uses Next.js 15 App Router. Here’s how the codebase is organized:Project structure overview
Project structure overview
Key directories
app/api/: Server-side API routes that handle game logic, data fetching, and statisticsapp/components/: Reusable React components for the UIapp/hooks/: Custom hooks likeuseDailyGamefor game state managementapp/lib/: Utility functions for geography calculations, data processing, and database access
Code style guidelines
Daily GeoGame follows standard TypeScript and React best practices:TypeScript
- Write type-safe code using TypeScript
- Define types in
app/types.tsor co-locate them with components - Avoid using
anyunless absolutely necessary (disabled in ESLint config) - Use interfaces for object shapes and types for unions/primitives
React and Next.js
- Use React 19 features and modern patterns
- Prefer function components with hooks
- Use Next.js App Router conventions (server components by default)
- Keep components focused and single-purpose
- Use
'use client'directive only when necessary
ESLint
The project uses ESLint with Next.js configuration. Run the linter before committing:next/core-web-vitals and next/typescript with these custom rules:
@typescript-eslint/no-explicit-any: offreact/no-unescaped-entities: offno-var: off
File naming
- Components: PascalCase (e.g.,
GameHeader.tsx) - Utilities: camelCase (e.g.,
geoUtils.ts) - Hooks: camelCase with
useprefix (e.g.,useDailyGame.ts) - API routes: lowercase (e.g.,
route.ts)
Pull request process
Follow these steps to submit your contribution:Create a branch
Create a new branch for your changes:Use descriptive branch names:
feature/for new featuresfix/for bug fixesdocs/for documentationrefactor/for code refactoring
Make your changes
Write your code, following the style guidelines above. Test your changes locally:Ensure the build passes:
Commit message conventions
Use clear, descriptive commit messages that explain what changed and why. Follow this format:Commit types
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changes (formatting, spacing)refactor: Code refactoring without changing behaviorperf: Performance improvementstest: Adding or updating testschore: Maintenance tasks, dependencies
Examples
Issue reporting guidelines
Found a bug or have a suggestion? Here’s how to report it effectively:Bug reports
When reporting a bug, include:- Clear description: What went wrong?
- Steps to reproduce: How can we see the bug?
- Expected behavior: What should have happened?
- Actual behavior: What actually happened?
- Environment: Browser, OS, device type
- Screenshots: If applicable
Feature requests
When suggesting a feature, explain:- The problem: What need does this address?
- Your solution: How would this feature work?
- Alternatives: What other approaches did you consider?
- Examples: Are there similar features elsewhere?
Where to report
Open an issue on GitHub: github.com/igorek05m/daily-geogame/issuesCode of conduct
We’re committed to providing a welcoming and inclusive environment. When contributing:- Be respectful and considerate
- Welcome newcomers and help them learn
- Focus on constructive feedback
- Assume good intentions
- Respect differing opinions and experiences
License
By contributing to Daily GeoGame, you agree that your contributions will be licensed under the MIT License. This means:- Your code can be freely used, modified, and distributed
- You retain copyright to your contributions
- The project can continue to be open source
Thank you for contributing to Daily GeoGame! Your help makes this project better for everyone.