Skip to content

Developer Setup

Oussama Elhadji edited this page Nov 7, 2026 · 1 revision

Developer Setup, Docker & CI/CD Guide ๐Ÿ› ๏ธ๐Ÿš€

๐Ÿ“‹ Prerequisites

  • Node.js: >= 20.x (tested on Node 20, 22, and 24)
  • npm: >= 10.x
  • Docker (optional, for containerized Nginx deployment)

โšก Quick Start (Local Development)

# 1. Clone the repository
git clone https://github.com/Bosaj/lkhodra.git
cd lkhodra

# 2. Install dependencies
npm install

# 3. Start the Vite development server
npm run dev

๐Ÿงช Testing, Linting & Production Build

# Run unit & component test suite (Vitest + React Testing Library)
npm run test

# Type-check and build production PWA bundle (dist/)
npm run build

# Refresh or verify botanical species images
npx tsx scripts/fetch-all-produce-images.ts

๐Ÿณ Docker & Nginx Production Deployment

LKHODRA includes a multi-stage Dockerfile, docker-compose.yml, and hardened nginx.conf with gzip compression, immutable asset caching, and SPA fallback routing:

# Build and launch container on port 8080
docker compose up --build -d

๐Ÿ”„ GitHub Actions CI/CD Workflows (.github/workflows/)

  • ci.yml: Automated TypeScript compilation check, Vitest unit test run, and production Vite PWA build on every push and pull request.
  • codeql.yml: GitHub CodeQL static security analysis for JavaScript/TypeScript.
  • deploy-pages.yml: Automated deployment to GitHub Pages on pushes to main.
  • release.yml: Automated release tagging and bundle archiving.

Clone this wiki locally