# Typescript full-stack projeleri icin proje dizin yapisi ve tsconfig dosyasi nasi

![1042009.png](https://i.imgur.com/Bg2Jh3P.png)

## Ornek Proje Dizini

```typescript
my-fullstack-project/
├── node_modules/  // Ana proje için global bağımlılıklar
├── packages/
│   ├── backend/
│   │   ├── node_modules/  // Backend için lokal bağımlılıklar
│   │   ├── src/
│   │   │   ├── controllers/
│   │   │   ├── models/
│   │   │   └── index.ts
│   │   ├── package.json
│   │   └── tsconfig.json  // Backend için tsconfig
│   └── frontend/
│       ├── node_modules/  // Frontend için lokal bağımlılıklar
│       ├── src/
│       │   ├── components/
│       │   ├── utils/
│       │   └── App.tsx
│       ├── public/
│       ├── package.json
│       └── tsconfig.json  // Frontend için tsconfig
├── package.json  // Ana proje package.json
├── tsconfig.json  // Ana proje tsconfig (opsiyonel)
├── lerna.json
└── README.md

```

## Örnek `tsconfig.json` İçerikleri

### **Ana Proje (Opsiyonel)**

```json
{
  "compilerOptions": {
    "target": "es6",
    "module": "commonjs",
    "composite": true
  },
  "references": [
    { "path": "./packages/backend" },
    { "path": "./packages/frontend" }
  ]
}

```

### **Backend Proje**

```json
{
  "compilerOptions": {
    "target": "es2020",
    "module": "commonjs",
    "outDir": "./dist",
    "rootDir": "./src"
  },
  "include": ["src/**/*.ts"]
}

```

### **Frontend Proje**

```json
{
  "compilerOptions": {
    "target": "es2020",
    "module": "esnext",
    "jsx": "react",
    "outDir": "./dist",
    "rootDir": "./src"
  },
  "include": ["src/**/*.ts", "src/**/*.tsx"]
}

```

> Bu yapı ve `tsconfig.json` dosyaları, projenin ihtiyacına bağlı olarak değiştirilebilir. Ancak temel olarak bu yapı genellikle iş görür.

## Sadece FrontEnd Proje Dizini

```typescript
my-ts-project/
├── node_modules/ // Dış paketlerin yüklendiği klasör.
├── src/ // Kaynak kodlarınızın olduğu ana klasör.
│   ├── components/ // Reaktif bileşenler gibi UI bileşenlerini içerir.
│   │   ├── Button.tsx
│   │   └── Header.tsx
│   ├── utils/ // Yardımcı fonksiyonlar ve araçlar.
│   │   └── helpers.ts
│   ├── services/ // API çağrıları gibi servisler.
│   │   └── api.ts
│   ├── models/ // Data modelleri veya interface'ler.
│   │   └── user.ts
│   ├── index.ts // Ana giriş dosyası.
│   └── App.ts // Uygulamanın ana bileşeni.
├── dist/ // Derlenmiş JavaScript kodunun saklandığı dizin.
├── public/ // Statik dosyaların saklandığı dizin.
├── package.json // Proje bağımlılıklarını ve script'leri içerir.
├── tsconfig.json // TypeScript konfigürasyon dosyası.
└── README.md // Proje hakkında bilgiler.

```

> Bu dizin yapısı, birçok projede sıklıkla karşılaşılan bir yapıdır ve genişletilebilirlik ve modülerlik sağlar. Ancak, her proje için bu yapıyı takip etmek zorunda değilsiniz. Projeye ve ihtiyacınıza göre bu yapının içeriği değişebilir.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.yemreak.com/arsiv/programming/typescript-full-stack-projeleri-icin-proje-dizin-yapisi-ve-tsconfig-dosyasi-nasil-olmali.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
