Monorepo Structure
Skiff uses a Yarn workspaces monorepo structure with multiple applications and shared libraries:Environment Setup
Install Dependencies
After cloning the repository, install dependencies for all workspaces:Build Shared Libraries
Before running any application, build the shared libraries:libs workspace, which includes all shared libraries that the applications depend on.
Development Workflow
Skiff Mail Development
Available Scripts
Available Scripts
The following scripts are available in
skemail-web/package.json:yarn dev- Start development serveryarn build- Build production bundleyarn test- Run testsyarn lint- Lint codeyarn lint:fix- Fix linting issuesyarn ts- Type check TypeScriptyarn codegen- Generate GraphQL types
Running the Development Server
Running the Development Server
To start the Skiff Mail development server:The application will be available at http://localhost:4200/mail/inbox
Building for Production
Building for Production
To create a production build:This runs the following steps:
- Cleans previous builds (
build:clean) - Builds the main application (
build-main) - Packages the push service worker (
package-push-sw)
Testing
Testing
Run the test suite:For watch mode:
Skiff Calendar Development
Available Scripts
Available Scripts
The following scripts are available in
calendar-web/package.json:yarn dev- Start development serveryarn build- Build production bundleyarn test- Run testsyarn lint- Lint codeyarn lint:fix- Fix linting issuesyarn ts- Type check TypeScriptyarn codegen- Generate GraphQL typesyarn protogen- Generate Protocol Buffer types
Running the Development Server
Running the Development Server
To start the Skiff Calendar development server:
Building for Production
Building for Production
To create a production build:
Code Quality
Linting
Run ESLint to check for code quality issues:Type Checking
Run TypeScript type checking without emitting files:GraphQL Code Generation
Skiff uses GraphQL Code Generator to create TypeScript types from GraphQL schemas and operations. Generate GraphQL types:codegen.yml and generates type-safe GraphQL hooks and types.
Working with Libraries
When making changes to shared libraries in thelibs/ directory, you need to rebuild them:
Tips for Development
Hot Reload
The development server supports hot module replacement, so most changes will be reflected immediately without a full reload.
Mock Data
The local development environment uses mock data. API access may be added in the future.
Workspaces
Yarn workspaces automatically link dependencies between packages. Changes to libraries are immediately available to applications.
Parallel Testing
Tests run with limited parallelism (
--maxWorkers=2) to optimize memory usage.