GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - W-Shih/OOADP-showdown-game: A project demonstrating iterative development and continuous refactoring process of Object-Oriented Analysis, Design, Programming (OOADP), unit tests, and refactoring through a simple showdown card game with modern DevOps practices.

BranchesTags
Open more actions menu

Latest commit

 

History

109 Commits
109 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
_dev-env
_dev-env
 
 
docs
docs
 
 
scripts
scripts
 
 
src
src
 
 
tests
tests
 
 
.codacy.yml
.codacy.yml
 
 
.dockerignore
.dockerignore
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
Dockerfile
Dockerfile
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
eslint.config.mjs
eslint.config.mjs
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 
tsconfig.base.json
tsconfig.base.json
 
 
tsconfig.json
tsconfig.json
 
 

Repository files navigation

Showdown Card Game with OOADP: Iterative Development, Continuous Refactoring, and DevOps

CI Codacy code quality Codacy test coverage Codecov test coverage

CD Docker Image Version (tag) multi-arch images (Static Badge)

GitHub License

This project demonstrates the iterative development, continuous refactoring, and DevOps practices through a simple showdown card game. By combining Object-Oriented Analysis, Design, Programming (OOADP), unit tests, and refactoring with modern development tools (e.g. Docker and Vagrant) and CI/CD pipelines, it serves as a hands-on example of how to build scalable and maintainable software for real-world applications.

The project emphasizes

  • Iterative Development and Continuous Refactoring:

    • Following a structured cycle to continuously refine design and implementation:

      OOA -> OOD -> OOP -> Unit tests -> Refactoring

  • DevOps and CI/CD pipelines:

    • Leveraging GitHub Actions workflows to implement Continuous Integration (CI) and Continuous Delivery (CD) pipelines, enabling automated testing, integration, and deployment.
    • These practices ensure high code quality, early detection of bugs, and consistency across all stages of development and delivery.
    • Supports multi-architecture compatibility (including amd64 and arm64) in the delivery artifacts.
  • Practical Development Environment:

    • Leveraging modern tools like Docker and Vagrant to setup a realistic and efficient Node.js development environment.
    • Supports multi-architecture platforms (including amd64 and arm64) for broad compatibility.

Contents [↑]

  • Contents [↑]
  • Tech Stack [↑]
  • Project Objective [↑]
  • Prerequisites [↑]
  • Design Documentation [↑]
  • DevOps and CI/CD pipelines [↑]
  • Quick Start [↑]
  • Development Environment [↑]
  • Development Commands [↑]
  • License [↑]

Tech Stack [↑]

  • Programming Language: TypeScript (Node.js)
  • Development Tools: Docker, Vagrant
  • DevOps Tools: GitHub Actions
  • Architecture: Multi-architecture support (amd64, arm64)
  • Version Control: Git

Project Objective [↑]

  • To demonstrate the OOA -> OOD -> OOP -> Unit tests -> Refactoring process.
  • To illustrate the basics of software design and development cycles.
  • To highlight the importance of DevOps practices by:
    • Building, testing, and delivering the project using CI/CD pipelines powered by GitHub Actions.
    • Automating delivery workflows to improve efficiency, reduce manual errors, and ensure code quality through rigorous automated processes.
    • Generating multi-architecture artifacts/images (e.g., amd64, arm64) to ensure compatibility across diverse platforms.
  • Offers hands-on practice with modern development tools:
    • Docker and Vagrant for consistent and scalable environment setup across different platforms (e.g., amd64, arm64).
    • GitHub Actions for implementing robust DevOps pipelines.

Prerequisites [↑]

Before starting, ensure you have at least one of the following installed:

NOTE:
The following versions are based on my tested environment. Lower versions may work but are not guaranteed.

  • Local development environment:
    • Node.js (>=18.x)
  • Docker development environment:
    • Docker (>=24.x)
  • Vagrant development environment:
    • VirtualBox (>=7.1)
    • Vagrant (>=2.4)

Design Documentation [↑]

The design documents for this project can be found in the following files located in the docs/designs directory:

OOA - Domain Modeling

  • OOA Class Diagram

OOD - Design blueprint

  • OOD Sequence Diagram
  • OOD Class Diagram

OOP - Programming

  • OOP Class Diagram
  • OOP Sequence Diagram

These designs outline the conceptual and logical structures of the game, following the OOADP process.


DevOps and CI/CD pipelines [↑]

This section highlights the implementation of modern DevOps practices, focusing on the automation of testing, building, and delivery through CI/CD pipelines. These workflows ensure high efficiency, consistency, and reliability in the development lifecycle.

The CI/CD flowcharts can be found in the following files located in the docs/devops directory:

  • CI/CD Flowchart

Quick Start [↑]

You can run the game locally, via Docker, or via Node.js and Docker.

Run the Game Locally

  • If you have local node.js installed, you can run the game by running the following commands:

    npm install
    npm run start:dev

Run the Game via Docker

  • If you have Docker installed, you can choose to run the pre-built image or build the image locally:

    • Run the pre-built image (supports amd64 and arm64 platforms):

      docker container run --name showdown-card-game --rm -it wshih/ooadp-showdown-game:latest
    • Build the image tailored to your platform and run it:

      docker build -t showdown-card-game:latest .
      docker container run --name showdown-card-game --rm -it ooadp-showdown-game:latest

Run the Game via Node.js and Docker

  • If you have local node.js and Docker installed, you can run the game by running the following commands:

    npm install
    npm run start:container

Development Environment [↑]

This project supports three development setups:

Local Development Environment

  • Requires Node.js (>=18.x).

Docker Development Environment

  • Requires Docker (>=24.x).

  • Supports multi-architecture platforms, including amd64, arm64, etc., based on the base image.

  • To set up the containerized development environment:

    docker-compose -f _dev-env/docker/docker-compose.dev-env.yml up -d
    docker container exec -it <container_id or container_name> bash
    npm install
  • Clean up and remove the Docker development environment by running the following commands:

    docker-compose -f _dev-env/docker/docker-compose.dev-env.yml down

    Then, remove the corresponding container and image.

Vagrant Development Environment

  • Requires VirtualBox (>=7.1) and Vagrant (>=2.4).

  • Supports both amd64 and arm64 platforms, ensuring compatibility across different hardware architectures.

  • To start the virtual machine for development:

    cd _dev-env/vagrant
    vagrant up
    vagrant ssh
    npm install
  • Clean up and remove the Vagrant development environment by running the following commands:

    cd _dev-env/vagrant
    vagrant destroy

Development Commands [↑]

Run Unit Tests

  • Run the unit tests with coverage by running the following commands:

    npm run test:coverage

Run Lint

  • Run the lint by running the following commands:

    npm run lint

Clean Up

  • Clean up the environment (node_modules, dist, coverage) by running the following commands:

    npm run clean

More Commands

  • See more commands in the package.json file.

License [↑]

This project is licensed under the MIT License. See the LICENSE file for details.

About

A project demonstrating iterative development and continuous refactoring process of Object-Oriented Analysis, Design, Programming (OOADP), unit tests, and refactoring through a simple showdown card game with modern DevOps practices.

Topics

ci-cdcontinuous-refactoringdevopsdockerdocker-composegithub-actionsiterative-developmentmulti-platformnodejsobject-oriented-analysisobject-oriented-designobject-oriented-programmingooadprefactoringsoftware-designsoftware-developmenttypescriptunit-testingvagrant

Resources

Readme
MIT license
Activity

Stars

1 star

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.