Skip to content

AllStackDev1/CLI-Game-Collection-App

Repository files navigation

๐ŸŽฎ GameHub CLI App

A terminal-based game collection application with user management, profile controls, and game menu navigation. Built for simplicity and extensibility โ€” designed to support future game implementations with a clean, user-friendly CLI experience.


๐Ÿš€ Features

  • ๐Ÿง‘ User Management

    • Sign up / Login
    • View & edit profile
    • Password updates and validations
    • Soft delete (account deactivation with restoration support)
  • ๐ŸŽฏ Game Menu

    • "Play Games" section with placeholder titles
    • Future-ready structure using OOP-based game definitions
    • Clean game selection flow with Rich CLI UI
  • ๐Ÿงฑ Architecture

    • Flat, functional menu routing
    • Modular services, repositories, and services
    • Session state management
    • Clean separation between UI, logic, and data layers

๐Ÿง‘โ€๐Ÿ’ป Tech Stack

  • Language: Python 3.10+
  • UI: Rich for enhanced terminal visuals
  • Storage: SQLite (via basic custom Database abstraction)
  • Dependency Management: Poetry
  • Architecture: Modular CLI with optional OOP layer for games

๐Ÿงฉ Folder Structure (Planned or Current)

project/
โ”‚
โ”œโ”€โ”€ app/                   # Application UI and menu flow logic
โ”‚  โ””โ”€โ”€ menu.py             # Handles main and sub-menu display and routing
โ”‚
โ”œโ”€โ”€ db/                   # Database-related components
โ”‚  โ”œโ”€โ”€ data/              # SQLite database files and backups
โ”‚  โ”œโ”€โ”€ migrations/        # SQL or Python migration scripts
โ”‚  โ”œโ”€โ”€ connection.py      # Centralized database connection logic
โ”‚  โ””โ”€โ”€ migration.py       # Migration runner and setup coordinator
โ”‚
โ”œโ”€โ”€ games/                # Game module (OOP-based architecture)
โ”‚  โ””โ”€โ”€ base.py            # BaseGame class defining shared game interface
โ”‚
โ”œโ”€โ”€ models/               # Data model representations
โ”‚  โ”œโ”€โ”€ user.py            # User model schema and helpers
โ”‚  โ””โ”€โ”€ game_session.py    # Game session model for tracking play history
โ”‚
โ”œโ”€โ”€ repositories/         # Data access layer
โ”‚  โ”œโ”€โ”€ user.py            # User repository (CRUD + lookup)
โ”‚  โ””โ”€โ”€ game_session.py    # Game session repository (insert, update, fetch)
โ”‚
โ”œโ”€โ”€ services/             # Business logic layer
โ”‚  โ”œโ”€โ”€ user.py            # Auth, profile update, and user flow handling
โ”‚  โ””โ”€โ”€ game_session.py    # Game tracking and session service functions
โ”‚
โ”œโ”€โ”€ utils/                # Utility modules for cross-cutting concerns
โ”‚  โ”œโ”€โ”€ password.py        # Password hashing and verification
โ”‚  โ”œโ”€โ”€ session.py         # Logged-in session state management
โ”‚  โ””โ”€โ”€ validation.py      # Input validation and sanitization utilities
โ”‚
โ”œโ”€โ”€ main.py                # Application entry point
โ””โ”€โ”€ README.md              # Project documentation and setup guide


๐Ÿ•น Sample Menu Flow

Main Menu:
1. Play Games
2. View My Profile
3. Edit My Profile
4. Delete My Account
5. Logout
6. Exit Application

> Games Menu:
1. Game 1 - Hangman
2. Game 2 - Number Guessing
3. Game 3 - Tic Tac Toe
4. Return to Main Menu

๐Ÿ”’ Security & UX Highlights

  • Password masking and confirmation
  • Soft deletion using deleted_at flag
  • Session clearing on logout and deletion
  • Multiple confirmation prompts for sensitive actions
  • Prevent login for deleted users

๐Ÿ”ง Setup Instructions

git clone https://github.com/yourusername/gamehub-cli.git
cd gamehub-cli

# Install dependencies using Poetry
poetry install

# Run the app in a Poetry shell
poetry shell
python main.py

๐Ÿ› ๏ธ Roadmap / TODO

  • Implement actual games (e.g., Hangman, Tic Tac Toe)
  • Save game stats (scores, play counts)
  • Leaderboard system
  • Game difficulty settings via user preferences
  • KYC verification flow (for multi-player support)
  • Migrate to text-based GUI (e.g., Textual framework)

๐Ÿ“„ License

MIT License โ€” see LICENSE for details.


๐Ÿ™Œ Acknowledgements

  • Rich by Textualize for terminal formatting
  • Inspired by classic CLI games and educational Python projects

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages