From 24c7fa2c22040d35231083dde70f29e7ddd4247f Mon Sep 17 00:00:00 2001 From: Bruno Tot Date: Mon, 2 Sep 2024 13:10:09 +0200 Subject: [PATCH 1/9] chore: update readme.md --- README.md | 75 +++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 53 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 2beb6831..a979b602 100644 --- a/README.md +++ b/README.md @@ -47,32 +47,63 @@ The following [packages](https://github.com/brunotot/typescript-monorepo-starter ### GitHub repository setup -1. create your repository from [this](https://github.com/new?template_name=mern-monorepo-starter&template_owner=brunotot) template -2. configure your GitHub workflow permissions - - navigate to **Settings** / **Actions** / **General** / **Workflow permissions** - - enable setting `Read and write permissions` - - enable setting `Allow GitHub Actions to create and approve pull requests` - - save configuration -3. configure [Typedoc](https://typedoc.org/) deployment to [GitHub Pages](https://pages.github.com/) - - navigate to **Actions** / **typedoc-generator.yml** - - click on `Run workflow` button - - when typedoc finishes, make sure to do the same for all test workflows - - after all workflows finish, navigate to **Settings** / **Pages** - - select `gh-pages` branch as the deployment branch - - save configuration -4. configure GitHub CI - - navigate to **Settings** / **Branches** / **Add classic branch protection rule** - - set branch name pattern to `main` - - enable setting ✅ `Require a pull request before merging` - - disable setting ❌ `Require approvals` - - enable setting ✅ `Require status checks to pass before merging` - - enable setting ✅ `Require branches to be up to date before merging` - - select following actions as status checks: +1. **Create your repository** + Create your monorepo repository using [this template](https://github.com/new?template_name=mern-monorepo-starter&template_owner=brunotot). + +--- + +2. **Configure GitHub workflow permissions** + +
+ Enable GitHub actions to create and approve pull requests. + + - Go to **Settings** > **Actions** > **General** > **Workflow permissions**. + - Enable the following settings: + - ✅ `Read and write permissions`. + - ✅ `Allow GitHub Actions to create and approve pull requests`. + - Save changes. + +
+ +--- + +3. **Configure GitHub actions** + +
+ Run existing actions for the first time. + + - Go to **Actions** > **typedoc-generator.yml**. + - Click on the `Run workflow` button. + - Repeat the process for all `test-` prefixed workflows. + - After all workflows finish, navigate to **Settings** > **Pages**. + - Select the `gh-pages` branch as the deployment source. + - Save changes. + +
+ +--- + +4. **Configure GitHub CI** + +
+ Configure branch protection rules to prevent direct pushes to the `main` branch, require pull requests for merging, and all status checks to pass before merging. + + - Navigate to **Settings** > **Branches** > **Add classic branch protection rule**. + - Set the branch name pattern to `main`. + - Enable the following settings: + - ✅ `Require a pull request before merging` + - ✅ `Require status checks to pass before merging` + - ✅ `Require branches to be up to date before merging` + - Disable the setting: + - ❌ `Require approvals` + - Select the following workflows as required for all pull requests: - **test-app-node-express** - **test-app-vite-react** - **test-lib-commons** - **test-lib-api-client** - - save configuration + - Save the configuration. + +
### Local installation From cc78b6953e548cc252a3d251ab85698c58956a6e Mon Sep 17 00:00:00 2001 From: Bruno Tot Date: Mon, 2 Sep 2024 13:23:26 +0200 Subject: [PATCH 2/9] chore: update readme.md --- README.md | 84 +++++++++++++++++++++++++++---------------------------- 1 file changed, 41 insertions(+), 43 deletions(-) diff --git a/README.md b/README.md index a979b602..b7942d50 100644 --- a/README.md +++ b/README.md @@ -47,63 +47,61 @@ The following [packages](https://github.com/brunotot/typescript-monorepo-starter ### GitHub repository setup -1. **Create your repository** - Create your monorepo repository using [this template](https://github.com/new?template_name=mern-monorepo-starter&template_owner=brunotot). +
+1. Create your repository ---- +Create your monorepo repository using [this template](https://github.com/new?template_name=mern-monorepo-starter&template_owner=brunotot). -2. **Configure GitHub workflow permissions** +
-
- Enable GitHub actions to create and approve pull requests. +
+2. Configure GitHub permissions - - Go to **Settings** > **Actions** > **General** > **Workflow permissions**. - - Enable the following settings: - - ✅ `Read and write permissions`. - - ✅ `Allow GitHub Actions to create and approve pull requests`. - - Save changes. +Enable GitHub actions to create and approve pull requests. -
+- Go to **Settings** > **Actions** > **General** > **Workflow permissions**. +- Enable the following settings: +- ✅ `Read and write permissions`. +- ✅ `Allow GitHub Actions to create and approve pull requests`. +- Save changes. ---- +
-3. **Configure GitHub actions** +
+3. Configure GitHub actions -
- Run existing actions for the first time. +Run existing actions for the first time. - - Go to **Actions** > **typedoc-generator.yml**. - - Click on the `Run workflow` button. - - Repeat the process for all `test-` prefixed workflows. - - After all workflows finish, navigate to **Settings** > **Pages**. - - Select the `gh-pages` branch as the deployment source. - - Save changes. +- Go to **Actions** > **typedoc-generator.yml**. +- Click on the `Run workflow` button. +- Repeat the process for all `test-` prefixed workflows. +- After all workflows finish, navigate to **Settings** > **Pages**. +- Select the `gh-pages` branch as the deployment source. +- Save changes. -
+
---- +
+4. Configure GitHub ci -4. **Configure GitHub CI** +Configure branch protection rules to prevent direct pushes to the `main` branch, require pull requests for merging, and all status checks to pass before merging. -
- Configure branch protection rules to prevent direct pushes to the `main` branch, require pull requests for merging, and all status checks to pass before merging. +- Navigate to **Settings** > **Branches** > **Add classic branch protection rule**. +- Set the branch name pattern to `main`. +- Enable the following settings: + - ✅ `Require a pull request before merging` + - ✅ `Require status checks to pass before merging` + - ✅ `Require branches to be up to date before merging` +- Disable the setting: + - ❌ `Require approvals` +- Select the following workflows as required for all pull requests: + - **test-app-node-express** + - **test-app-vite-react** + - **test-lib-commons** + - **test-lib-api-client** +- Save changes. - - Navigate to **Settings** > **Branches** > **Add classic branch protection rule**. - - Set the branch name pattern to `main`. - - Enable the following settings: - - ✅ `Require a pull request before merging` - - ✅ `Require status checks to pass before merging` - - ✅ `Require branches to be up to date before merging` - - Disable the setting: - - ❌ `Require approvals` - - Select the following workflows as required for all pull requests: - - **test-app-node-express** - - **test-app-vite-react** - - **test-lib-commons** - - **test-lib-api-client** - - Save the configuration. - -
+
### Local installation From a99ddf872c87b8f7b8c840c40394d5c279543283 Mon Sep 17 00:00:00 2001 From: Bruno Tot Date: Mon, 2 Sep 2024 13:25:01 +0200 Subject: [PATCH 3/9] chore: update readme.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b7942d50..4de43f46 100644 --- a/README.md +++ b/README.md @@ -61,8 +61,8 @@ Enable GitHub actions to create and approve pull requests. - Go to **Settings** > **Actions** > **General** > **Workflow permissions**. - Enable the following settings: -- ✅ `Read and write permissions`. -- ✅ `Allow GitHub Actions to create and approve pull requests`. + - ✅ `Read and write permissions`. + - ✅ `Allow GitHub Actions to create and approve pull requests`. - Save changes. From 2e0e617b8906928c322d119afd331ac2d3fab1da Mon Sep 17 00:00:00 2001 From: Bruno Tot Date: Mon, 2 Sep 2024 13:32:39 +0200 Subject: [PATCH 4/9] chore: update readme.md --- README.md | 47 +++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 39 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 4de43f46..c8383cc3 100644 --- a/README.md +++ b/README.md @@ -47,14 +47,14 @@ The following [packages](https://github.com/brunotot/typescript-monorepo-starter ### GitHub repository setup -
+
1. Create your repository Create your monorepo repository using [this template](https://github.com/new?template_name=mern-monorepo-starter&template_owner=brunotot).
-
+
2. Configure GitHub permissions Enable GitHub actions to create and approve pull requests. @@ -67,7 +67,7 @@ Enable GitHub actions to create and approve pull requests.
-
+
3. Configure GitHub actions Run existing actions for the first time. @@ -81,7 +81,7 @@ Run existing actions for the first time.
-
+
4. Configure GitHub ci Configure branch protection rules to prevent direct pushes to the `main` branch, require pull requests for merging, and all status checks to pass before merging. @@ -105,10 +105,41 @@ Configure branch protection rules to prevent direct pushes to the `main` branch, ### Local installation -1. clone previously created repository into your local machine -2. install dependencies with `pnpm install` -3. configure `.env.development.local` variables for **app-node-express** (see env schema defined at [env.setup.ts](https://github.com/brunotot/mern-monorepo-starter/blob/main/packages/app-node-express/src/setup/env.setup.ts#L13)) -4. you can now run your **app-node-express** with `pnpm run app-node-express:dev` +
+1. Clone to local machine + +Clone previously created repository into your local machine. + +```sh +git clone https://github.com/YOUR_USER/YOUR_REPO.git +``` + +
+ +
+2. Install dependencies + +Install dependencies with `pnpm` + +```sh +pnpm install +``` + +
+ +
+3. Configure environment variables + +Configure `.env.development.local` variables for **app-node-express** (see env schema defined at [env.setup.ts](https://github.com/brunotot/mern-monorepo-starter/blob/main/packages/app-node-express/src/setup/env.setup.ts#L13)) + +
+ +
+4. Run a sample app locally + +You can now run your **app-node-express** with `pnpm run app-node-express:dev` + +
## Deploy From 7d973341186e913fc375e3d056b2e70b370714b3 Mon Sep 17 00:00:00 2001 From: Bruno Tot Date: Mon, 2 Sep 2024 13:49:37 +0200 Subject: [PATCH 5/9] chore: update readme.md --- README.md | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index c8383cc3..7655116a 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,17 @@

+## 🧐 What is `typescript-monorepo-starter`? + +`typescript-monorepo-starter` is a GitHub template designed to kickstart your next **TypeScript 5** project, offering an opinionated, ready-to-use monorepo structure that takes care of all the tricky configuration for you. + +The following [packages](https://github.com/brunotot/typescript-monorepo-starter/tree/main/packages) are implemented and at your disposal: + +- [app-node-express](https://expressjs.com/) [[TS Compiler](https://www.typescriptlang.org/), [NodeJS](https://nodejs.org/en/about), [Express API](https://expressjs.com/en/starter/hello-world.html), [MongoDB](https://www.mongodb.com/company/what-is-mongodb), [Keycloak](https://www.keycloak.org/), [Railway](https://railway.app/)] +- [app-vite-react](https://reactjs.org/) [[Vite](https://vitejs.dev/guide/why.html), [ReactJS](https://react.dev/), [Railway](https://railway.app/)] +- [lib-api-client](https://www.typescriptlang.org/) [[TS Compiler](https://www.typescriptlang.org/), [ts-rest](https://ts-rest.com/)] +- [lib-commons](https://www.typescriptlang.org/) [[TS Compiler](https://www.typescriptlang.org/)] +

MongoDB badge Express badge @@ -16,34 +27,23 @@ TOC -- [What is `typescript-monorepo-starter`?](#what-is-typescript-monorepo-starter) -- [Prerequisites](#prerequisites) -- [Installation](#installation) +- [🧐 What is `typescript-monorepo-starter`?](#-what-is-typescript-monorepo-starter) +- [🔧 Prerequisites](#-prerequisites) +- [💻 Installation](#-installation) - [GitHub repository setup](#github-repository-setup) - [Local installation](#local-installation) -- [Deploy](#deploy) +- [🚢 Deploy](#-deploy) - [Deploy with Railway](#deploy-with-railway) -- [Recommended VSCode extensions](#recommended-vscode-extensions) - -## What is `typescript-monorepo-starter`? - -`typescript-monorepo-starter` is a GitHub template designed to kickstart your next **TypeScript 5** project, offering an opinionated, ready-to-use monorepo structure that takes care of all the tricky configuration for you. - -The following [packages](https://github.com/brunotot/typescript-monorepo-starter/tree/main/packages) are implemented and at your disposal: - -- [app-node-express](https://expressjs.com/) [[TS Compiler](https://www.typescriptlang.org/), [NodeJS](https://nodejs.org/en/about), [Express API](https://expressjs.com/en/starter/hello-world.html), [MongoDB](https://www.mongodb.com/company/what-is-mongodb), [Keycloak](https://www.keycloak.org/), [Railway](https://railway.app/)] -- [app-vite-react](https://reactjs.org/) [[Vite](https://vitejs.dev/guide/why.html), [ReactJS](https://react.dev/), [Railway](https://railway.app/)] -- [lib-api-client](https://www.typescriptlang.org/) [[TS Compiler](https://www.typescriptlang.org/), [ts-rest](https://ts-rest.com/)] -- [lib-commons](https://www.typescriptlang.org/) [[TS Compiler](https://www.typescriptlang.org/)] +- [🧩 Recommended VSCode extensions](#-recommended-vscode-extensions) -## Prerequisites +## 🔧 Prerequisites - **PNPM** - **Node.js** - **Git** - **VS Code** (Optional) -## Installation +## 💻 Installation ### GitHub repository setup @@ -141,7 +141,7 @@ You can now run your **app-node-express** with `pnpm run app-node-express:dev`

-## Deploy +## 🚢 Deploy ### Deploy with Railway @@ -151,7 +151,7 @@ You can now run your **app-node-express** with `pnpm run app-node-express:dev` 4. select **`typescript-monorepo-starter`** template 5. finally, deploy changes 🚀 -## Recommended VSCode extensions +## 🧩 Recommended VSCode extensions - [Auto Import - ES6, TS, JSX, TSX](https://marketplace.visualstudio.com/items?itemName=NuclleaR.vscode-extension-auto-import) - [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) From 32f999c32b92889c7e22e18b2b60d5097bf84c6b Mon Sep 17 00:00:00 2001 From: Bruno Tot Date: Mon, 2 Sep 2024 14:20:33 +0200 Subject: [PATCH 6/9] chore: update readme.md --- README.md | 56 ++++--------------------------------------------------- 1 file changed, 4 insertions(+), 52 deletions(-) diff --git a/README.md b/README.md index 7655116a..fe6a9c60 100644 --- a/README.md +++ b/README.md @@ -47,61 +47,13 @@ TOC ### GitHub repository setup -
-1. Create your repository - -Create your monorepo repository using [this template](https://github.com/new?template_name=mern-monorepo-starter&template_owner=brunotot). +1.
Create your repositoryCreate your monorepo repository using this template.
-
- -
-2. Configure GitHub permissions +2.
Configure GitHub permissionsEnable GitHub actions to create and approve pull requests.
  • Go to Settings > Actions > General > Workflow permissions
  • Enable the following settings:
    • Read and write permissions
    • Allow GitHub Actions to create and approve pull requests
-Enable GitHub actions to create and approve pull requests. +3.
Configure GitHub actionsRun existing actions for the first time.
  • Go to Actions > typedoc-generator.yml
  • Click on the Run workflow button.
  • Repeat the process for all test- prefixed workflows.
  • After all workflows finish, navigate to Settings > Pages.
  • Select the gh-pages branch as the deployment source.
  • Save changes.
-- Go to **Settings** > **Actions** > **General** > **Workflow permissions**. -- Enable the following settings: - - ✅ `Read and write permissions`. - - ✅ `Allow GitHub Actions to create and approve pull requests`. -- Save changes. - -
- -
-3. Configure GitHub actions - -Run existing actions for the first time. - -- Go to **Actions** > **typedoc-generator.yml**. -- Click on the `Run workflow` button. -- Repeat the process for all `test-` prefixed workflows. -- After all workflows finish, navigate to **Settings** > **Pages**. -- Select the `gh-pages` branch as the deployment source. -- Save changes. - -
- -
-4. Configure GitHub ci - -Configure branch protection rules to prevent direct pushes to the `main` branch, require pull requests for merging, and all status checks to pass before merging. - -- Navigate to **Settings** > **Branches** > **Add classic branch protection rule**. -- Set the branch name pattern to `main`. -- Enable the following settings: - - ✅ `Require a pull request before merging` - - ✅ `Require status checks to pass before merging` - - ✅ `Require branches to be up to date before merging` -- Disable the setting: - - ❌ `Require approvals` -- Select the following workflows as required for all pull requests: - - **test-app-node-express** - - **test-app-vite-react** - - **test-lib-commons** - - **test-lib-api-client** -- Save changes. - -
+4.
Configure GitHub ciConfigure branch protection rules to prevent direct pushes to the main branch, require pull requests for merging, and all status checks to pass before merging.
  • Set the branch name pattern to main.
  • Enable the following settings:
    • Require a pull request before merging
    • Require status checks to pass before merging
    • Require branches to be up to date before merging
  • Disable the setting:
    • Require approvals
  • Select the following workflows as required for all pull requests:
    • test-app-node-express
    • test-app-vite-react
    • test-lib-commons
    • test-lib-api-client
  • Save changes.
### Local installation From 271457cdd70bea1e6c08e2dce117dce68ecd09c3 Mon Sep 17 00:00:00 2001 From: Bruno Tot Date: Tue, 3 Sep 2024 11:25:58 +0200 Subject: [PATCH 7/9] chore: update readme --- README.md | 40 ++++++---------------------------------- 1 file changed, 6 insertions(+), 34 deletions(-) diff --git a/README.md b/README.md index fe6a9c60..57c666ab 100644 --- a/README.md +++ b/README.md @@ -47,9 +47,9 @@ TOC ### GitHub repository setup -1.
Create your repositoryCreate your monorepo repository using this template.
+1.
Create your repository
Create your monorepo repository using this template.
-2.
Configure GitHub permissionsEnable GitHub actions to create and approve pull requests.
  • Go to Settings > Actions > General > Workflow permissions
  • Enable the following settings:
    • Read and write permissions
    • Allow GitHub Actions to create and approve pull requests
+2.
Configure GitHub permissions
Enable GitHub actions to create and approve pull requests.
  • Go to Settings > Actions > General > Workflow permissions
  • Enable the following settings:
    • Read and write permissions
    • Allow GitHub Actions to create and approve pull requests
  • Save changes.
3.
Configure GitHub actionsRun existing actions for the first time.
  • Go to Actions > typedoc-generator.yml
  • Click on the Run workflow button.
  • Repeat the process for all test- prefixed workflows.
  • After all workflows finish, navigate to Settings > Pages.
  • Select the gh-pages branch as the deployment source.
  • Save changes.
@@ -57,41 +57,13 @@ TOC ### Local installation -
-1. Clone to local machine +1.
Clone to local machine
Clone previously created repository into your local machine.
git clone https://github.com/YOUR_USER/YOUR_REPO.git

-Clone previously created repository into your local machine. +2.
Install dependencies
Install dependencies with pnpm.
pnpm install

-```sh -git clone https://github.com/YOUR_USER/YOUR_REPO.git -``` +3.
Configure environment variables
Configure .env.development.local variables for app-node-express (see env schema defined at env.setup.ts
-
- -
-2. Install dependencies - -Install dependencies with `pnpm` - -```sh -pnpm install -``` - -
- -
-3. Configure environment variables - -Configure `.env.development.local` variables for **app-node-express** (see env schema defined at [env.setup.ts](https://github.com/brunotot/mern-monorepo-starter/blob/main/packages/app-node-express/src/setup/env.setup.ts#L13)) - -
- -
-4. Run a sample app locally - -You can now run your **app-node-express** with `pnpm run app-node-express:dev` - -
+4.
Run a sample app locally
You can now run your app-node-express with:
pnpm run app-node-express:dev

## 🚢 Deploy From 3baaaa8cd803502b6208c7ffdc03f1eae5f6be33 Mon Sep 17 00:00:00 2001 From: Bruno Tot Date: Tue, 3 Sep 2024 11:43:07 +0200 Subject: [PATCH 8/9] chore: update readme --- README.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 57c666ab..880d8cf3 100644 --- a/README.md +++ b/README.md @@ -69,11 +69,13 @@ TOC ### Deploy with Railway -1. create an account on Railway [here](https://railway.app/login) -2. create a new project on Railway's dashboard and connect to your GitHub monorepo -3. within the project, select `+ Create` and choose `From Template` -4. select **`typescript-monorepo-starter`** template -5. finally, deploy changes 🚀 +1.
Create new account on Railway
You can create your Railway account here
+ +2.
Create new Railway project
Create a new project through Railway's dashboard and connect it to your GitHub monorepo
+ +3.
Import template to your Railway project
  • Within the project, select + Create and choose From Template
  • Select typescript-monorepo-starter
  • Follow through with setup (and environment variables)

+ +4.
Deploy
Deploy all project changes by clicking Deploy button 🚀
## 🧩 Recommended VSCode extensions From ba891a797875e25dd45e2f87048ad85a5952777a Mon Sep 17 00:00:00 2001 From: Bruno Tot Date: Tue, 3 Sep 2024 11:49:45 +0200 Subject: [PATCH 9/9] chore: update readme --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 880d8cf3..0ebf2b03 100644 --- a/README.md +++ b/README.md @@ -85,4 +85,3 @@ TOC - [Live Server](https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer) - [Prettier - Code formatter](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) - [Pretty TypeScript Errors](https://marketplace.visualstudio.com/items?itemName=yoavbls.pretty-ts-errors) -- [Tailwind Fold](https://marketplace.visualstudio.com/items?itemName=stivo.tailwind-fold)