Skip to content

cruzgiovanni/pokedex-plus

Repository files navigation

πŸš€ POKEDEX PLUS - Showcasing Advanced CI/CD Integration!

🎯 This project demonstrates a sophisticated CI/CD pipeline that automatically synchronizes releases between GitHub and Docker Hub, ensuring perfect version consistency across platforms.

🎭 The Main Feature: Seamless Release Synchronization

Pokedex Plus is more than just a full-stack application - it's a CI/CD showcase that demonstrates how to build a production-ready pipeline with:

  • Automatic version management using Semantic Release
  • GitHub releases generated from conventional commits
  • Docker Hub synchronization with the same version tags
  • Zero manual intervention required for deployments

πŸš€ The CI/CD Pipeline: The Real Star of the Show

πŸŽͺ Semantic Release: Automated Version Management

Our project showcases Semantic Release as the core of our CI/CD strategy:

  • Commit Analysis: Automatically analyzes commit messages to determine version bumps
  • Release Generation: Creates GitHub releases with detailed changelogs
  • Docker Integration: Automatically builds and pushes Docker images with matching version tags
  • Git Tagging: Manages semantic versioning (major.minor.patch) based on commit types
// release.config.js - The heart of our automation
const config = {
  branches: ["main"],
  plugins: [
    "@semantic-release/commit-analyzer",
    "@semantic-release/release-notes-generator",
    [
      "@semantic-release/git",
      {
        message:
          "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}",
      },
    ],
    "@semantic-release/github",
  ],
}

πŸ”„ How Our Pipeline Works (The Magic)

  1. Developer commits following conventional commit standards
  2. Semantic Release triggers on push to main branch
  3. Version analysis determines if a new release is needed
  4. GitHub release is automatically created with changelog
  5. Docker images are built and tagged with the same version
  6. Docker Hub receives the new images automatically

πŸ“ Commit Standards (The Foundation)

Our pipeline relies on Conventional Commits to work properly:

# These commit types trigger different version bumps:
feat: add new feature (minor version bump)
fix: resolve bug (patch version bump)
BREAKING CHANGE: breaking change (major version bump)
docs: update documentation (no version bump)
style: code formatting (no version bump)
refactor: code refactoring (no version bump)
test: add tests (no version bump)
chore: maintenance tasks (no version bump)

🐳 Docker Integration: Seamless Container Management

πŸŽͺ Backend Container

FROM node:22.18.0
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
EXPOSE 5000
CMD ["npm", "start"]

🎨 Frontend Container

FROM node:22.18.0
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
EXPOSE 3000
CMD ["npm", "start"]

🎭 Docker Compose: Orchestration

services:
  backend:
    image: eugiovannicruz/pokedex-plus-backend:latest
    container_name: backend
    environment:
      - PORT=${PORT}
      - MONGO_URI=${MONGO_URI}
    ports:
      - "5000:5000"
    networks:
      - app-network

  frontend:
    image: eugiovannicruz/pokedex-plus-frontend:latest
    container_name: frontend
    restart: always
    ports:
      - "3000:3000"
    networks:
      - app-network

networks:
  app-network:
    driver: bridge

🎯 What This Project Demonstrates

πŸš€ Advanced CI/CD Practices

  • Automated versioning without manual intervention
  • Cross-platform synchronization between GitHub and Docker Hub
  • Conventional commit enforcement for consistent development workflow
  • Zero-downtime deployments with proper versioning

🐳 Production-Ready Docker Setup

  • Multi-stage builds for optimized images
  • Environment-based configuration for different deployment stages
  • Network isolation for security
  • Health checks and restart policies

πŸ“Š Developer Experience Improvements

  • Predictable releases with semantic versioning
  • Automated changelog generation from commit history
  • Consistent deployment process across environments
  • Clear version tracking for debugging and rollbacks

πŸŽͺ Project Structure

pokedex-plus/
β”œβ”€β”€ backend/                 # Node.js + TypeScript API
β”‚   β”œβ”€β”€ src/                # Source code
β”‚   β”œβ”€β”€ Dockerfile          # Container configuration
β”‚   └── package.json        # Dependencies
β”œβ”€β”€ frontend/               # Next.js application
β”‚   └── pokedex-plus/      # React frontend
β”‚       β”œβ”€β”€ components/     # UI components
β”‚       β”œβ”€β”€ app/           # Pages and routing
β”‚       └── Dockerfile     # Frontend container
β”œβ”€β”€ docker-compose.yaml     # Multi-container orchestration
└── release.config.js       # CI/CD automation config

πŸš€ How to Experience This CI/CD Magic

🐳 Quick Start with Docker

# Clone and run the complete stack
git clone https://github.com/cruzgiovanni/pokedex-plus.git
cd pokedex-plus
docker-compose up -d

# Access the synchronized application:
# Frontend: http://localhost:3000
# Backend: http://localhost:5000

πŸ› οΈ Local Development

# Backend development
cd backend
npm install
npm run dev

# Frontend development (in another terminal)
cd frontend/pokedex-plus
npm install
npm run dev

🎭 Technologies Powering This Pipeline

  • Node.js 22.18.0 - Modern runtime environment
  • TypeScript - Type-safe development
  • Next.js - React framework with SSR
  • MongoDB - NoSQL database
  • Docker - Containerization platform
  • Semantic Release - Automated version management
  • Conventional Commits - Standardized commit format

πŸš€ The Result: Perfect Release Synchronization

πŸŽͺ What Happens Automatically

  1. Every commit to main branch is analyzed
  2. Version bump is determined by commit type
  3. GitHub release is created with changelog
  4. Docker images are built with matching tags
  5. Docker Hub receives synchronized releases
  6. Deployment can use exact version tags

🐳 Docker Hub Integration

# Our pipeline automatically handles these commands:
docker build -t eugiovannicruz/pokedex-plus-backend:v1.2.3 ./backend
docker build -t eugiovannicruz/pokedex-plus-frontend:v1.2.3 ./frontend/pokedex-plus
docker push eugiovannicruz/pokedex-plus-backend:v1.2.3
docker push eugiovannicruz/pokedex-plus-frontend:v1.2.3

The beauty: These exact same version tags (v1.2.3) appear simultaneously on both GitHub and Docker Hub, ensuring perfect synchronization.

🎭 Contributing to This CI/CD Showcase

  1. Fork the project
  2. Create a feature branch
  3. Make changes following conventional commits
  4. Test the pipeline with your changes
  5. Open a Pull Request

πŸš€ Conclusion: Why This Project Matters

This project demonstrates real-world CI/CD implementation that:

  • Eliminates manual release management
  • Ensures version consistency across platforms
  • Provides professional deployment workflow
  • Scales from development to production

The key insight: By combining Semantic Release with Docker automation, we've created a pipeline that handles the entire release cycle automatically, from commit to deployment, with perfect synchronization between GitHub and Docker Hub.


Built to showcase advanced CI/CD practices and automated release management. Perfect for teams looking to implement professional deployment workflows. πŸš€

Ready to experience the future of automated deployments? Clone this repo and see the magic happen! ✨