How akskettu-hub/full-stack-open-pokedex works
Project type and purpose
• This is primarily a single-page React frontend application (no separate backend code) that demonstrates CI/CD workflows.
• It includes:
• A React codebase (src/, public/)
• Unit tests (test/) and end-to-end tests (e2e-tests/)
• Build scripts (build_step.sh, start_step.sh)
• CI/CD pipelines implemented in GitHub Actions (.github/workflows/*.yml)
Main components
A. Developer Workstation
• Code editor & Local Git repository
• Local dev server (webpack dev server invoked by npm start)
• Local commands: install, start, test, eslint, build, start-prod
B. Source Code
• src/ folder: React components (App, PokemonList, PokemonPage, etc.) + custom hook (useApi.js) + styles.css
• public/index.html as the SPA entry point
• Configuration files: webpack.config.js, .babelrc, ESLint config
C. Test Suites
• Unit tests (test/*.jest.spec.jsx) run by Jest (npm test)
• E2E tests (e2e-tests/pokemon.spec.js) run by Playwright (playwright.config.js)
D. Build & Production
• build_step.sh produces a production-ready bundle under dist/ or build/
• start_step.sh serves the production bundle (npm run start-prod)
E. CI/CD Platform
• GitHub repository with three key workflows:
1. health_check.yml (repo health/status)
2. hello.yml (example workflow)
3. pipeline.yml (main CI/CD pipeline)
• Workflow steps: checkout → install dependencies → lint → unit tests → build → e2e tests → optionally deploy
Relationships and data flow
• Local development: Developer → (edit, commit) → Local Git → webpack dev server → Browser
• Testing: Local Git → Jest (unit) and Playwright (e2e) → pass/fail feedback
• CI pipeline: Git push → GitHub Actions (pipeline.yml)
• Step 1: actions/checkout
• Step 2: npm install
• Step 3: npm run eslint
• Step 4: npm test
• Step 5: npm run build
• Step 6: npm start-prod + Playwright e2e
• Step 7: [optional] deployment
Architectural patterns and design principles
• Component-driven UI: small reusable React components
• Separation of concerns:
• src/ for app logic, public/ for HTML shell
• test/ vs e2e-tests/ for different testing levels
• build vs dev environments controlled by webpack config
• CI as code: all workflows versioned under .github/workflows
Technologies and frameworks
• React (JSX)
• webpack (bundling & dev server)
• Babel (transpilation)
• Jest (unit testing)
• Playwright (end-to-end testing)
• ESLint (linting)
• GitHub Actions (CI/CD)