Skip to content

Sori678/Brain-Fit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

72 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Brain Fit โ€“ Interactive Memory Games

Brain Fit is an interactive web application designed to train short-term memory and cognitive focus through two dynamic games:

๐Ÿง  Visual Memory
๐Ÿ”ข Number Memory

Users can log in with just a name or email, track their best performances, and enjoy real-time feedback.
The project is built using HTML, CSS, and JavaScript.

Live Site:
๐Ÿ‘‰ https://sori678.github.io/Brain-Fit/

GitHub Repository:
๐Ÿ‘‰ https://github.com/Sori678/Brain-Fit


Table of Contents


Project Overview

Brain Fit challenges users to memorize patterns and numbers while tracking their best scores.
User accounts require only a name or email, and all progress is saved using LocalStorage.
The interface is lightweight, responsive, and accessible across all devices.


Strategy

The purpose of this project is to help users improve memory and concentration through short, engaging brain-training exercises.
The structure encourages repeated play and reward through progressive difficulty and score tracking.


Target Audience

  • Students wishing to improve cognitive performance
  • Users who enjoy memory games
  • Anyone looking for simple brain-training activities

User Stories

  1. As a user, I want to start a game easily so I can play without confusion.
  2. As a user, I want minimal login steps so that I can quickly begin.
  3. As a user, I want to track my best scores to monitor progress.
  4. As a user, I want immediate feedback after each round.
  5. As a user, I want the app to be responsive and accessible on all devices.

Design

Colour Scheme

  • Light, minimal background
  • Blue accent colours
  • Feedback indicators:
    • Green = correct
    • Red = wrong
    • Yellow = warning

Typography

  • Open Sans โ€“ main UI font
  • Bitcount Grid Single โ€“ digital-style headings

Layout

  • Header navigation
  • Main gameplay section
  • Scoreboard panel
  • Authentication modal
  • Footer

Wireframes / Screenshots

Home Page

Home Page desktop Home Page mobile

Visual Memory Game

Visual Memory Game desk Visual Memory Game mob

Number Memory Game

Number Memory Game desk Number Memory Game mob

Authentication Modal

Auth Modal


Features

๐ŸŽฎ Visual Memory Game

  • Highlights a random sequence of squares
  • Grid expands every 7 levels
  • User repeats the pattern
  • Lives system provides fairness
  • Top 3 scores saved via LocalStorage

๐Ÿ”ข Number Memory Game

  • Displays a number briefly
  • Each level adds more digits
  • User must type the exact number
  • Top 3 scores saved for each user

๐Ÿ” Authentication Modal

  • Requires only name or email
  • User remembered automatically (LocalStorage)

๐Ÿ† Scoreboard Panel

  • Displays top 3 scores for both games
  • Shows highest level reached
  • Highlights current user

๐Ÿ“ฑ Responsive Design

  • Works on all screen sizes
  • Fluid layout and buttons

โ™ฟ Accessibility

  • Semantic structure
  • ARIA attributes
  • Keyboard navigation support

Future Features

  • Online global leaderboard
  • Sound effects
  • Difficulty settings
  • Player avatars and profiles
  • Score export/import

Technologies Used

  • HTML5
  • CSS3
  • JavaScript (ES6)
  • LocalStorage API
  • Google Fonts
  • Font Awesome
  • Git / GitHub
  • GitHub Pages
  • W3C Validators, JSHint

Testing

Code Validation

Language Validator Result
HTML W3C Markup Validator โœ” 0 errors
CSS W3C Jigsaw โœ” 0 errors
JS JSHint โœ” no major issues

Manual Testing

Feature Expected Result Outcome
Login Modal Blocks gameplay before login โœ” Passed
Visual Memory Pattern displays correctly โœ” Passed
Number Memory Digits increase each level โœ” Passed
Scoreboard Shows top scores โœ” Passed
Reset buttons Restart level 1 โœ” Passed
Error Handling Feedback messages work โœ” Passed
Responsive Layout Functional on all devices โœ” Passed
Accessibility Works with keyboard navigation โœ” Passed

Data Model

The player data structure stored in LocalStorage:

{
  "email:john@example.com": {
    "id": "email:john@example.com",
    "name": "John",
    "records": {
      "visualMemory": { "highLevel": 7, "top": [7, 6, 5] },
      "numberMemory": { "highLevel": 5, "top": [5, 4, 3] }
    }
  }
}

Deployment

The project was deployed using GitHub Pages.

Deployment Steps

  1. Open the repo:
    https://github.com/Sori678/Brain-Fit
  2. Go to Settings > Pages
  3. Under Source, select:
    • Branch: main
    • Folder: /root
  4. Click Save
  5. GitHub generates the live link:
    https://sori678.github.io/Brain-Fit/

Running Locally

Clone the repository:

git clone https://github.com/Sori678/Brain-Fit.git

Then open index.html in your browser.


Cloning the Repository

git clone https://github.com/Sori678/Brain-Fit.git

Acknowledgements / Attribution

External resources used:

  • Google Fonts โ€“ typography
  • Font Awesome โ€“ icons
  • MDN Web Docs โ€“ documentation for JavaScript behaviour
  • StackOverflow โ€“ conceptual help (no direct code copied)
  • YouTube tutorials โ€“ inspiration for memory game mechanics (no code copied)

All HTML, CSS, and JavaScript code in this project was fully written by me.
No external code has been copied without attribution, in accordance with Code Instituteโ€™s academic integrity policy.

About

Website for visual memory training and cognitive skills development

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors