Monorepos and several apps
One repository can hold a website, a mobile app, a desktop app and a partner portal on one backend. Add each as a surface to keep its scans, screens, releases and pull request checks apart.
On this page
Many products ship more than one app from the same code: a website, an Android app, a desktop app, a partner portal. Each one reaches people through a different channel. In M1rror each of these is a surface.
A surface is a folder of a connected repository (a monorepo package such as apps/web, or the whole repository) with:
- a name, such as Partner portal;
- a platform: web, marketing site, iOS, Android, React Native, Flutter, desktop, email or other;
- a channel, where it ships, such as web, App Store or Play Store;
- a kind: an app, a shared UI package that several apps import, or a service (a backend package, not a UI).
Add surfaces
Open Code. Under the repository panel, find Surfaces.
Detect the apps
Choose Detect apps in this repository. M1rror reads the tracked branch and lists what it finds. Nothing runs and nothing is saved yet.
Pick the ones you want
Apps and shared UI packages start checked. Backend packages are labelled Service – not a UI surface and start unchecked.
Add them
Choose Add. Each app is scanned once at the tracked branch's commit, or keeps the scan that commit already has.
You can also add one by hand with Add a surface, then give its folder, platform and channel.
Adding a surface needs the same permission as choosing the package in Toolchain.
What detection looks for
- Web: Next.js, Vite, Remix, React Router, Astro, Nuxt, SvelteKit, Angular and Gatsby in a
package.json. A folder calledmarketing,landing,wwworwebsiteis suggested as a marketing site. - React Native: Expo or React Native. Its own
android/andios/folders are part of it. - Desktop: Electron or Tauri, or an Xcode project for macOS.
- Android: a Gradle build with an
AndroidManifest.xml. - iOS: an Xcode project, or a Swift package for iOS.
- Flutter: a
pubspec.yamlthat uses Flutter. - Email: React Email or MJML.
- Shared UI packages: a package written with a UI library that an app depends on, or that is named like one (
ui,design-system,components,tokens). - Services: Express, Hono, Fastify, Nest, Koa, a Rails API or Django without templates.
What is per surface today
- Scans. Adding a surface scans its folder at the tracked branch's commit. A commit that was already scanned for that folder is reused and not charged again.
- Pull request checks. When a repository has more than one surface, the check groups its findings by surface. A file belongs to the surface whose folder holds it. A change to a shared UI package counts for every app that imports it, when M1rror can tell from their
package.jsonfiles; otherwise it is reported under the shared package. With one surface or none, checks look exactly as before. - Screens. Choose a surface in the switcher at the top of the project. Screens then shows that surface's screens, and new screens are made for it. Screens made before surfaces existed show under All surfaces.
- Releases can name the surface they were prepared for.
- Brands. Each surface can use its own brand from the workspace brand library, built on a shared foundation, and change values for itself. Its token exports contain its own final values. See Brands and several surfaces.
- Your coding agent. The agent brief lists the project's surfaces with their platform, folder and repository, and agents can read them with
taste_list_surfacesandtaste_get_surface, and a surface's final token values withtaste_get_surface_tokens.
What is coming
- Native code. M1rror does not read Android (Kotlin, Compose or XML), iOS (Swift, SwiftUI) or Flutter code yet. You can still create surfaces for them, and they receive token exports, but scans and pull request checks find no components in them.
Archive a surface
Choose Archive in the surface's menu. Its screens, releases and checks keep their history. To restore it, add the same folder again.
Last updated
Edit this page on GitHub