78 lines
1.7 KiB
Markdown
78 lines
1.7 KiB
Markdown
# Mintel Monorepo
|
|
|
|
This monorepo manages multiple client websites using a shared technology stack: Next.js, TypeScript, and React.
|
|
|
|
## Project Structure
|
|
|
|
- `apps/`: Client websites (e.g., `sample-website`).
|
|
- `packages/`: Shared packages under the `@mintel` namespace.
|
|
- `@mintel/tsconfig`: Shared TypeScript configurations.
|
|
- `@mintel/eslint-config`: Shared ESLint configurations.
|
|
- `@mintel/next-config`: Shared Next.js configuration wrapper.
|
|
- `@mintel/next-utils`: Reusable logic (i18n, rate limiting, etc.).
|
|
- `@mintel/infra`: Infrastructure templates (Docker, Gitea Actions).
|
|
- `@mintel/cli`: CLI tool for project setup and migration.
|
|
|
|
## Getting Started
|
|
|
|
### Prerequisites
|
|
|
|
- [pnpm](https://pnpm.io/) (v10+)
|
|
- Node.js (v20+)
|
|
|
|
### Installation
|
|
|
|
```bash
|
|
pnpm install
|
|
```
|
|
|
|
### Development
|
|
|
|
```bash
|
|
pnpm dev
|
|
```
|
|
|
|
### Building
|
|
|
|
```bash
|
|
pnpm build
|
|
```
|
|
|
|
## Creating a New Project
|
|
|
|
Use the Mintel CLI to set up a new project or migrate an existing one:
|
|
|
|
```bash
|
|
pnpm --filter @mintel/cli start init apps/my-new-website
|
|
```
|
|
|
|
## Versioning and Releasing
|
|
|
|
We use [Changesets](https://github.com/changesets/changesets) for version management.
|
|
|
|
### 1. Add a changeset
|
|
When you make a change that requires a version bump, run:
|
|
```bash
|
|
pnpm changeset
|
|
```
|
|
|
|
### 2. Version packages
|
|
To bump versions based on accumulated changesets:
|
|
```bash
|
|
pnpm version-packages
|
|
```
|
|
|
|
### 3. Publish to registry
|
|
To build and publish all changed packages to the private registry:
|
|
```bash
|
|
pnpm release
|
|
```
|
|
|
|
## Deployment
|
|
|
|
Projects are hosted on Hetzner with Docker and Traefik, deployed via Gitea Actions. See `@mintel/infra` for templates.
|
|
|
|
## Registry
|
|
|
|
Private npm registry: [https://npm.infra.mintel.me](https://npm.infra.mintel.me)
|