Hey there,
We are currently establishing Cursor Rules in our company after swapping our project into a Monorepo structure.
The Structure:
* apps/frontend (Public Store)
* apps/backend (Admin Dashboard)
* apps/api (Laravel Backend)
The Setup: I have placed a global rule file at the root to handle navigation and architecture: .cursor/rules/monorepo-md-guidelines.mdc
PS the \ are a Copy Error ignore them ![]()
---
description: Global Monorepo Guidelines
alwaysApply: true
---
\# Monorepo Architecture & Navigation
We are working in a Monorepo with distinct projects. Always respect the specific rules found in the sub-directories.
\# Project Structure (The Map)
1\. \*\*apps/backend/\*\*
\* \*\*Type:\*\* Internal Admin Dashboard
\* \*\*Stack:\*\* Nuxt.js (Vue) + Bootstrap 4
\* \*\*Role:\*\* Management interface for the platform.
2\. \*\*apps/frontend/\*\*
\* \*\*Type:\*\* Public Customer Store
\* \*\*Stack:\*\* Nuxt.js (Vue) + Tailwind CSS
\* \*\*Role:\*\* The frontend facing the end-customers.
3\. \*\*apps/api/\*\*
\* \*\*Type:\*\* Central Backend
\* \*\*Stack:\*\* Laravel
\* \*\*Role:\*\* Provides REST API for both frontends.
\# Global Behavior Rules
\* \*\*Context:\*\* When I ask for a full feature implementation, check if it spans across the API and one of the Frontends.
I also have specific .mdc files inside the sub-projects, for example: apps/backend/.cursor/rules/project-md-guidelines.mdc
---
description: Applies to admin-frontend project, enforcing best practices for frontend development.
globs: apps/backend/\*\*/\*
---
\# \[Specific Rules for Backend Frontend...\]
The Problem: Today I tried to modify an existing component in apps/backend, but Cursor ignored the context completely:
1. CSS: It started writing custom CSS instead of using Bootstrap 4 (as defined in the stack).
2. SSR: It ignored Server/Client rendering distinctions (e.g., trying to put a Timer in server-side code).
These rules are explicitly defined in the sub-project guidelines, but the AI seems to be overlooking them.
Question: Has anyone successfully set up Cursor Rules for a Monorepo where sub-directories have conflicting stacks (e.g., Tailwind in one app, Bootstrap in another)? Does Cursor support nested .cursor folders, or should I move everything to the root with specific globs?
Any advice is appreciated!