This repository contains the code and exercises for the TypeScript Monorepos course. The project is a seed catalog application built with Svelte, TypeScript, and Express.
git clone [email protected]:mike-north/ts-monorepos-v2.git
cd ts-monorepos-v2
This project uses Node.js version 22.16.0.
Volta is a great tool for managing node versions across different projects. Get it at https://volta.sh
You can install volta in any POSIX-compliant operating system that supports curl by running
curl https://get.volta.sh | bash
You may need to close and reopen your terminal before your can verify that your environment has volta installed
volta --version
> 2.0.2
If you have nvm (Node Version Manager) installed, you can automatically use the correct version:
nvm use
pnpm if you don't have it alreadyMake sure you have pnpm installed.
If you use volta you can just run
volta install pnpm
Alternatively you can follow pnpm's direct installation instructions
Install all project dependencies using pnpm:
pnpm install
pnpm run build # Build the project
pnpm run lint # Lint the project
pnpm run test # Test the project
dev script workspnpm run dev
pnpm run dev - Start both the server and client in development mode with hot reload
pnpm run dev-server - Start only the Express server in development mode
tsxpnpm run dev-client - Start only the Vite development server
pnpm run build - Build the project for production
dist directorypnpm run preview - Preview the production build locally
pnpm run test - Run tests once (no watch mode)
pnpm run test:watch - Run tests in watch mode
pnpm run test:ui - Run tests with Vitest UI
pnpm run test:coverage - Run tests with coverage report
pnpm run check - Run TypeScript and Svelte type checking
pnpm run lint - Run ESLint to check code quality
ts-monorepos-v2/
├── src/
│ ├── server/ # Express server code
│ ├── lib/ # Shared library code
│ ├── models/ # Data models
│ └── utils/ # Utility functions
├── tests/ # Test files
├── public/ # Static assets
├── dist/ # Build output (generated)
└── coverage/ # Test coverage reports (generated)
Start the development environment:
pnpm run dev
Run tests:
pnpm run test
Check code quality:
pnpm run lint
pnpm run check
Build for production:
pnpm run build
pnpm run preview
This repository is designed to support a hands-on TypeScript monorepos course. Throughout the course, you'll work with:
Happy coding! 🚀