Tüm projelerAll projects

Dört ayrı uygulamadan, yedi markayı taşıyan tek bir platformaFrom four separate apps to one platform carrying seven brands

NUYA; sporcular, terapi ve koçluk, çiftler, okullar, ekipler ve genel kullanıcılar için yedi ürünün ortak çekirdeği. Test, puanlama, rapor, yetki, ödeme, yapay zekâ ve analitik tek yerde; ürünler yalnızca marka, şablon ve deneyimi ekliyor.NUYA is the shared core behind seven products for athletes, therapy & coaching, couples, schools, teams and the general public. Tests, scoring, reports, permissions, payments, AI and analytics live in one place; products add only branding, templates and experience.

  • RolRolePlatform mimarisi & baş geliştiriciPlatform architecture & lead engineer
  • KapsamScope7 marka · çok kiracılı SaaS7 brands · multi-tenant SaaS
  • YığınStackFastAPI · PostgreSQL · ReactFastAPI · PostgreSQL · React

ProblemThe problem

Başlangıçta dört bağımsız uygulama vardı ve her biri aynı Enneagram puanlamasını kendi Firebase projesinde yeniden yazıyordu. Aynı test farklı uygulamalarda farklı sonuç verebiliyordu; kullanıcı, ödeme ve analitik her yerde ayrı ayrı çözülmüştü. Ürün sayısı yediye çıkacaktı.It started as four independent apps, each re-implementing the same Enneagram scoring on its own Firebase project. The same test could produce different results in different apps; users, payments and analytics were solved separately everywhere. The product count was about to grow to seven.

YaklaşımApproach

Tasarımın merkezinde birbirinden bağımsız üç eksen var: ürün (markalı deneyim), kiracı (okul, kulüp, klinik, şirket ya da bireyin kendi alanı) ve puanlama modeli (sürümlü Enneagram ve NUYA). Bu üç eksen ayrı tutulunca platform kod tekrarı olmadan hem çok kiracılı hem çok ürünlü olabiliyor.The design rests on three independent axes: product (the branded experience), tenant (a school, club, clinic, company or an individual's own space) and scoring model (versioned Enneagram and NUYA). Keeping them orthogonal lets the platform be multi-tenant and multi-product without duplicated code.

Puanlama sunucuda ve deterministikScoring is server-side and deterministicTek bir puanlama çalıştırması aynı cevaplardan iki sonuç üretiyor: standart Enneagram tipi ve ek sorularla genişletilmiş NUYA profili (baskın ego üçlüsü, merkez kazananları, alt tipler). İstemci asla puan hesaplamıyor.One scoring run produces two results from the same answers: the standard Enneagram type and the extended NUYA profile (dominant-ego triad, centre winners, subtypes) using additional questions. The client never computes scores.
Satır düzeyinde çok kiracılılıkRow-level multi-tenancyPostgreSQL Row-Level Security, değişmezlik tetikleyicileri ve RBAC + ABAC yetki modeli. Testler taslak → yayın → arşiv akışıyla sürümleniyor; yayınlanmış sürüm değiştirilemiyor.PostgreSQL Row-Level Security, immutability triggers and an RBAC + ABAC permission model. Tests are versioned draft → publish → archive; a published version cannot be altered.
Yetki öncelikli yapay zekâAuthorization-first AISohbet bağlamı yalnızca kullanıcının görmeye yetkili olduğu sonuçlardan kuruluyor; puanlama kuralları ve sistem talimatları asla bağlama girmiyor. Claude ve OpenAI aynı sağlayıcı arayüzünün arkasında; terapi ürünlerinde kriz tespiti ve insan uzmana devir var.Chat context is built only from results the user is allowed to read; scoring rules and system prompts never enter the context. Claude and OpenAI sit behind one provider interface; therapy products add crisis detection and hand-off to a human expert.
Ses doğrudan tarayıcıdanVoice goes browser-directSesli koç OpenAI Realtime'a tarayıcıdan WebRTC ile bağlanıyor; ses sunucudan hiç geçmiyor ama aynı bağlam ve korumalar geçerli.The voice coach connects to OpenAI Realtime from the browser over WebRTC; audio never passes through the server, yet the same context and guardrails apply.

MimariArchitecture

  • Backend: FastAPI modüler monolit, SQLAlchemy 2.0 async, Alembic, Pydantic v2Backend: FastAPI modular monolith, SQLAlchemy 2.0 async, Alembic, Pydantic v2
  • Veri: PostgreSQL 16, RLS ile kiracı izolasyonuData: PostgreSQL 16 with RLS tenant isolation
  • Ön yüz: React 18 + Vite + TypeScript + Tailwind v4; tüketici uygulamaları ortak bir consumer-core paketini paylaşıyorFrontend: React 18 + Vite + TypeScript + Tailwind v4; consumer apps share one consumer-core package
  • Kimlik: PostgreSQL tabanlı; sihirli bağlantı ve Google girişi, dönen httpOnly yenileme çereziAuth: PostgreSQL-native; magic link and Google sign-in, rotating httpOnly refresh cookie
  • Ödeme: lisans/kupon kullanımı, iyzico soyutlaması ve sohbet/ses kullanımını ölçen ön ödemeli kredi cüzdanıPayments: license/voucher redemption, an iyzico abstraction and a prepaid credit wallet that meters chat and voice
  • Raporlama: ücretsiz/ücretli katmanlı, hedef kitleye göre görünürlüğü olan ürün bazlı şablonlar ve PDF üretimiReporting: per-product templates with free/paid tiers, audience-based visibility and PDF rendering
  • FastAPI
  • PostgreSQL 16 · RLS
  • React 18
  • Tailwind v4
  • Anthropic Claude
  • OpenAI Realtime
  • WebRTC
  • iyzico
  • Docker · Caddy

SonuçOutcome

Yedi marka tek bir puanlama uygulaması, tek kullanıcı ve yetki modeli, tek ödeme ve analitik katmanı üzerinde çalışıyor. Yeni bir ürün eklemek artık platform mantığını kopyalamak değil; marka, şablon ve deneyimi tanımlamak anlamına geliyor.Seven brands run on one scoring implementation, one user and permission model, and one payments and analytics layer. Adding a new product no longer means copying platform logic; it means defining branding, templates and experience.

Benzer bir problem üzerine mi düşünüyorsunuz?Thinking about a similar problem?

Mimari, yapay zekâ entegrasyonu ya da ürünleştirme üzerine konuşmaktan memnuniyet duyarım. Satış görüşmesi değil, sadece bir sohbet.I'm happy to talk through architecture, AI integration or productisation. Not a sales call — just a conversation.

TanışalımLet's talk WhatsApp

tolgabuyuktanir@gmail.com · +90 554 644 24 94