Skip to content

Contributing to Isekai

Thank you for your interest in contributing! Isekai Core is a monorepo built with pnpm workspaces. This guide will help you set up your development environment.

  • Node.js: Version 20+
  • pnpm: Version 9+ (npm install -g pnpm)
  • Docker: Required for running the local database and Redis.

We use a monorepo structure to share code between the API and the Worker.

  • Directoryapps/
    • Directoryisekai-frontend/ React / Vite. The user interface.
    • Directoryisekai-backend/ Express API. Handles auth, database access, and job scheduling.
    • Directoryisekai-publisher/ Background Worker. Processes queues (uploading to DA, S3 cleanup).
  • Directorypackages/
    • Directoryshared/ Shared Library. Contains Prisma schema, database client, and shared types.
  1. Clone & Install

    Terminal window
    git clone https://github.com/isekai-sh/isekai-core.git
    cd isekai-core
    pnpm install
  2. Start Infrastructure

    We provide a docker-compose.local.yml to spin up just the dependencies (Postgres & Redis) without the apps.

    Terminal window
    docker-compose -f docker-compose.yml up -d postgres redis
  3. Environment Variables

    You need to set up .env files for each workspace. We have a helper script, or you can copy them manually:

    Terminal window
    cp apps/isekai-backend/.env.example apps/isekai-backend/.env
    cp apps/isekai-frontend/.env.example apps/isekai-frontend/.env
    cp apps/isekai-publisher/.env.example apps/isekai-publisher/.env
    cp packages/shared/.env.example packages/shared/.env
  4. Database Setup

    Push the schema to your local Docker Postgres instance:

    Terminal window
    pnpm db:migrate
  5. Start Development Servers

    This command starts the Frontend, Backend, and Publisher in parallel with hot-reloading.

    Terminal window
    pnpm dev

    The app will be available at http://localhost:3000.

  • pnpm build: Build all apps and packages.
  • pnpm lint: Run ESLint across the monorepo.
  • pnpm test: Run Vitest unit tests.
  • pnpm db:studio: Open Prisma Studio to view/edit database records manually.