A Portuguese word puzzle game inspired by Wordle, and mainly its Brazilian version, Letreco
๐ฎ Play Now โข ๐ Report Bug โข โจ Request Feature
Letrico is an interactive word puzzle game built with vanilla JavaScript, inspired by the popular game "Wordle" - or "Letreco" in Brazil. Players have 6 attempts to guess a 5-letter Portuguese word, with visual feedback provided after each guess to help narrow down the possibilities.
- ๐ค Guess the Word: Enter a valid 5-letter Portuguese word
- ๐ฉ Green: Letter is correct and in the right position
- ๐จ Yellow: Letter is in the word but in the wrong position
- โฌ Gray: Letter is not in the word
- ๐ฏ 6 Attempts: You have six chances to guess the correct word
- โ Pure Vanilla JavaScript - No frameworks or libraries (except Bootstrap for UI)
- ๐จ Beautiful UI - Clean, responsive design with smooth animations
- ๐ง๐ท Portuguese Words - Extensive dictionary of Brazilian Portuguese words
- ๐ Visual Feedback - Intuitive color-coded hints
- ๐ฑ Fully Responsive - Works seamlessly on mobile and desktop
- โก Fast Performance - Lightweight and optimized for speed
- ๐ฏ Simple Gameplay - Easy to learn, challenging to master
Try to guess today's word! Challenge your friends and see who can solve it in fewer attempts.
- HTML5 - Semantic markup structure
- CSS3 - Custom styling and animations
- JavaScript (ES6+) - Game logic and interactivity
- Bootstrap 5 - Responsive UI framework
- A modern web browser (Chrome, Firefox, Safari, Edge)
- No additional installations required!
-
Clone the repository
git clone https://github.com/adrian1715/letrico.git cd letrico -
Open in browser
Simply open
index.htmlin your web browser:# On macOS open index.html # On Linux xdg-open index.html # On Windows start index.html
-
Or use a local server (optional)
# Using Python 3 python -m http.server 8000 # Using Node.js http-server npx http-server
Then navigate to
http://localhost:8000
letrico/
โโโ index.html # Main HTML structure
โโโ style.css # Custom styles
โโโ app.js # Game logic and functionality
โโโ words.js # Portuguese word dictionary
โโโ README.md # Documentation (English)
โโโ README-ptbr.md # Documentation (Portuguese)
-
Start the Game
- Open the game in your browser
- The game automatically selects a random 5-letter word
-
Make Your Guess
- Type a valid 5-letter Portuguese word in the input field
- Click "Chutar" (Guess) or press Enter
-
Check the Feedback
- ๐ฉ Green tiles - Correct letter in correct position
- ๐จ Yellow tiles - Correct letter in wrong position
- โฌ Gray tiles - Letter not in the word
-
Win or Lose
- Guess the word correctly within 6 attempts to win!
- If you run out of attempts, the correct word will be revealed
Attempt 1: CARRO
Result: C๐จ Aโฌ R๐ฉ Rโฌ Oโฌ
Attempt 2: VERDE
Result: Vโฌ E๐จ R๐ฉ Dโฌ E๐จ
Attempt 3: CERVO
Result: C๐ฉ E๐ฉ R๐ฉ V๐ฉ O๐ฉ
โ
You Win!
- Word Validation: Checks if entered word is valid Portuguese
- Color-Coded Feedback: Visual hints after each guess
- Attempt Counter: Tracks remaining guesses
- Game State Management: Win/lose conditions and game reset
- Responsive Grid: 6 rows ร 5 columns for guesses
- Interactive Keyboard: Click or type to play
- Smooth Animations: Tile flips and color transitions
- Clean Design: Minimalist interface inspired by modern word games
- No External Dependencies (except Bootstrap for UI)
- Clean Code Architecture: Modular and maintainable
- Performance Optimized: Fast load times and smooth gameplay
- Cross-Browser Compatible: Works on all modern browsers
app.js - Core game logic
// Key functions include:
- Word selection from dictionary
- Input validation and processing
- Color-coding logic for letter feedback
- Win/lose condition checking
- Game state managementwords.js - Word database
// Contains:
- Array of valid 5-letter Portuguese words
- Used for both answer selection and input validationindex.html - Game interface
<!-- Structure includes:
- Game title and header
- 6ร5 grid for guesses
- Input field and submit button
- Win/lose message display
-->| Browser | Supported Version |
|---|---|
| Chrome | โ 90+ |
| Firefox | โ 88+ |
| Safari | โ 14+ |
| Edge | โ 90+ |
| Opera | โ 76+ |
Letrico is fully responsive and works perfectly on:
- ๐ฑ Mobile Phones (320px+)
- ๐ฑ Tablets (768px+)
- ๐ป Laptops (1024px+)
- ๐ฅ๏ธ Desktops (1440px+)
Building Letrico helped me improve my skills in:
- โ DOM Manipulation: Dynamic content updates and event handling
- โ Game Logic: State management and rule implementation
- โ CSS Animations: Smooth transitions and visual effects
- โ Responsive Design: Mobile-first approach
- โ User Experience: Intuitive interface design
- โ Vanilla JavaScript: Building complex features without frameworks
Contributions are welcome! If you have suggestions or improvements:
- Fork the project
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is open source and available under the MIT License.
Adrian Lobato
- GitHub: @adrian1715
- LinkedIn: Adrian Lobato
- Portfolio: portfolio-website-adrian-lobato.onrender.com
- Inspired by Wordle by Josh Wardle
- Built with โค๏ธ for Portuguese speakers
- Special thanks to the Brazilian Portuguese word list contributors
If you like this project, please consider giving it a โญ
I truly appreciate your support!
