Skip to content

Commit

Permalink
doc: 📝 (README) create document
Browse files Browse the repository at this point in the history
  • Loading branch information
koutyuke committed Oct 21, 2024
1 parent b70263a commit d44c8d4
Showing 1 changed file with 75 additions and 48 deletions.
123 changes: 75 additions & 48 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,81 +1,108 @@
# Turborepo starter
<img src="https://github.com/user-attachments/assets/dd71116e-4799-47e5-a3de-73384f564ef2" width="100%" height="auto" />

This is an official starter Turborepo.
# mona-ca

## Using this example
mona-ca is an Application that shares information about a girl's period with her partner.

Run the following command:
## What's inside?

```sh
npx create-turbo@latest
```
The project uses a mono-repo structure, with the main functions and modules organized in the following directories

## What's inside?
### `📱 apps` - application directory

This Turborepo includes the following packages/apps:
- `🌐 web`: It contains the source code associated with the web application.
- `📱 mobile`: It contains the source code associated with the mobile application.
- `🖥️ api`: It contains the source code associated with the API server.

### Apps and Packages
### `📦 packages` - package directory

- `docs`: a [Next.js](https://nextjs.org/) app
- `web`: another [Next.js](https://nextjs.org/) app
- `@repo/ui`: a stub React component library shared by both `web` and `docs` applications
- `@repo/eslint-config`: `eslint` configurations (includes `eslint-config-next` and `eslint-config-prettier`)
- `@repo/typescript-config`: `tsconfig.json`s used throughout the monorepo
It includes packages and libraries that will be reused throughout the project.

Each package/app is 100% [TypeScript](https://www.typescriptlang.org/).
- `⚙️ core`: It includes common packages related to business logic and data processing.
- `🎨 ui`: It includes common packages related to UI components and styling.

### Utilities
### `🛠️ tools` - tool directory

This Turborepo has some additional tools already setup for you:
It includes tools and settings related to development and operation.

- [TypeScript](https://www.typescriptlang.org/) for static type checking
- [ESLint](https://eslint.org/) for code linting
- [Prettier](https://prettier.io) for code formatting

### Build
## Setup the Development Environment

To build all apps and packages, run the following command:
### 1. clone git repository

```
cd my-turborepo
pnpm build
```sh
git clone https://github.com/koutyuke/mona-ca.git && cd mona-ca
```

### Develop
### 2. install runtime & package manager

To develop all apps and packages, run the following command:
We use [proto](https://moonrepo.dev/proto) as a version control tool.

```
cd my-turborepo
pnpm dev
```sh
proto use
```

### Remote Caching
### 3. set environment variables

Turborepo can use a technique known as [Remote Caching](https://turbo.build/repo/docs/core-concepts/remote-caching) to share cache artifacts across machines, enabling you to share build caches with your team and CI/CD pipelines.
See `.env.example` for each application

By default, Turborepo will cache locally. To enable Remote Caching you will need an account with Vercel. If you don't have an account you can [create one](https://vercel.com/signup), then enter the following commands:
### 4. install dependencies

```sh
bun i
```
cd my-turborepo
npx turbo login

### 5. set git hook

```sh
bunx lefthook install
```

This will authenticate the Turborepo CLI with your [Vercel account](https://vercel.com/docs/concepts/personal-accounts/overview).
## Development Tool Commands

Next, you can link your Turborepo to your Remote Cache by running the following command from the root of your Turborepo:
Perform various checks on all files.

```sh
# build
bun run build

# static code check(lint, fmt, imports)
bun run check

# static code check(lint, fmt, imports) & fix
bun run check:fix

# type check
bun run typecheck

# test
bun run test

# Other
# See `scripts` field in `package.json`
```
npx turbo link
```

## Useful Links
## CI in the local environment

Perform CI performed by Github Action in a local environment

Install [`act`](https://github.com/nektos/act) and Start `Docker`

```sh
# all CI
bun run ci

# app-build
bun run ci:app-build

# app-test
bun run ci:app-test

# app-static-check
bun run ci:app-static-check
```

Learn more about the power of Turborepo:
## Note

- [Tasks](https://turbo.build/repo/docs/core-concepts/monorepos/running-tasks)
- [Caching](https://turbo.build/repo/docs/core-concepts/caching)
- [Remote Caching](https://turbo.build/repo/docs/core-concepts/remote-caching)
- [Filtering](https://turbo.build/repo/docs/core-concepts/monorepos/filtering)
- [Configuration Options](https://turbo.build/repo/docs/reference/configuration)
- [CLI Usage](https://turbo.build/repo/docs/reference/command-line-reference)
> [!NOTE]
> Since Biome's VSCode extension does not support workspaces, all settings are rolled up and configured in root's `biome.json`.

0 comments on commit d44c8d4

Please sign in to comment.