Zum Hauptinhalt springen
LIVE
CVSS 8.7CVE-2026-138099 | A vulnerability was identified in Tenda AC10U 1.18.6. Affected by this vulnerability is the function readUsb of the component ATE Service. Such manipulation leads to out-of-bounds write. The attack can be executed remotely. The exploit is publicly available and might be used.CVSS 6.9CVE-2026-138098 | A vulnerability was determined in weison-tech yii2-cms up to 1.0.2. Affected is an unknown function of the file protected/core/config/common.php of the component RBAC Authorization. This manipulation causes improper authorization. Remote exploitation of the attack is possible.CVSS 6.9CVE-2026-138097 | A vulnerability was found in weison-tech yii2-cms up to 1.0.2. This impacts the function isActive of the file AccessControl.php of the component RBAC Admin Module. The manipulation results in missing authorization. The attack may be launched remotely.CVSS 6.9CVE-2026-138096 | A vulnerability has been found in weison-tech yii2-cms up to 1.0.2. This affects an unknown function of the file protected/core/config/web.php of the component Admin Auto-Login Identity Cookie. The manipulation leads to improper authentication. The attack may be initiated remotely.CVSS 4.8CVE-2026-138094 | A security vulnerability has been detected in ggml-org llama.cpp up to 0.6.0. Impacted is the function ggml_acc_impl of the file ggml/src/ggml.c of the component ggml Handler. Such manipulation leads to numeric truncation error. The attack can only be performed from a local environment. Upgrading to version 0.7.0 is recommended to address this issue. The name of the patch is 8ae386707bed05f02354dbfc6fa5ee0cf58e5f0f. It is recommended to upgrade the affectedCVSS 6.9CVE-2026-138093 | A weakness has been identified in alexander-torosh yona-cms up to 0.5.0. This issue affects the function loginAction of the file app/modules/Admin/Controller/IndexController.php of the component Admin Login Endpoint. This manipulation causes sql injection. It is possible to initiate the attack remotely.CVSS 4.8CVE-2026-138092 | A security flaw has been discovered in ggml-org llama.cpp up to 0.8.0. This vulnerability affects the function ggml_roll of the file ggml/src/ggml.c of the component Ggml Tensor Library Roll Operation. The manipulation results in integer overflow. The attack needs to be approached locally. Upgrading to version 0.9.0 is able to resolve this issue. The patch is identified as 0978a6e9022fb9bd6874b86154ee304e81929b9f. It is suggested to upgrade the affected compCVSS 10.0CVE-2026-138091 | A vulnerability was identified in Tenda AC10U 15.03.06.48. This affects the function TendaTelnet of the file /goform/telnet of the component Web UI. The manipulation leads to missing authentication. The attack is possible to be carried out remotely. The exploit is publicly available and might be used.
Alle im Drawer
Intelligence View
⚡ tsecurity.de Intelligence

How Turborepo Makes Large JavaScript Projects Fast

Introduction Most projects start with a single repository. Imagine you're building an e-commerce platform: a Next.js storefront for customers, a React Native…

Beitrag
0
Seite
0
↗ Quelle (dev.to)
Quelle & Fakten · 11 Min. Lesezeit
Quelle: dev.to
Rubrik: Sichere Programmierung




Introduction



Most projects start with a single repository. Imagine you're building an e-commerce platform: a Next.js storefront for customers, a React Native mobile app, and a NestJS backend API. Splitting these into three repositories feels like the obvious, clean solution.




ecommerce-web
ecommerce-mobile
ecommerce-api






For the first few months, this works fine. Then the project grows, and the cracks start to show:




  • You copy utility functions between repositories instead of importing them.

  • You duplicate TypeScript interfaces across the frontend, mobile app, and API.

  • Your frontend and backend drift apart because each repo defines its own version of the same models.

  • Updating one shared component means editing it in three different places.



Eventually, maintaining the project becomes harder than building new features.



If that sounds familiar, you're not alone — it's exactly the problem monorepos were designed to solve.



In this article, we'll cover:




  • What a monorepo actually is, and how it differs from a multi-repo (polyrepo) setup

  • Why engineering teams choose it

  • How Turborepo makes monorepos fast instead of slow

  • A practical, production-ready structure for a Next.js + React Native + NestJS monorepo

  • Common mistakes and best practices



Whether you work with React, Next.js, React Native, or NestJS, these concepts will help you build projects that scale without becoming a maintenance burden.






The Problem With Multiple Repositories



A typical multi-repo setup looks like this:




web-app/
mobile-app/
backend-api/
shared-components/






Each repository has its own package.json, dependencies, CI/CD pipeline, Git history, and versioning strategy. It looks clean at first — but as the project grows, several problems appear.






1. Code duplication



You write a helper function once:




export function formatPrice(price: number) {
return `$${price.toFixed(2)}`;
}






Both the web app and the mobile app need it, so instead of importing it, someone copies it. Now there are two versions. When one changes, the other silently falls behind.






2. Inconsistent type definitions



The backend defines a User model:




export interface User {
id: string;
name: string;
email: string;
}






The frontend defines its own version. The mobile app defines a third. Someone later adds an avatar field — but only updates one of the three. Now the applications disagree about what a User actually is, and that mismatch surfaces as runtime bugs.






3. Harder dependency management



Every repository maintains its own dependency tree:




web/package.json
mobile/package.json
api/package.json






Upgrading React, TypeScript, or ESLint means repeating the same work three times — and different repos can quietly end up on different versions of the same package.






4. More complex CI/CD



Each repository needs its own build pipeline, test workflow, deployment configuration, and environment variables. Multiplied across several repos, this adds up to a real maintenance cost.






5. Harder refactoring



Renaming Product to CatalogProduct across four repositories means updating each one, publishing shared packages, bumping dependency versions, and coordinating releases. A simple rename becomes a multi-day effort.






What Is a Monorepo?



A monorepo (short for "monolithic repository") keeps multiple related projects in a single Git repository, instead of splitting them across separate ones:




company-project/
├── apps/
│ ├── web
│ ├── mobile
│ └── api
│
├── packages/
│ ├── ui
│ ├── types
│ ├── utils
│ └── config
│
├── package.json
└── turbo.json






This structure separates applications from reusable code:





  • apps/ — runnable applications, e.g. a Next.js site, a React Native app, a NestJS API, an admin dashboard.


  • packages/ — reusable modules, e.g. UI components, utility functions, shared TypeScript types, or shared ESLint/Prettier configs.



Instead of duplicating a Button component across apps, both the web app and the mobile app import it from packages/ui.






Monorepo vs. Polyrepo
















































Feature Monorepo Polyrepo
Single Git repository ✅ ❌
Shared code ✅ Easy ⚠️ Requires publishing packages
Dependency management Centralized Separate per repo
Refactoring Easier More complex
Consistent tooling ✅ ⚠️ Often inconsistent
Initial setup More advanced Simpler
Best for Medium & large projects Small, independent projects


Neither approach is universally better — the right choice depends on your project's size and how much code your applications actually share.






Benefits of Using a Monorepo



Better code reuse. packages/ui can be imported by both apps/web and apps/mobile, giving you a single source of truth instead of copy-pasted components.



Shared TypeScript types. User, Product, Order, and Address are defined once in packages/types and imported everywhere, which eliminates an entire category of "the frontend and backend disagree" bugs.



Easier refactoring. Since every project lives in the same repository, your IDE can rename a shared interface and update every import automatically.



Consistent tooling. One shared packages/eslint-config (or Prettier, TypeScript, Tailwind config) replaces three or four slightly-different copies.



Better collaboration. New team members clone one repository and can start working immediately, instead of juggling multiple repos and remembering how they relate to each other.






When Should You Use a Monorepo?



Monorepos shine when applications genuinely share code: a Next.js site and a React Native app pulling from the same design system, a frontend and backend sharing TypeScript models, multiple dashboards, or a SaaS platform with several client apps.



They're usually unnecessary for a simple portfolio site or a small standalone API. A monorepo is a tool, not a rule — use it when it solves a problem you actually have.






Introducing Turborepo



A fair question at this point: if a monorepo can hold dozens of apps and hundreds of packages, won't builds get painfully slow?



Yes — unless you use the right tooling. That's what Turborepo is for.



Turborepo is a high-performance build system built specifically for JavaScript and TypeScript monorepos. It understands the relationships between your apps and packages, so it only does the work that's actually necessary instead of rebuilding everything on every run.



Think of it this way: a monorepo organizes your code; Turborepo optimizes how that code gets built, tested, linted, and run in development.






Why not just use npm scripts?



With three apps in your repo:




apps/
web
mobile
api






running npm run build builds all three — even if you only touched a single file inside web. For a small project that's fine. For a repo with a dozen apps, it's a lot of wasted time.



Turborepo fixes this with four core optimizations: intelligent caching, incremental builds, parallel execution, and task pipelines.






1. Intelligent caching



Say your build takes five minutes. You make no changes and run:




turbo run build






Turborepo recognizes that nothing has changed and restores the previous output instead of rebuilding:




✔ Using cached result






The command finishes in seconds. Under the hood, Turborepo calculates a fingerprint for each task based on its source files, dependencies, configuration, environment variables, and package versions. If none of that has changed, it just replays the cached result.






2. Incremental builds



Now suppose you change one file in a shared package:




packages/ui/Button.tsx






Only the applications that actually depend on packages/ui need to rebuild:




        packages/ui
/ \
web admin






The API doesn't rebuild, and mobile doesn't rebuild if it doesn't use that package. Turborepo rebuilds only what's affected, instead of the whole repository.






3. Parallel execution



Plain npm scripts often run sequentially — build web, then wait, then build api, then wait, then build mobile. Turborepo runs independent tasks at the same time, taking advantage of your machine's multiple CPU cores automatically:




Building web    ✓
Building mobile ✓
Building api ✓









4. Task pipelines



Applications typically depend on packages, which may depend on other packages:




packages/types → packages/ui → apps/web






Build order matters here — types has to be ready before ui, which has to be ready before web. Instead of managing that sequence by hand, Turborepo builds the dependency graph automatically and executes tasks in the correct order.






A more realistic dependency graph






                packages/types
│
┌──────────────┼───────────────┐
packages/ui packages/utils
│ │
┌────┴────┐ │
web admin api
│
mobile






If you modify packages/utils, should web rebuild? No — it doesn't depend on that package. Only api (and anything downstream of it) needs to rebuild. Turborepo works this out automatically from the graph.






A Practical Monorepo Structure



Here's a realistic full-stack layout:




my-company/
├── apps/
│ ├── web
│ ├── mobile
│ ├── api
│ └── admin
│
├── packages/
│ ├── ui
│ ├── types
│ ├── utils
│ ├── hooks
│ ├── config
│ ├── eslint-config
│ └── tsconfig
│
├── package.json
└── turbo.json






Applications and shared libraries are clearly separated, and each folder has a single responsibility.



Sharing TypeScript models. Instead of an API, web, and mobile app each defining their own Product interface, define it once in packages/types:




// packages/types/Product.ts
export interface Product {
id: string;
title: string;
price: number;
image: string;
}






Every app imports the same model:




import { Product } from "@repo/types";






Sharing utility functions. A currency formatter used by every app lives in packages/utils instead of being copy-pasted three times:




// packages/utils/formatCurrency.ts
export function formatCurrency(value: number) {
return new Intl.NumberFormat("en-US", {
style: "currency",
currency: "USD",
}).format(value);
}






Sharing UI components. packages/ui becomes your design system — Button, Card, Input, Modal, Avatar, Badge — so every app stays visually consistent instead of reinventing the same components.



Sharing configuration. Centralize ESLint, TypeScript, Prettier, and Tailwind configs into packages/eslint-config and similar packages, instead of maintaining a slightly different .eslintrc in every app.






Understanding turbo.json



At the root of your project, turbo.json defines how Turborepo executes tasks:




{
"$schema": "https://turbo.build/schema.json",
"tasks": {
"build": {
"dependsOn": ["^build"],
"outputs": ["dist/**", ".next/**"]
},
"lint": {},
"test": {},
"dev": {
"cache": false
}
}
}








  • dependsOn: ["^build"] — before building this package, build all of its dependencies first.


  • outputs — the files Turborepo caches after a successful build. If they haven't changed, it restores them instantly next time.


  • cache: false on dev — development servers shouldn't be cached; turbo run dev should always give you a fresh environment.



Instead of cd-ing into each app individually, you run tasks from the root:




turbo run dev
turbo run build
turbo run lint
turbo run test






Turborepo figures out what needs to run, in what order, whether it can reuse the cache, and which tasks can run in parallel — so you can focus on writing code instead of orchestrating builds.






Common Mistakes



Adopting a monorepo doesn't automatically improve your architecture. A few pitfalls to watch for:



Sharing everything. Moving nearly every file into packages/ makes the repo harder to navigate. Share stable, reusable code — not application-specific business logic.



Circular dependencies. If ui depends on utils, which depends on hooks, which depends back on ui, you've created a loop that makes builds fragile and hard to reason about. Keep dependencies flowing in one direction.



Oversized shared packages. Avoid dumping everything into a single common/ or shared/ folder with hundreds of unrelated files. Prefer small, focused packages: ui, types, utils, auth, config.



Ignoring boundaries. Living in one repository doesn't mean every app should import from every package. Each app should only depend on what it actually needs — clear boundaries make the whole thing easier to scale.






Best Practices





  • Keep packages small, each with one clear responsibility (UI, types, auth, API client, utilities).


  • Share only stable code. Business-specific logic usually belongs inside the application, not a shared package.


  • Use TypeScript everywhere. Sharing interfaces between frontend and backend removes a whole class of runtime errors.


  • Standardize tooling — one shared ESLint, Prettier, TypeScript, and Tailwind config for the whole repo.


  • Automate quality checks by running turbo run lint, turbo run test, and turbo run build in CI, so issues are caught before deployment.






Should You Always Use a Monorepo?



Not necessarily. A monorepo is an architectural choice, not a universal solution.



It's a strong fit when multiple applications share code, teams collaborate on related projects, consistency matters, or a frontend and backend share TypeScript models. It's often unnecessary for personal portfolios, landing pages, or small standalone projects — the added structure isn't worth it if there's nothing to share.






Final Thoughts



As applications grow, architecture matters as much as clean code. A monorepo makes it easier to organize multiple applications and shared packages in one place, which pays off in collaboration, code reuse, and maintenance. Turborepo is what keeps that structure fast as it scales — through intelligent caching, dependency-aware task execution, and parallel builds.



Together, they give you a solid foundation for modern JavaScript and TypeScript projects, whether you're building a SaaS platform, an e-commerce app, or an internal enterprise tool.



If you're just getting started, don't reach for a monorepo on day one. Start small, experiment with a shared package or two, and introduce Turborepo once your codebase actually needs it. You'll understand the trade-offs a lot better than if you set it all up upfront.



Thanks for reading! If you found this useful, I'd love to hear how your team structures its projects — drop a comment below.

Information ergänzen Fachhinweis, Update, Korrektur oder Quelle zur Meldung beitragen
Gäste-Hinweise werden kurz redaktionell geprüft und danach hier angezeigt.

Community-Hinweise zur Meldung

0 freigegeben
Social ReaktionenReagiere als Erste:r — dein Feedback zählt!
Informations-Bewertung:

💬 Community-Diskussion & Kommentare

🌐 Zum Hauptchat

Starte die Diskussion im Social-Chat Broadcast Stream oder reiche oben über „Information ergänzen“ einen Fachbeitrag ein.

Community Rating & Social Proof
⭐ Leser-Wertung
–
Ø / 5.0
Noch keine Leser-Bewertungen
War dieser Artikel hilfreich?
0
Jetzt Bewertung abgeben
Detail-Bewertung (optional)
Inhalt & Qualität
Quelle & Glaubwürdigkeit
Aktualität
Security Briefing Kostenlos · 1-Klick-Abmeldung

Intelligence Digest — kostenlos

Täglich die wichtigsten Security-News · jederzeit abbestellbar

Verwandte Story-Cluster & Quellen (Vektor-KI)

4 Cluster
3 Quellen
GitHub Release: can1357/oh-my-pi v19.3.0 (29.11.2026)
GitHub · can1357/oh-my-pi vor 20 Std.
2 weitere Quellen
2 Quellen
Mozilla Thanks Users For New Features in Firefox 161: Site-Specific VPN and Keyboard Shortcuts
Slashdot vor 1 Tag
1 weitere Quelle
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten How Turborepo Makes Large JavaScript Projects Fast

Thematisch verwandte Begriffe: Turborepo, Makes, Large, JavaScript · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

💬 Kommentare werden geladen…
Zum Aktualisieren ziehen
Widgets & Themen
Widgets werden geladen…
Nächster Beitrag