{"id":24766918,"url":"https://github.com/w-shih/ooadp-showdown-game","last_synced_at":"2026-04-08T16:32:17.962Z","repository":{"id":272014837,"uuid":"912093767","full_name":"W-Shih/OOADP-showdown-game","owner":"W-Shih","description":"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.","archived":false,"fork":false,"pushed_at":"2025-03-15T12:01:26.000Z","size":1282,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-23T18:13:50.503Z","etag":null,"topics":["ci-cd","continuous-refactoring","devops","docker","docker-compose","github-actions","iterative-development","multi-platform","nodejs","object-oriented-analysis","object-oriented-design","object-oriented-programming","ooadp","refactoring","software-design","software-development","typescript","unit-testing","vagrant"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/W-Shih.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-04T15:33:02.000Z","updated_at":"2025-03-15T12:01:30.000Z","dependencies_parsed_at":"2025-01-18T18:34:44.306Z","dependency_job_id":"268fb448-91f7-4e94-b80b-d2a3c12ba124","html_url":"https://github.com/W-Shih/OOADP-showdown-game","commit_stats":null,"previous_names":["w-shih/ooadp-showdown-game"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/W-Shih%2FOOADP-showdown-game","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/W-Shih%2FOOADP-showdown-game/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/W-Shih%2FOOADP-showdown-game/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/W-Shih%2FOOADP-showdown-game/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/W-Shih","download_url":"https://codeload.github.com/W-Shih/OOADP-showdown-game/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245144973,"owners_count":20568056,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ci-cd","continuous-refactoring","devops","docker","docker-compose","github-actions","iterative-development","multi-platform","nodejs","object-oriented-analysis","object-oriented-design","object-oriented-programming","ooadp","refactoring","software-design","software-development","typescript","unit-testing","vagrant"],"created_at":"2025-01-29T00:33:12.709Z","updated_at":"2026-04-08T16:32:17.956Z","avatar_url":"https://github.com/W-Shih.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Showdown Card Game with OOADP: Iterative Development, Continuous Refactoring, and DevOps\n\n[![CI](https://github.com/W-Shih/OOADP-showdown-game/actions/workflows/ci.yml/badge.svg)](https://github.com/W-Shih/OOADP-showdown-game/actions/workflows/ci.yml?query=branch%3Amain)\n[![Codacy code quality](https://app.codacy.com/project/badge/Grade/8e644233caca4cd9be81a73d2ce77d2b)](https://app.codacy.com/gh/W-Shih/OOADP-showdown-game/dashboard?utm_source=gh\u0026utm_medium=referral\u0026utm_content=\u0026utm_campaign=Badge_grade)\n[![Codacy test coverage](https://app.codacy.com/project/badge/Coverage/8e644233caca4cd9be81a73d2ce77d2b)](https://app.codacy.com/gh/W-Shih/OOADP-showdown-game/dashboard?utm_source=gh\u0026utm_medium=referral\u0026utm_content=\u0026utm_campaign=Badge_coverage)\n[![Codecov test coverage](https://codecov.io/gh/W-Shih/OOADP-showdown-game/branch/main/graph/badge.svg)](https://app.codecov.io/gh/W-Shih/OOADP-showdown-game/tree/main)\n\n[![CD](https://github.com/W-Shih/OOADP-showdown-game/actions/workflows/cd.yml/badge.svg)](https://github.com/W-Shih/OOADP-showdown-game/actions/workflows/cd.yml?query=branch%3Amain)\n[![Docker Image Version (tag)](https://img.shields.io/docker/v/wshih/ooadp-showdown-game/latest?label=dockerhub)](https://hub.docker.com/r/wshih/ooadp-showdown-game/tags)\n[![multi-arch images (Static Badge)](https://img.shields.io/badge/multi--arch%20images-amd64%2C%20arm64-blue)](https://hub.docker.com/r/wshih/ooadp-showdown-game/tags)\n\n[![GitHub License](https://img.shields.io/github/license/W-Shih/OOADP-showdown-game)](./LICENSE)\n\nThis 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.\n\nThe project emphasizes\n\n- **Iterative Development and Continuous Refactoring**:\n  - Following a structured cycle to continuously refine design and implementation:\n\n    \u003e **OOA -\u003e OOD -\u003e OOP -\u003e Unit tests -\u003e Refactoring**\n\n- **DevOps and CI/CD pipelines**:\n  - Leveraging **GitHub Actions workflows** to implement **Continuous Integration (CI)** and **Continuous Delivery (CD)** pipelines, enabling automated testing, integration, and deployment.\n  - These practices ensure **high code quality**, early detection of bugs, and consistency across all stages of development and delivery.\n  - Supports multi-architecture compatibility (including **amd64** and **arm64**) in the delivery artifacts.\n\n- **Practical Development Environment**:\n  - Leveraging modern tools like **Docker** and **Vagrant** to setup a realistic and efficient **Node.js** development environment.\n  - Supports **multi-architecture platforms** (including **amd64** and **arm64**) for broad compatibility.\n\n## Contents [[↑](#showdown-card-game-with-ooadp-iterative-development-continuous-refactoring-and-devops)]\n\n- [Contents \\[↑\\]](#contents-)\n- [Tech Stack \\[↑\\]](#tech-stack-)\n- [Project Objective \\[↑\\]](#project-objective-)\n- [Prerequisites \\[↑\\]](#prerequisites-)\n- [Design Documentation \\[↑\\]](#design-documentation-)\n- [DevOps and CI/CD pipelines \\[↑\\]](#devops-and-cicd-pipelines-)\n- [Quick Start \\[↑\\]](#quick-start-)\n- [Development Environment \\[↑\\]](#development-environment-)\n- [Development Commands \\[↑\\]](#development-commands-)\n- [License \\[↑\\]](#license-)\n\n## Tech Stack [[↑](#showdown-card-game-with-ooadp-iterative-development-continuous-refactoring-and-devops)]\n\n- **Programming Language**: TypeScript (Node.js)\n- **Development Tools**: Docker, Vagrant\n- **DevOps Tools**: GitHub Actions\n- **Architecture**: Multi-architecture support (amd64, arm64)\n- **Version Control**: Git\n\n---\n\n## Project Objective [[↑](#showdown-card-game-with-ooadp-iterative-development-continuous-refactoring-and-devops)]\n\n- To demonstrate the **OOA -\u003e OOD -\u003e OOP -\u003e Unit tests -\u003e Refactoring** process.\n- To illustrate the basics of software design and development cycles.\n- To highlight the importance of **DevOps** practices by:\n  - Building, testing, and delivering the project using **CI/CD pipelines** powered by **GitHub Actions**.\n  - Automating delivery workflows to improve efficiency, reduce manual errors, and **ensure code quality through rigorous automated processes**.\n  - Generating **multi-architecture artifacts/images** (e.g., **amd64**, **arm64**) to ensure compatibility across diverse platforms.\n- Offers hands-on practice with modern development tools:\n  - **Docker** and **Vagrant** for consistent and scalable environment setup across different platforms (e.g., **amd64**, **arm64**).\n  - **GitHub Actions** for implementing robust DevOps pipelines.\n\n---\n\n## Prerequisites [[↑](#showdown-card-game-with-ooadp-iterative-development-continuous-refactoring-and-devops)]\n\nBefore starting, ensure you have at least one of the following installed:\n\n\u003e **NOTE:**  \n\u003e The following versions are based on my tested environment. Lower versions may work but are not guaranteed.\n\n- Local development environment:\n  - Node.js (\u003e=18.x)\n- Docker development environment:\n  - Docker (\u003e=24.x)\n- Vagrant development environment:\n  - VirtualBox (\u003e=7.1)\n  - Vagrant (\u003e=2.4)\n\n---\n\n## Design Documentation [[↑](#showdown-card-game-with-ooadp-iterative-development-continuous-refactoring-and-devops)]\n\nThe design documents for this project can be found in the following files located in the `docs/designs` directory:\n\n### OOA - Domain Modeling\n\n- [OOA Class Diagram](docs/designs/1-OOA-ClassDiagram-Showdown-v0.0.0.png)\n\n### OOD - Design blueprint\n\n- [OOD Sequence Diagram](docs/designs/2.1-OOD-SeqDiagram-Showdown-v0.1.0.png)\n- [OOD Class Diagram](docs/designs/2.2-OOD-ClassDiagram-Showdown-v0.1.0.png)\n\n### OOP - Programming\n\n- [OOP Class Diagram](docs/designs/3.1-OOP-SeqDiagram-Showdown-v1.0.0.png)\n- [OOP Sequence Diagram](docs/designs/3.2-OOP-ClassDiagram-Showdown-v1.0.0.png)\n\nThese designs outline the conceptual and logical structures of the game, following the OOADP process.\n\n---\n\n## DevOps and CI/CD pipelines [[↑](#showdown-card-game-with-ooadp-iterative-development-continuous-refactoring-and-devops)]\n\nThis 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.\n\nThe CI/CD flowcharts can be found in the following files located in the `docs/devops` directory:\n\n- [CI/CD Flowchart](docs/devops/github-actions-ci-cd-flowchart.png)\n\n---\n\n## Quick Start [[↑](#showdown-card-game-with-ooadp-iterative-development-continuous-refactoring-and-devops)]\n\nYou can run the game locally, via Docker, or via Node.js and Docker.\n\n### Run the Game Locally\n\n- If you have local node.js installed, you can run the game by running the following commands:\n\n  ```bash\n  npm install\n  npm run start:dev\n  ```\n\n### Run the Game via Docker\n\n- If you have Docker installed, you can choose to run the pre-built image or build the image locally:\n\n  - Run the pre-built image (supports **amd64** and **arm64** platforms):\n\n    ```bash\n    docker container run --name showdown-card-game --rm -it wshih/ooadp-showdown-game:latest\n    ```\n\n  - Build the image tailored to your platform and run it:\n\n    ```bash\n    docker build -t showdown-card-game:latest .\n    docker container run --name showdown-card-game --rm -it ooadp-showdown-game:latest\n    ```\n\n### Run the Game via Node.js and Docker\n\n- If you have local node.js and Docker installed, you can run the game by running the following commands:\n\n  ```bash\n  npm install\n  npm run start:container\n  ```\n\n---\n\n## Development Environment [[↑](#showdown-card-game-with-ooadp-iterative-development-continuous-refactoring-and-devops)]\n\nThis project supports three development setups:\n\n### Local Development Environment\n\n- Requires Node.js (\u003e=18.x).\n\n### Docker Development Environment\n\n- Requires Docker (\u003e=24.x).\n- Supports multi-architecture platforms, including **amd64**, **arm64**, etc., based on the base image.\n- To set up the containerized development environment:\n\n  ```bash\n  docker-compose -f _dev-env/docker/docker-compose.dev-env.yml up -d\n  docker container exec -it \u003ccontainer_id or container_name\u003e bash\n  npm install\n  ```\n\n- Clean up and remove the Docker development environment by running the following commands:\n\n  ```bash\n  docker-compose -f _dev-env/docker/docker-compose.dev-env.yml down\n  ```\n\n  Then, remove the corresponding container and image.\n\n### Vagrant Development Environment\n\n- Requires VirtualBox (\u003e=7.1) and Vagrant (\u003e=2.4).\n- Supports both **amd64** and **arm64** platforms, ensuring compatibility across different hardware architectures.\n- To start the virtual machine for development:\n\n  ```bash\n  cd _dev-env/vagrant\n  vagrant up\n  vagrant ssh\n  npm install\n  ```\n\n- Clean up and remove the Vagrant development environment by running the following commands:\n\n  ```bash\n  cd _dev-env/vagrant\n  vagrant destroy\n  ```\n\n---\n\n## Development Commands [[↑](#showdown-card-game-with-ooadp-iterative-development-continuous-refactoring-and-devops)]\n\n### Run Unit Tests\n\n- Run the unit tests with coverage by running the following commands:\n\n  ```bash\n  npm run test:coverage\n  ```\n\n### Run Lint\n\n- Run the lint by running the following commands:\n\n  ```bash\n  npm run lint\n  ```\n\n### Clean Up\n\n- Clean up the environment (`node_modules`, `dist`, `coverage`) by running the following commands:\n\n  ```bash\n  npm run clean\n  ```\n\n### More Commands\n\n- See more commands in the `package.json` file.\n\n---\n\n## License [[↑](#showdown-card-game-with-ooadp-iterative-development-continuous-refactoring-and-devops)]\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fw-shih%2Fooadp-showdown-game","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fw-shih%2Fooadp-showdown-game","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fw-shih%2Fooadp-showdown-game/lists"}