Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Palabritas is a simple jumbled word-finding game

tarrball/palabritas

Repository files navigation

Palabritas

CI - Angular Build & Coverage Live Demo Angular TypeScript NgRx

Palabritas is a word puzzle game where players unscramble words and discover all the words hidden within them. Built with Angular 20 and NgRx for state management.

🎯 How to Play

You're given a scrambled word and must:

  1. Unscramble the main word
  2. Find all possible words contained within it

For example, if your word unscrambles to "SECURE", you can also find "CURE", "SURE", "RESCUE", and more!

πŸ”€ Word Source

Words are sourced from Webster's Unabridged Dictionary (August 22, 2009) provided by Project Gutenberg. While not perfect, it provides a solid foundation for the game.

πŸš€ Getting Started

Prerequisites

  • Node.js (v18+ recommended)
  • npm (comes with Node.js)
  • Angular CLI (automatically installed with dependencies)

Installation

  1. Clone the repository

    git clone https://github.com/tarrball/palabritas.git
    cd palabritas
  2. Install dependencies

    npm install
  3. Start the development server

    npm start
  4. Open your browser to http://localhost:4200

πŸ“œ Available Scripts

Script Command Description
Development npm start Starts the development server with live reload
Build npm run build Builds the app for production
Test npm test Runs unit tests with Karma and Jasmine
Lint npm run lint Lints code using ESLint with Angular rules
Watch Build npm run watch Builds and watches for changes in development mode

Development Workflow

# Start development
npm start

# In another terminal, run tests
npm test

# Lint your code before committing
npm run lint

# Build for production
npm run build

πŸ—οΈ Architecture

Tech Stack

  • Frontend: Angular 20 with Angular Material
  • State Management: NgRx (Store, Effects, Selectors)
  • Styling: SASS with Angular Material theming
  • Testing: Jasmine + Karma with ng-mocks
  • Code Quality: ESLint with Angular and NgRx rules

Architecture Overview

Palabritas follows a clean, modular architecture built on Angular 18 best practices:

Folder Organization

The codebase uses a numbered folder structure for logical organization:

  • 1. features/ - UI components and Angular feature modules
  • 2. store/ - NgRx state management (stores, actions, effects, reducers)
  • 3. services/ - Injectable services for business logic and external APIs
  • 4. shared/ - Shared utilities, types, and test helpers

State Management

Built on NgRx for predictable state management:

  • Reactive Architecture: RxJS observables throughout the application
  • Immutable Updates: Uses Immer for safe, readable state mutations
  • Effect-driven Side Effects: Async operations and external API calls
  • Type-safe Selectors: Memoized state derivations with full TypeScript support

Persistence System

Automatic game progress saving and restoration:

  • Seamless Experience: Your game continues exactly where you left off
  • Smart Hydration: State restored on startup, falls back to new game gracefully
  • Transparent Operation: No impact on game logic or user interface

πŸ§ͺ Testing

Running Tests

# Run tests once
npm test

# Run tests with coverage
npm test -- --code-coverage

# View coverage report
open coverage/index.html

Test Coverage

Tests include:

  • Unit tests for components, services, and NgRx store
  • Mocking with ng-mocks and @faker-js/faker
  • Coverage reports generated in coverage/ directory

🀝 Contributing

Development Setup

  1. Follow the installation steps above
  2. Create a feature branch: git checkout -b feature/your-feature
  3. Make your changes following the existing patterns
  4. Run tests and linting: npm test && npm run lint
  5. Build to ensure everything works: npm run build
  6. Commit with conventional commit messages
  7. Push and create a pull request

Code Standards

  • ESLint: Configured with Angular and NgRx rules
  • TypeScript: Strict type checking enabled
  • SASS: Use kebab-case for component selectors
  • Testing: Write tests for new features and bug fixes
  • Commits: Follow Conventional Commits

Issue Templates

Use our auto issue template for feature requests and bug reports.

πŸ“ License

This project is open source. See the repository for license details.

πŸ“– Documentation

  • SEO and Metadata: docs/seo.md - Complete guide to SEO implementation, social media optimization, and structured data

πŸ”— Links

About

Palabritas is a simple jumbled word-finding game

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages