Skip to content

HexaField/template-monorepo

Repository files navigation

Template Monorepo

This is a modern, full-stack TypeScript monorepo template managed with pnpm workspaces. It provides a pre-configured environment for building scalable applications with a shared core library, a SolidJS client, and an Express server.

📂 Project Structure

The monorepo is organized into the following packages:

  • packages/client: A frontend application built with SolidJS, Vite, and Tailwind CSS. It includes Storybook for component development and Playwright for end-to-end testing.
  • packages/server: A backend server built with Express. It uses tsx for fast development execution.
  • packages/core: A shared library containing common logic, types, or utilities used by both the client and server. It is bundled using Rollup.

🚀 Getting Started

Prerequisites

  • Node.js (Latest LTS recommended)
  • pnpm (Package manager)

Installation

Install all dependencies across the monorepo:

pnpm install

Development

Start the development servers for both the client and server concurrently:

pnpm dev
  • Client: http://localhost:5173 (default Vite port)
  • Server: Check console output for port (typically configured in src/index.ts)

🛠 Scripts

Run these scripts from the root directory:

Script Description
pnpm dev Starts client and server in development mode concurrently.
pnpm build Builds all packages in the workspace.
pnpm test Runs tests across all packages (Vitest & Playwright).
pnpm lint Lints code using Oxlint.
pnpm format Formats code using Oxfmt.
pnpm check Runs type checking (tsc) and linting.
pnpm prepare Sets up Husky git hooks.

🧰 Tech Stack & Tooling

Core Technologies

Frontend (packages/client)

Backend (packages/server)

  • Framework: Express
  • Runtime: tsx (TypeScript execution)

Shared (packages/core)

DevOps & Code Quality

  • Linting: Oxlint
  • Formatting: Oxfmt
  • Git Hooks: Husky & lint-staged
  • CI/CD Readiness: Scripts are optimized for CI environments (check, test, build).

⚙️ Configuration Files

  • pnpm-workspace.yaml: Defines the workspace structure.
  • .oxfmtrc.json: Oxfmt configuration.
  • tsconfig.json: Base TypeScript configuration.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors