chore: prepare first release 1.0.1
Some checks failed
Code Quality / lint-and-build (push) Failing after 25s
Release Packages / release (push) Failing after 40s

This commit is contained in:
2026-02-01 01:01:16 +01:00
parent 9a0900e3ff
commit c0a739867f
23 changed files with 432 additions and 217 deletions

View File

@@ -1,77 +1,82 @@
# Mintel Monorepo
This monorepo manages multiple client websites using a shared technology stack: Next.js, TypeScript, and React.
This monorepo is the central "factory" for all Mintel client websites. It provides a standardized, versioned core of configurations, utilities, and infrastructure templates to ensure consistency, security, and rapid deployment across the entire portfolio.
## Project Structure
## 🏗 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.
- **`apps/`**: Client website implementations (e.g., `sample-website`). These are consumers of the shared packages.
- **`packages/`**: Shared, versioned npm packages under the `@mintel` namespace.
- [`@mintel/tsconfig`](packages/tsconfig/README.md): Centralized TypeScript configurations.
- [`@mintel/eslint-config`](packages/eslint-config/README.md): Shared linting rules and best practices.
- [`@mintel/next-config`](packages/next-config/README.md): A powerful Next.js configuration wrapper with built-in i18n and Sentry support.
- [`@mintel/next-utils`](packages/next-utils/README.md): Reusable logic for i18n, environment validation, and rate limiting.
- [`@mintel/infra`](packages/infra/README.md): Production-ready Docker and Gitea Actions templates.
- [`@mintel/cli`](packages/cli/README.md): Automation tool for scaffolding new projects.
## Getting Started
## 🚀 Getting Started
### Prerequisites
- [pnpm](https://pnpm.io/) (v10+)
- Node.js (v20+)
- Access to the private registry: `https://npm.infra.mintel.me`
### Installation
```bash
pnpm install
```
### Development
To run development mode for all shared packages:
```bash
pnpm dev
```
### Building
To build all shared packages:
```bash
pnpm build
```
## Creating a New Project
## 🛠 Creating a New Client Project
Use the Mintel CLI to set up a new project or migrate an existing one:
Never copy-paste files manually. Use the Mintel CLI to scaffold a new project with all best practices pre-configured:
```bash
pnpm --filter @mintel/cli start init apps/my-new-website
pnpm --filter @mintel/cli start init apps/client-name.com
```
## Versioning and Releasing
This command automatically:
1. Sets up the directory structure.
2. Links all `@mintel` shared packages.
3. Configures `next-intl` (i18n) and Sentry.
4. Injects Docker and Gitea Actions deployment workflows.
We use [Changesets](https://github.com/changesets/changesets) for version management.
## 🔄 Release Cycle (Monorepo)
### 1. Add a changeset
When you make a change that requires a version bump, run:
We use [Changesets](https://github.com/changesets/changesets) to manage the versioning and publishing of shared packages.
### 1. Documenting Changes
When you modify a package in `packages/*`, create a changeset:
```bash
pnpm changeset
```
Follow the prompts to select the package and the version bump type (patch, minor, major).
### 2. Version packages
To bump versions based on accumulated changesets:
### 2. Versioning
When ready to release, bump the versions:
```bash
pnpm version-packages
```
This updates `package.json` files and generates `CHANGELOG.md` entries.
### 3. Publish to registry
To build and publish all changed packages to the private registry:
```bash
pnpm release
```
### 3. Publishing
The release to the private registry is automated via Gitea Actions. On every push to `main`, the `release.yml` workflow runs `pnpm release`. If new versions are detected, they are published to `https://npm.infra.mintel.me`.
## Deployment
## 🌐 Infrastructure & Deployment
Projects are hosted on Hetzner with Docker and Traefik, deployed via Gitea Actions. See `@mintel/infra` for templates.
Client websites scaffolded via the CLI use a **tag-based deployment** strategy:
- **Push to `main`**: Deploys to the `testing` environment.
- **Git Tag `v*.*.*-rc.*`**: Deploys to the `staging` environment.
- **Git Tag `v*.*.*`**: Deploys to the `production` environment.
## Registry
Private npm registry: [https://npm.infra.mintel.me](https://npm.infra.mintel.me)
See the [`@mintel/infra`](packages/infra/README.md) package for detailed template documentation.