Thank you for your interest in contributing to Geo Invaders! We welcome contributions from everyone, whether you're fixing bugs, adding features, improving documentation, or suggesting improvements.
- Node.js 20 or higher
- npm, yarn, pnpm, or bun
- Git
-
Fork the repository on GitHub
-
Clone your fork locally:
git clone https://github.com/YOUR_USERNAME/geo-invaders.git cd geo-invaders -
Add the upstream repository:
git remote add upstream https://github.com/notthebestdev/geo-invaders.git
-
Install dependencies:
npm install
-
Create a
.envfile from.env.example:cp .env.example .env
Add your MapTiler API key to the
.envfile -
Start the development server:
npm run dev
Visit http://localhost:3000 to see your local instance
git checkout -b feature/your-feature-nameUse descriptive branch names (e.g., feature/dark-mode, fix/popup-styling, docs/contributing)
-
Make your changes in the appropriate files
-
Test your changes locally (
npm run dev) -
Lint your code:
npm run lint
-
Fix any ESLint issues automatically:
npm run lint -- --fix
We follow Conventional Commits:
feat:A new featurefix:A bug fixdocs:Documentation changesstyle:Code style changes (formatting, semicolons)refactor:Code refactoring without feature or bug changesperf:Performance improvementschore:Build, dependencies, or tooling changestest:Test additions or changes
Examples:
git commit -m "feat: add dark mode toggle for map"
git commit -m "fix: resolve popup styling in dark theme"
git commit -m "docs: update README with dark mode info"-
Keep your branch up to date with upstream:
git fetch upstream git rebase upstream/dev
-
Push to your fork:
git push origin feature/your-feature-name
-
Create a Pull Request on GitHub with:
- Clear title describing your changes
- Description of what was changed and why
- Reference to any related issues (
Closes #123) - Screenshots for UI changes
- TypeScript: Enabled for type safety
- Formatting: Prettier (auto-format on save with ESLint)
- Linting: ESLint configuration in
eslint.config.mjs - CSS: Tailwind CSS for styling
src/
βββ app/
β βββ page.tsx # Main map component
β βββ layout.tsx # Root layout with theme provider
β βββ globals.css # Global styles including dark mode
βββ components/
β βββ CommandPalette.tsx # Search and command palette
β βββ Settings.tsx # Settings panel
β βββ ui/ # UI components (buttons, dialogs, etc.)
βββ lib/
βββ utils.ts # Utility functions
- Next.js 16+ - React framework with App Router
- MapLibre GL - Open-source mapping library
- MapTiler - Map tile provider
- Tailwind CSS - Utility-first CSS framework
- TypeScript - Type-safe JavaScript
- next-themes - Theme management
Run the development server and test your changes:
npm run devFor production build testing:
npm run build:local
npm run startWhen reporting bugs or suggesting features:
- Check if the issue already exists
- Provide clear, descriptive title
- Include steps to reproduce (for bugs)
- Attach screenshots if relevant
- Mention your environment (OS, browser, Node version)
- A maintainer will review your PR
- Address feedback with additional commits
- Keep the discussion focused and respectful
- Once approved, your PR will be merged
npm run buildThis creates an optimized static export with the /geo-invaders base path for GitHub Pages deployment.
We use semantic versioning and changesets. When making changes:
-
Create or update a changeset:
npm run changeset
-
Follow the prompts to document your changes
-
Changesets are automatically compiled for releases
- Open a GitHub Discussion for questions
- Check existing issues and documentation
- Reach out to maintainers in a new issue
By contributing to Geo Invaders, you agree that your contributions will be licensed under the MIT License.
Thank you for helping make Geo Invaders better! π