Project Templates

The plugin ships 22 project templates that scaffold production-shaped ReScript apps — not just “Hello World”. Each template is a working, buildable project with modern tooling (pnpm/npm/yarn support, ESM, Vite+ where applicable, GitHub Actions CI) and documentation that answers the common day-two question: “How do I add the next thing?”

Opening the Wizard

  1. File → New → Project… in IntelliJ IDEA

  2. Select ReScript from the list on the left

  3. Pick a template and a package manager

  4. Click Create

You can also launch npm create rescript@latest from the terminal to get the same set of templates without the IDE.

Category: Basic

Basic

Minimal ReScript + Node.js starter with Args (argv parsing) and Files (node:fs/promises) modules. Useful as the smallest working reference for a non-browser ReScript project.

Node.js

Basic
npm Library

Split-module library (Index, ListUtils, Fetcher) with per-module Vitest suites and fetchWithTimeout (AbortController). Publish-ready to npm via pnpm publish.

Node.js Testing

npm Library
CLI Tool

Subcommand dispatcher (greet, init) with its own Args parser and a Commands/ directory. Demonstrates how to grow a CLI without a heavyweight framework.

Node.js

CLI Tool

Category: Frontend

Vite+ + React

Single-page React app using Vite+ with a form, useState, and a fetch('/api/greet') round-trip (offline fallback included). Includes src/Api.res as a reusable fetch wrapper.

Vite+

Vite+ + React
Next.js

App router with a Server Component (app/page.tsx), a Client Component (app/client/GreetForm.tsx), and a Route Handler (app/api/greet/route.ts). ReScript components are exposed via genType.

genType

Next.js
Electron

Desktop app with preload.cjs + contextBridge + ipcMain.handle. src/Electron.res binds the exposed electronAPI so renderer-process ReScript code can query system info.

Desktop

Electron
Tauri

Tauri 2.x desktop app pairing a Rust src-tauri/ process with a Vite+/React renderer. @rescript-tauri/core wires Core.Raw.invoke over #[tauri::command] functions; renderer-side Validation.res parses payloads with zod or sury.

Desktop Rust Validation

Tauri
React Native (Expo)

Expo-managed app with an interactive todo list (useState + TextInput + Button + FlatList). src/ReactNative.res wraps the core RN component set. Extend the bindings to add more.

Mobile

React Native (Expo)
React Native (Community CLI)

Bare-workflow React Native template aimed at Android Studio / Xcode users. Ships only the JS/TS + ReScript surface plus a metro.config.js that resolves .res.mjs; native projects are produced by @react-native-community/cli after creation.

Mobile Bare workflow

React Native (Community CLI)
TanStack Start

Type-safe full-stack React powered by TanStack Start (Vite-based). File-based routing through @tanstack/react-router and a sample Server Function written in ReScript.

Full-stack Type-safe

TanStack Start
Remix / React Router v7

React Router v7 in Framework mode (the next iteration of Remix). Loaders and components live under app/; ReScript provides both the home loader and the Greet component. SSR via @react-router/serve.

SSR Loaders / Actions

Remix / React Router v7
Astro

Content-focused SSG/SSR with React Islands. The shipped page mixes a static StaticGreeting (zero JS) with a Counter Island hydrated through client:load. Both written in ReScript.

Islands SSG/SSR

Astro
Waku

RSC-first React framework by Daishi Kato. ReScript Greet renders as a Server Component (zero JS); ReScript Counter ships through a thin TSX "use client" wrapper for the Client Component boundary.

RSC Pre-1.0

Waku

Category: Backend

Hono (REST)

Hono + Drizzle (SQLite) + Zod + @hono/zod-openapi with Scalar UI at /docs. Ships a complete users CRUD (src/Routes/Users.res), migrations via drizzle-kit, and an /openapi.json spec.

REST OpenAPI SQLite

Hono (Node.js)
Hono + GraphQL

Hono hosting graphql-yoga at /graphql with GraphiQL built in. SDL lives in src/schema.graphql, resolvers in src/Resolvers/Users.res, storage in Drizzle. Run pnpm docs:graphql for human-readable docs.

GraphQL SQLite

Hono GraphQL

Category: Serverless

Cloudflare Workers

wrangler.jsonc + a KV-backed greetings endpoint (POST/GET) using the GREETINGS binding. src/Kv.res binds the KV API so you can extend to Durable Objects or R2.

Edge

Cloudflare Workers
AWS Lambda

API Gateway-friendly handler with POST /orders (JSON body) and GET /orders/:id (path param). README includes a DynamoDB recipe using @aws-sdk/lib-dynamodb.

Serverless

AWS Lambda
Google Cloud Run

Containerized Hono service with PORT env reading, a POST /echo route, and a Dockerfile. README includes a Cloud SQL recipe via @google-cloud/cloud-sql-connector.

Containers

Google Cloud Run

Category: Full-Stack

Monorepo

pnpm/npm/yarn workspaces with packages/shared, packages/server (Hono + Drizzle), packages/client (Vite+/React). Types flow from @<project>/shared into both sides via the workspace protocol.

Workspaces Shared types

Monorepo (Hono + React)
Full-Stack

Single-package alternative to Monorepo: one package.json, src/{shared,server,client}, Hono + Drizzle backend, Vite+/React client, concurrently for dev, Vite+ proxy for /api/*.

Single package Shared types

Full-Stack (single package)
res-x (HTMX on Bun)

Server-driven web app built with rescript-x (JSX rendered on the server) and HTMX for client-side interactivity. Ships a Counter with hx-post increment/decrement endpoints and a Todo form that validates input through zod or sury. Runs on Bun + Vite.

Bun required HTMX Server-driven

res-x (HTMX on Bun)
Hono + Inertia (React)

Server-driven SPA where Hono routes call c.render(component, props) through the @hono/inertia middleware and @inertiajs/react v3 mounts matching React pages on the client. Vite+ unifies dev / build / test / check (vp dev / vp build / vp test / vp check); CSR only.

Inertia.js Server-driven Vite+

Hono + Inertia (React)

Which Template Should I Choose?

Situation

Template

I’m new to ReScript and just want to try it

Basic

I’m writing a reusable npm package

npm Library

I’m building a CLI tool

CLI Tool

I need a React SPA

Vite+ + React

I need SSR / Server Components / SEO

Next.js

I’m building a desktop app with Node-style IPC

Electron

I’m building a desktop app and want a Rust backend / small bundle

Tauri

I’m building a mobile app

React Native

I need a REST API with typed docs

Hono (REST)

I need a GraphQL API

Hono + GraphQL

I’m deploying to Cloudflare’s edge

Cloudflare Workers

I’m deploying to AWS Lambda

AWS Lambda

I’m deploying a container to GCP

Google Cloud Run

I want multiple packages sharing types (scales to more)

Monorepo

I want one package with backend + frontend (simpler)

Full-Stack

I want server-rendered HTML with HTMX on Bun

res-x (HTMX on Bun)

I want a server-driven React SPA without writing a REST/GraphQL layer

Hono + Inertia (React)

I want a type-safe full-stack React app via Vite

TanStack Start

I want SSR with the loader/action mental model

Remix / React Router v7

I’m building a content site with sprinkles of React

Astro

I’m exploring React Server Components from scratch

Waku

Tip

Each row above links to a per-template detail page covering generated layout, dependencies, key files, npm scripts, and day-two extension pointers. Use the toctree at the bottom of the page (or the “Project Templates” section in the left sidebar) to jump straight to one.

Day-Two Recipes

When you need to extend a generated project, these recipes pick up where the template README leaves off:

Notes on Vite+

The Vite+ based templates (Vite+ + React, Electron, Tauri, Hono + Inertia, Monorepo client, Full-Stack) pin vite-plus and @voidzero-dev/vite-plus-core to the 1.x line and declare vite as an npm alias of @voidzero-dev/vite-plus-core, which Vite+ requires. To fall back to classic Vite, point vite back at the regular package, replace vite-plus with vite in vite.config.mjs, and swap the vp scripts for vite.