backend_core
Node.js/TypeScript temel prensipler, proje yapısı ve TypeScript strict mode kuralları.
npxskills add vuralserhat86/antigravity-agentic-skills--skill backend_coreLoading…
Node.js/TypeScript temel prensipler, proje yapısı ve TypeScript strict mode kuralları.
npxskills add vuralserhat86/antigravity-agentic-skills--skill backend_coreLoading…
Node.js/TypeScript temel prensipler ve proje yapısı.
| Alan | Teknoloji |
|---|---|
| Runtime | Node.js 20+ (LTS) |
| Dil | TypeScript (Strict) |
| Framework | NestJS, Fastify, Express |
{
"compilerOptions": {
"strict": true,
"noImplicitAny": true,
"strictNullChecks": true,
"noImplicitReturns": true
}
}
any Yasak// ❌ YANLIŞ
function process(data: any) { }
// ✅ DOĞRU
function process(data: DataPayload) { }
// Bilinmeyen için unknown kullan
function parse(input: unknown) { }
src/
├── modules/
│ ├── auth/
│ │ ├── auth.controller.ts
│ │ ├── auth.service.ts
│ │ ├── auth.repository.ts
│ │ └── auth.dto.ts
│ └── users/
├── shared/
│ ├── middleware/
│ ├── guards/
│ └── utils/
├── infrastructure/
│ ├── database/
│ ├── cache/
│ └── logger/
├── config/
└── main.ts
import { z } from 'zod';
const envSchema = z.object({
NODE_ENV: z.enum(['development', 'production', 'test']),
PORT: z.string().transform(Number),
DATABASE_URL: z.string().url(),
JWT_SECRET: z.string().min(32),
});
export const env = envSchema.parse(process.env);
backend-api - REST/GraphQL tasarımıbackend-database - DB patterns, cachingbackend-database - DB patterns, cachingBackend Core v1.2 - Verified
dotenv ve envalid (veya Zod) ile ortam değişkenlerini tip güvenli hale getir.app.ts (setup) ve server.ts (listen) olarak ayır.console.log yerine winston veya pino kur./health endpoint'i ekle.| Aşama | Doğrulama |
|---|---|
| 1 | Yeni bir özellik eklerken 5 farklı klasöre dokunmak gerekiyor mu? (Gerekmemeli -> Component based) |
| 2 | .env dosyası commit edilmiş mi? (Edilmemeli) |
| 3 | Uygulama çökünce process otomatik restart oluyor mu? (PM2/Docker) |
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Set up and use 1Password CLI (op). Use when installing the CLI, enabling desktop app integration, signing in (single or multi-account), or reading/injecting/running secrets via op.
CLI to manage emails via IMAP/SMTP. Use `himalaya` to list, read, write, reply, forward, search, and organize emails from the terminal. Supports multiple accounts and message composition with MML (MIME Meta Language).
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Set up and use 1Password CLI (op). Use when installing the CLI, enabling desktop app integration, signing in (single or multi-account), or reading/injecting/running secrets via op.
CLI to manage emails via IMAP/SMTP. Use `himalaya` to list, read, write, reply, forward, search, and organize emails from the terminal. Supports multiple accounts and message composition with MML (MIME Meta Language).