@org

stability-wip

MERN Monorepo starter banner

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 are implemented and at your disposal:

MongoDB badge Express badge React badge NodeJS badge

TOC

  • PNPM
  • Node.js
  • Git
  • VS Code (Optional)
  1. Create your repository
    Create your monorepo repository using this template.
  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.
  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.
  1. Clone to local machine
    Clone previously created repository into your local machine.
    git clone https://github.com/YOUR_USER/YOUR_REPO.git

  2. Install dependencies
    Install dependencies with pnpm.
    pnpm install

  3. Configure environment variables
    Configure .env.development.local variables for app-node-express (see env schema defined at env.setup.ts
  4. Run a sample app locally
    You can now run your app-node-express with:
    pnpm run app-node-express:dev

  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 🚀