Skip to content

hectorromerodev/mind-games

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

53 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿง  Mind Games - Cognitive Challenge Platform

A modern, interactive web platform featuring brain-training games built with Astro, Tailwind CSS, and TypeScript. Challenge your memory, reaction time, and problem-solving skills with our growing collection of scientifically-inspired cognitive games.

Mind Games Platform

๐ŸŽฎ Featured Games

Simon Says

Test your working memory with increasingly complex sequences. Features:

  • Progressive difficulty scaling
  • Performance-based scoring system
  • Real-time feedback and statistics

Math Flow

Test your arithmetic skills with chained calculations. Features:

  • Sequential number operations
  • Multiple-choice answers with distractors
  • Visual distractions to test focus
  • Speed-based scoring system

Coming Soon

  • Memory Matrix
  • Speed Math
  • Pattern Recognition
  • Logic Puzzles

๐Ÿ—๏ธ Architecture

Modern Component System

Mind Games features a component system:

src/styles/components/
โ”œโ”€โ”€ index.css           # Main import file
โ”œโ”€โ”€ button.css          # Button system (BEM)
โ”œโ”€โ”€ game-stats.css      # Game statistics (BEM)
โ”œโ”€โ”€ glass.css           # Glass morphism effects
โ”œโ”€โ”€ game-ui.css         # Game UI components
โ”œโ”€โ”€ game-card.css       # Game card components
โ”œโ”€โ”€ navigation.css      # Navigation components
โ”œโ”€โ”€ typography.css      # Typography system
โ”œโ”€โ”€ layout.css          # Layout and grid system
โ”œโ”€โ”€ animations.css      # Animation utilities
โ””โ”€โ”€ states.css          # State management classes

Benefits:

  • ๐ŸŽฏ BEM Methodology: Professional naming conventions
  • ๐Ÿ” Easy to Find: Component-specific CSS files
  • ๐Ÿ“ˆ Maintainable: Clear separation of concerns
  • โšก Performance: Optimized imports and minimal CSS
  • ๐Ÿš€ Developer Experience: Comprehensive documentation

Tech Stack

  • Framework: Astro 5.0
  • Styling: Tailwind CSS 4.0 + Custom Component System
  • Language: TypeScript
  • Package Manager: Bun
  • Deployment: GitHub Pages

๐Ÿš€ Quick Start

# Install dependencies
bun install

# Start development server
bun dev

# Build for production
bun build

# Preview production build
bun preview

Visit http://localhost:4321 to start playing!

๐ŸŒ Live Demo

Experience Mind Games online at: https://hectorromerodev.github.io/mind-games/

The application is automatically deployed to GitHub Pages on every push to the main branch.

๐Ÿ—๏ธ Architecture

Mind Games features a modular, reusable component architecture:

  • Universal Scoring System: Consistent performance evaluation across all games
  • Standardized Components: Reusable UI elements and game layouts
  • Unified Game Options: Single button system for all interactive game elements
  • Type-Safe Game Logic: TypeScript-based game classes with inheritance
  • Responsive Design: Mobile-first approach with Tailwind CSS
  • BEM Methodology: Maintainable CSS architecture with component-based styling

๐Ÿ“Š Scoring System

All games use a standardized scoring framework that evaluates:

  • Accuracy: Precision and attention to detail
  • Speed: Reaction time and processing efficiency
  • Progression: Learning rate and adaptation
  • Consistency: Performance stability over time

Performance levels range from "Practice More" to "Outstanding Master" with detailed feedback.

๐Ÿ› ๏ธ Tech Stack

  • Framework: Astro 4.x
  • Styling: Tailwind CSS
  • Language: TypeScript
  • Runtime: Bun
  • Build: Vite (via Astro)

๐Ÿ“ Project Structure

src/
โ”œโ”€โ”€ components/
โ”‚   โ”œโ”€โ”€ game/              # Game-specific components
โ”‚   โ”‚   โ”œโ”€โ”€ BaseGame.astro       # Main game layout
โ”‚   โ”‚   โ”œโ”€โ”€ GameControls.astro   # Standard controls
โ”‚   โ”‚   โ””โ”€โ”€ GameGrid.astro       # Grid component
โ”‚   โ”œโ”€โ”€ ui/                # UI primitives
โ”‚   โ”‚   โ””โ”€โ”€ Button.astro         # Consistent buttons
โ”‚   โ”œโ”€โ”€ GameStats.astro    # Score/timer display
โ”‚   โ””โ”€โ”€ StartGame.astro    # Start screen
โ”œโ”€โ”€ layouts/               # Page layouts
โ”œโ”€โ”€ pages/                 # Routes and games
โ”œโ”€โ”€ utils/                 # Game logic and scoring
โ””โ”€โ”€ styles/               # Global styles

๐ŸŽฏ Adding New Games

  1. Create Game Class: Extend BaseGameClass for game logic
  2. Design UI: Use BaseGame.astro layout with standardized components
  3. Implement Scoring: Configure ScoreCalculator for your game type
  4. Add Navigation: Update games listing and navigation

See GAME_ARCHITECTURE.md for detailed instructions.

๐Ÿ“– Documentation

๐Ÿ“š Component System Documentation

Using Components

<!-- Buttons -->
<button class="btn btn--primary btn--lg">Play Game</button>
<button class="btn btn--start btn--xl">Start Game</button>

<!-- Game Cards -->
<div class="game-card">
  <div class="game-card__header">
    <h3 class="game-card__title">Math Challenge</h3>
  </div>
  <div class="game-card__body">
    <p class="game-card__description">Test your skills...</p>
  </div>
</div>

<!-- Game Statistics -->
<div class="game-stats">
  <div class="game-stats__card">
    <div class="game-stats__value">42</div>
    <div class="game-stats__label">Score</div>
  </div>
</div>

Component Reference

Development Guidelines

  1. Follow BEM methodology: block__element--modifier
  2. Use component-specific files: Keep styles organized
  3. Document new components: Update documentation
  4. Test thoroughly: Ensure cross-browser compatibility

๐Ÿ› ๏ธ Development

Project Structure

src/
โ”œโ”€โ”€ components/         # Reusable UI components
โ”‚   โ”œโ”€โ”€ ui/            # Basic UI elements
โ”‚   โ”œโ”€โ”€ game/          # Game-specific components
โ”‚   โ””โ”€โ”€ GameCard.astro # Game listing cards
โ”œโ”€โ”€ layouts/           # Page layouts
โ”œโ”€โ”€ pages/             # Route pages
โ”œโ”€โ”€ styles/            # CSS and component styles
โ”‚   โ””โ”€โ”€ components/    # Modular component CSS
โ”œโ”€โ”€ utils/             # Utility functions
โ””โ”€โ”€ assets/           # Static assets

Adding New Games

  1. Create game component in src/components/game/
  2. Add game page in src/pages/games/
  3. Update game listing in src/pages/games/index.astro
  4. Follow scoring system patterns
  5. Use existing UI components

CSS Architecture

  • Modular Components: Each component has its own CSS file
  • BEM Methodology: Professional naming conventions
  • Tailwind Integration: Custom components extend Tailwind
  • Performance Optimized: Tree-shaking and minimal output

๐Ÿค Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Follow the established component patterns
  4. Add appropriate tests and documentation
  5. Submit a pull request

๐Ÿ“„ License

MIT License - see LICENSE for details.


Built with โค๏ธ for cognitive enhancement and brain training.

About

A modern, interactive web platform featuring brain-training games built with Astro, Tailwind CSS, and TypeScript.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •