Skip to content

NaviTheCoderboi/ace-map

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

4 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ—บ๏ธ Ace Map

Next.js React TypeScript License

Ace Map is an interactive map practice tool designed specifically for Class 10 CBSE students to master geographical locations through engaging, game-based learning.

โœจ Features

  • ๐ŸŽฎ Interactive Game Mode - Practice marking locations on an interactive map
  • ๐Ÿ“Š Progress Tracking - Track your score and time performance
  • ๐ŸŽฏ Multiple Difficulty Levels - Choose from High, Medium, and Low strictness modes
  • ๐Ÿ“ Category-Based Learning - Practice specific geographical categories
  • โฑ๏ธ Timer System - Challenge yourself with timed practice sessions
  • ๐ŸŽจ Dark/Light Mode - Comfortable viewing in any lighting condition
  • ๐Ÿ“ฑ Responsive Design - Works seamlessly on desktop and mobile devices
  • ๐ŸŽ‰ Results Sharing - Share your achievements with encoded result URLs

๐Ÿš€ Getting Started

Prerequisites

Before running this project, make sure you have the following installed:

  • Node.js (v18 or higher) - Download here
  • pnpm (v8 or higher) - Install with npm install -g pnpm

Installation

  1. Clone the repository
git clone https://github.com/navithecoderboi/ace-map.git
cd ace-map
  1. Install dependencies
pnpm install
  1. Run the development server
pnpm dev
  1. Open your browser

Navigate to http://localhost:3000 to see the application.

Build for Production

To create an optimized production build:

pnpm build
pnpm start

๐ŸŽฎ How to Play

  1. Start the Game - Click the "Start" button to begin
  2. Read the Location - The location name will appear at the top
  3. Mark on Map - Click on the map where you think the location is
  4. Submit - Click "Submit" to check your answer
  5. View Result - See if you were correct and move to the next location
  6. Complete & Share - Finish all locations and share your results!

๐Ÿ› ๏ธ Tech Stack

๐Ÿ“ Project Structure

ace-map/
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ app/                    # Next.js app directory
โ”‚   โ”‚   โ”œโ”€โ”€ page.tsx           # Home page with results
โ”‚   โ”‚   โ”œโ”€โ”€ layout.tsx         # Root layout
โ”‚   โ”‚   โ”œโ”€โ”€ globals.css        # Global styles
โ”‚   โ”‚   โ””โ”€โ”€ game/              # Game page
โ”‚   โ”‚       โ””โ”€โ”€ page.tsx       # Main game interface
โ”‚   โ””โ”€โ”€ lib/
โ”‚       โ”œโ”€โ”€ assets/            # SVG components and icons
โ”‚       โ”œโ”€โ”€ components/        # React components
โ”‚       โ”‚   โ”œโ”€โ”€ game/         # Game-related components
โ”‚       โ”‚   โ”‚   โ”œโ”€โ”€ Game.tsx  # Main game component
โ”‚       โ”‚   โ”‚   โ”œโ”€โ”€ GameBar.tsx # Game controls and timer
โ”‚       โ”‚   โ”‚   โ”œโ”€โ”€ Main.tsx  # Game state management
โ”‚       โ”‚   โ”‚   โ””โ”€โ”€ Pin.tsx   # Map marker component
โ”‚       โ”‚   โ”œโ”€โ”€ BgBeams.tsx   # Background effects
โ”‚       โ”‚   โ”œโ”€โ”€ Flow.tsx      # Conditional rendering
โ”‚       โ”‚   โ”œโ”€โ”€ Navbar.tsx    # Navigation component
โ”‚       โ”‚   โ”œโ”€โ”€ Result.tsx    # Results display
โ”‚       โ”‚   โ””โ”€โ”€ Start.tsx     # Game start screen
โ”‚       โ”œโ”€โ”€ hooks/            # Custom React hooks
โ”‚       โ”‚   โ”œโ”€โ”€ useIsMounted.ts
โ”‚       โ”‚   โ”œโ”€โ”€ useLocalStorage.ts
โ”‚       โ”‚   โ””โ”€โ”€ useTheme.tsx
โ”‚       โ””โ”€โ”€ utils/            # Utility functions
โ”‚           โ”œโ”€โ”€ dom.ts        # DOM utilities
โ”‚           โ”œโ”€โ”€ game.ts       # Game logic and state
โ”‚           โ””โ”€โ”€ places.ts     # Location data
โ”œโ”€โ”€ public/                   # Static assets
โ”œโ”€โ”€ biome.json               # Biome configuration
โ”œโ”€โ”€ next.config.ts           # Next.js configuration
โ”œโ”€โ”€ tailwind.config.ts       # Tailwind configuration
โ”œโ”€โ”€ tsconfig.json            # TypeScript configuration
โ””โ”€โ”€ package.json             # Project dependencies

๐Ÿค Contributing

We welcome contributions from the community! Here's how you can help:

Ways to Contribute

  • ๐Ÿ› Report Bugs - Found a bug? Open an issue
  • ๐Ÿ’ก Suggest Features - Have an idea? Share it with us!
  • ๐Ÿ“ Improve Documentation - Help make our docs better
  • ๐ŸŒ Add Locations - Contribute new geographical locations
  • ๐ŸŽจ Design Improvements - Enhance the UI/UX
  • ๐Ÿงช Write Tests - Help improve code quality

Development Workflow

  1. Fork the repository

Click the "Fork" button at the top right of the repository page.

  1. Clone your fork
git clone https://github.com/navithecoderboi/ace-map.git
cd ace-map
  1. Create a new branch
git checkout -b feature/your-feature-name
  1. Install dependencies
pnpm install
  1. Make your changes
  • Write clean, readable code
  • Follow the existing code style
  • Add comments where necessary
  • Test your changes thoroughly
  1. Run linting and formatting
pnpm lint
pnpm format
  1. Commit your changes
git add .
git commit -m "feat: add your feature description"

Follow Conventional Commits format:

  • feat: - New features
  • fix: - Bug fixes
  • docs: - Documentation changes
  • style: - Code style changes (formatting)
  • refactor: - Code refactoring
  • test: - Adding or updating tests
  • chore: - Maintenance tasks
  1. Push to your fork
git push origin feature/your-feature-name
  1. Create a Pull Request
  • Go to the original repository
  • Click "New Pull Request"
  • Select your fork and branch
  • Describe your changes clearly
  • Link any related issues

Adding New Locations

To add new geographical locations to the game:

  1. Open src/lib/utils/places.ts
  2. Add your locations to the appropriate category array:
{
    category: "Your Category",
    places: [
        {
            name: "Location Name",
            latitude: 12.3456,
            longitude: 78.9012
        },
        // Add more places...
    ]
}
  1. Ensure coordinates are accurate (use Google Maps or similar)
  2. Test the locations in the game

Code Style Guidelines

  • Use TypeScript for type safety
  • Follow React best practices and hooks guidelines
  • Use functional components with hooks
  • Keep components small and focused
  • Use meaningful variable names
  • Add JSDoc comments for complex functions
  • Prefer const over let when possible

Testing Your Changes

Before submitting a PR:

# Run development server
pnpm dev

# Check for linting errors
pnpm lint

# Build the project
pnpm build

๐Ÿ“œ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ‘จโ€๐Ÿ’ป Author

NaviTheCoderboi

๐Ÿ™ Acknowledgments

  • Built with Next.js and React
  • Maps powered by MapLibre GL
  • UI components from HeroUI
  • Inspired by the need for better geography practice tools for students

๐ŸŒŸ Show Your Support

If you find this project helpful, please consider giving it a โญ๏ธ on GitHub!


Made with โค๏ธ for CBSE Class 10 Students

About

Ace Map is a map practicing for class 10 CBSE students

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages