~/menu

01 Home

Hey, I'm Eren.Senior Software Developer, full-stack, backend-first

I like being there for the whole story of a product, from the first sketch to the release. If something itches at my curiosity, I take it apart first, and if it earns its place, I take it all the way to production.

At Calibre Tour, I work on both the backend and the interface of a reservation and payment platform, with .NET, SQL Server, React, Next.js and Node.js. Outside work, I build LIBRAIN, an open-source multi-agent RAG system written in .NET 10. It ingests scientific papers, stores their embeddings in a vector database, and generates hypotheses that show their sources through a Reader → Synthesis → Evaluator flow. A Discovery Mode running in parallel looks for connections across 41 papers from AI, drug discovery, climate and neuroscience, and flags the speculative part separately as a novelClaim. I published its paper on Zenodo with a DOI. I spend most of my time on the backend side: how data flows, how services talk to each other, and keeping code readable months later. Those are the problems I like working on.

erenn.jpg
Marmaris, TR
cd ./journey
erenn.jpg · git log --graph
Eren Mutlu, black-and-white portrait
file
erenn.jpg · 1024×1536
where
Marmaris, TR
36.855° N 28.274° E
local time

Europe/Istanbul
made of
my career, one column at a time: left is 06/2019, right is today; every square holds a real line from my git log
exit
esc or ×

02 39 tools

Skills

Grouped by area. Pick a tool and every role that used it lights up in the log.

git log --all --grep=

# pick a tool above to grep the career

# try .net, it's everywhere

03 2019 – today

Experience

Now Senior Software Developer at Calibre Tour. Six roles since 2019, newest first; tap a role to open it.

  1. HEAD points to main

    Senior Software DeveloperCalibre Tour01/2025 – present

    • Built a multi-tenant B2B/B2C reservation platform (hotels, flights, transfers, holiday packages) on 11 ASP.NET Core (.NET 10) microservices with EF Core and SQL Server, plus most of the React admin panel and the Next.js checkout, booking and account flows in 4 languages incl. RTL.
    • Built the identity service and B2B model: ASP.NET Core Identity with JWT access and refresh tokens, 7 user types, per-tenant policy-based roles, partner onboarding, option holds with Hangfire expiry jobs and agency commissions traceable in the ledger.
    • Built the hotel contract and rate engine (per-market markup, date-ranged rates, cancellation policies, shared allotment with stop-sale, stackable promotions) and hotel earnings with IBAN payouts.
    • Built hotel search merging own inventory with Paximum, with own-to-supplier matching over a 1.39M-hotel catalogue.
    • Proposed and built Booking.com content enrichment as a Node.js side service (Express.js, PostgreSQL with Prisma, BullMQ jobs on Redis).
    • Built the flight product and integrated Paximum and SanFlight with Redis-shared sessions, token-bucket rate limiting and Polly circuit breakers; supplier bookings run as a MassTransit saga with auto-refunds.
    • Built holiday packages and tours: per-occupancy availability precomputed with Hangfire, a B2B portal, a tour authoring wizard and day-by-day travel tickets by email.
    • Built the multi-currency wallet ledger and payment service: atomic EF Core postings, live FX cross-rates, credit limits, Paycell and 3D Secure via İşbank, Garanti BBVA and Yapı Kredi, Turkish installments and refunds in the charge currency.
    • Hardened and sped up the platform: single-claim guards on payments and refunds, BFF login with httpOnly cookies and CSRF protection, EF Core tenant query filters, SQL Server full-text indexes and HybridCache over Redis.
    • Ran the infrastructure: Docker on Coolify on Hetzner, GitHub Actions that test only changed services, a weekly anonymized prod-to-dev DB refresh, Serilog and OpenTelemetry.

    stack · 22.NET 10ASP.NET CoreEF CoreSQL ServerMicroservicesReact.jsNext.jsTypeScriptNode.jsExpress.jsPostgreSQLPrismaRedisBullMQMassTransitHangfirePollyDockerCoolifyHetznerGitHub ActionsOpenTelemetry

    Lead Backend DeveloperPawbooking.co03/2024 – 01/2025

    • Part-time startup role in the evenings alongside Bafra Gıda until September 2024, then my main role.
    • Led backend development as part of a 4-person founding team: managed 5 engineers, owned architecture decisions, ran code reviews and took part in technical hiring.
    • Kept bookings and payments consistent by integrating Paycell and iyzico payments into the reservation flow as atomic transactions.
    • Architected the booking engine and REST APIs with Express.js, Next.js and MongoDB, and optimized the MongoDB schemas.
    • Took the platform live (pawbooking.co) on AWS with self-hosted CI/CD on Coolify.

    stack · 12Node.jsExpress.jsNext.jsMongoDBREST APIsPaycelliyzicoAWSCoolifyCI/CDTeam LeadershipCode Review

    Software DeveloperBafra Gıda Ltd. Şti.09/2023 – 09/2024

    • Full-time contract.
    • Replaced spreadsheet workflows with stock and inventory microservices in .NET and Vue.js across 1 main warehouse and 2 outsourced operations.
    • Designed backend services and data flows for the company's restaurant and auto maintenance units.
    • Automated daily operations and reporting with Express.js and React tools, worked out requirements with cross-functional teams and shipped releases through GitHub Actions.

    stack · 9.NETVue.jsExpress.jsReact.jsTypeScriptJavaScriptMicroservicesREST APIsGitHub Actions

    Software DeveloperContent Power BV08/2022 – 09/2023Rijswijk, Netherlands · on-site (AIESEC Global Talent)

    • AIESEC Global Talent Program, on-site in Rijswijk, Netherlands.
    • Built a custom server-side rendering (SSR) engine in .NET (non-SPA) that generates dynamic UI components for high-traffic ISP client portals.
    • Cut repeated frontend code with object-oriented domain models that generate lists and forms automatically.
    • Automated DNS management through the Cloudflare API and built secure multi-file uploads with Uppy.js for backend processing pipelines.
    • Shipped features to ACC and PROD environments through GitLab CI/CD in an agile international team.

    stack · 10.NETTypeScriptJavaScriptServer-Side RenderingOOPCloudflare APIUppy.jsGitLab CI/CDAgileSpoken English

    Software DeveloperIntertech Information Technology07/2021 – 08/2022

    • Improved throughput on high-volume, KPI-driven banking workflows with Kafka event-driven processing and Redis caching.
    • Built .NET microservices and JS/TS components for corporate and commercial banking clients in a high-compliance, SLA-driven environment.
    • Refactored large legacy codebases after peer code reviews and shipped through a multi-stage release process (test, staging, controlled production) with QA testers.
    • Wrote unit tests across banking microservices and used TFS for version control and work tracking.

    stack · 9.NETJavaScriptTypeScriptKafkaRedisMicroservicesUnit TestingTFSSQL

    Software DeveloperTeknoraks Teknoloji Market06/2019 – 07/2021

    • Part-time and remote in the first year, full-time from the pandemic onward, in a startup team with volunteer engineers.
    • Pulled orders from Trendyol, Hepsiburada, Çiçeksepeti and n11 into the company's order panel in real time with .NET Worker Services on MSSQL.
    • Built cargo management in .NET to handle shipping for those marketplace orders.
    • Built a Flutter staff app on the same order data, with Firebase Authentication and Provider state management.
    • Moved the REST and SOAP endpoints into shared Postman collections for docs and testing, and worked on backend performance fixes.

    stack · 9.NETWorker ServicesMSSQLFlutterDartFirebaseREST APIsSOAPPostman

    B.Sc. Computer EngineeringKarabük University07/2018 – 09/2023

    • B.Sc. in Computer Engineering (100% English instruction).
    • Thesis: TÜBİTAK-funded (2209-A) real-time speech-to-sign language app built with Unity, C# and Blender.
    • Coursework: Data Structures & Algorithms, Software Architecture (OOP/Design Patterns), Distributed Database Systems.

    stack · 7Computer ScienceAlgorithmsData StructuresSoftware ArchitectureUnityC#Research

046 repositories

Projects

Six repositories in an editor: read the README, the case study and the real code, or run the demo. Nothing here leaves the page unless you ask it to.

librain stats

papers read
41
chunks in Qdrant
1,766
fabricated citations
67 down to 0

gh repo view librain

commits
105
stars
★ 1
files
316
licence
MIT
first commit
1 May 2026
last commit
19 Jun 2026
  • C# 97.9%
  • Shell 1.6%
  • TeX 0.5%

01LIBRAIN

An open-source multi-agent RAG system in .NET 10 that reads scientific papers and proposes citation-grounded hypotheses.

A multi-agent RAG system that reads scientific papers and proposes new hypotheses, built in .NET 10.
  • Reader Agent: extracts text from arXiv PDFs, chunks it, embeds it and stores it in Qdrant.
  • Synthesis Agent: retrieves the top chunks and asks Claude for citation-grounded hypotheses.
  • Evaluator Agent: LLM-as-a-Judge with a fixed rubric (plausibility, novelty, clarity).
  • Discovery Mode: the part that goes beyond the sources is flagged as novelClaim.
POST /api/discover

# CASE_STUDY.md

LIBRAIN

Problem

  • Most RAG and AI-agent tutorials are written in Python, and teams that run on .NET hear that “AI requires Python”.
  • And when an LLM connects research papers, it can cite sources that were never retrieved.

Approach

  • A complete multi-agent retrieval pipeline built end to end in .NET 10: a Reader, then Synthesis, then an Evaluator.
  • A parallel Discovery Mode puts the speculative part of an answer in a separate field, novelClaim, and a ClaimValidator labels each of its sentences GROUNDED, EXTRAPOLATED or RISKY.
  • A citation contract drops any reference that does not resolve to the retrieved set.
  1. 41 papersarXiv
  2. Readerchunk + embed
  3. Qdrant1,766 chunks
  4. SynthesisDiscovery
  5. EvaluatorClaimValidator
  6. Hypothesescited

What I built

  • Agents in C# on Anthropic Claude, OpenAI embeddings (text-embedding-3-small) and Qdrant; every step is logged with a correlation ID.
  • Baseline agents (naive RAG, a single LLM) for a three-system comparison, an experiments CLI and an xUnit test suite.
  • A companion paper on Zenodo.

Result

papers read
41
chunks in Qdrant
1,766
fabricated citations
67 down to 0

On a 41-paper cross-domain corpus, the contract-free baseline produced 67 fabricated citations. The contracted pipeline let 0 through.

What I learned

  • Synthetic tests don’t replace a smoke test on real files: one real arXiv PDF exposed a word-spacing bug and gaps in section detection that seven passing unit tests had missed.
  • Respect the real rate limit: sizing embedding batches to the actual tier limit worked better than retry logic.

The full story, step by stepSee how LIBRAIN thinks The paper (DOI)

LIBRAIN/Agents/ReaderAgent.cs75 linesOpen on GitHub

using System.Diagnostics;using LIBRAIN.Embeddings;using LIBRAIN.Reading;using LIBRAIN.Storage; namespace LIBRAIN.Agents; public sealed class ReaderAgent(    ILogger<ReaderAgent> logger,    PdfTextExtractor extractor,    RecursiveChunker chunker,    OpenAIEmbeddingClient embeddings,    QdrantPaperRepository repository){    private readonly ILogger<ReaderAgent> _logger = logger;    private readonly PdfTextExtractor _extractor = extractor;    private readonly RecursiveChunker _chunker = chunker;    private readonly OpenAIEmbeddingClient _embeddings = embeddings;    private readonly QdrantPaperRepository _repository = repository;     public async Task<IngestResult> IngestAsync(        Stream pdfStream,        string paperId,        CancellationToken ct = default)    {        var correlationId = Guid.NewGuid();        using var scope = _logger.BeginScope(new Dictionary<string, object>        {            ["correlationId"] = correlationId,            ["paperId"] = paperId,        });         var sw = Stopwatch.StartNew();        _logger.LogInformation("Ingest started for {PaperId}", paperId);         var doc = _extractor.Extract(pdfStream);        var chunks = _chunker.Chunk(doc.FullText, doc.Pages);        if (chunks.Count == 0)        {            _logger.LogWarning("No chunks produced; nothing to persist");            return new IngestResult(paperId, 0, correlationId);        }         var contents = chunks.Select(c => c.Content).ToArray();        var vectors = await _embeddings.GenerateAsync(contents, ct);         var title = string.IsNullOrWhiteSpace(doc.Title) ? paperId : doc.Title;        var ingestedAt = DateTime.UtcNow;        var records = new ChunkRecord[chunks.Count];        for (int i = 0; i < chunks.Count; i++)        {            var c = chunks[i];            records[i] = new ChunkRecord(                PaperId: paperId,                ChunkIndex: c.ChunkIndex,                Content: c.Content,                Embedding: vectors[i],                Title: title,                Authors: doc.Authors,                Year: doc.Year,                Section: c.Section,                PageNumber: c.PageNumber,                IngestedAt: ingestedAt);        }         await _repository.PersistAsync(records, ct);         _logger.LogInformation(            "Ingest completed: {ChunkCount} chunks in {ElapsedMs}ms",            chunks.Count,            sw.ElapsedMilliseconds);         return new IngestResult(paperId, chunks.Count, correlationId);    }}

LIBRAIN/Agents/SynthesisAgent.cs198 lines · first 80 shownOpen on GitHub

using System.Diagnostics;using System.Text;using System.Text.Json.Nodes;using Anthropic.SDK.Common;using Anthropic.SDK.Messaging;using LIBRAIN.Models;using LIBRAIN.Storage;using Microsoft.Extensions.Options;using AnthropicTool = Anthropic.SDK.Common.Tool; namespace LIBRAIN.Agents; public sealed class SynthesisAgent(    ILogger<SynthesisAgent> logger,    AnthropicChatClient claude,    IOptions<ModelOptions> modelOptions){    private readonly ILogger<SynthesisAgent> _logger = logger;    private readonly AnthropicChatClient _claude = claude;    private readonly string _synthesisModel = ModelSelection.SynthesisModel(modelOptions.Value);     private const string SystemPromptText = """        You are a research synthesis assistant for a literature-review system. You are given        a user query and a numbered list of source excerpts retrieved from academic papers.         Form a single, conservative hypothesis grounded ONLY in the provided sources. Cite by        source number. List any claim in your hypothesis that is NOT directly supported by a        cited source in `unsupported_claims`; if all claims are supported, return an empty array.         If the sources are insufficient to form any defensible hypothesis: set `confidence`        below 0.3, populate `unsupported_claims` with what's missing, and write a hypothesis        stating the limitation explicitly (e.g., "The provided sources do not address X").         Always call the `submit_hypothesis` tool. Do not respond in plain text.        """;     // Schema is raw JSON because Anthropic.SDK.Messaging.Property in 5.10 has no Items field;    // it can't express array<integer> via the typed builder. Function's (string, string, JsonNode)    // ctor accepts a parsed schema directly.    private const string ToolSchemaJson = """        {          "type": "object",          "properties": {            "hypothesis":         { "type": "string",  "description": "A single conservative claim grounded only in the provided sources." },            "citation_indices":   { "type": "array",   "items": { "type": "integer" }, "description": "1-based indices into the SOURCES block, ordered by relevance." },            "confidence":         { "type": "number",  "description": "Self-reported 0.0-1.0; lower if sources are sparse or contradictory." },            "unsupported_claims": { "type": "array",   "items": { "type": "string" },  "description": "Substrings of the hypothesis that are NOT directly supported by the cited sources. Empty array if all claims are supported." }          },          "required": ["hypothesis", "citation_indices", "confidence", "unsupported_claims"]        }        """;     private static readonly AnthropicTool SubmitHypothesisTool =        new Function("submit_hypothesis", "Submit a citation-grounded hypothesis.", JsonNode.Parse(ToolSchemaJson)!);     public async Task<SynthesisResult> SynthesizeAsync(        string query,        IReadOnlyList<SearchHit> chunks,        Guid? correlationId = null,        CancellationToken ct = default)    {        var corrId = correlationId ?? Guid.NewGuid();        using var scope = _logger.BeginScope(new Dictionary<string, object>        {            ["correlationId"] = corrId,            ["chunkCount"] = chunks.Count,        });         if (chunks.Count == 0 || chunks.All(c => string.IsNullOrWhiteSpace(c.Content)))        {            _logger.LogWarning("Synthesis skipped: no usable source chunks");            return new SynthesisResult(                Hypothesis: "Insufficient sources to form a hypothesis.",                Citations: Array.Empty<SynthesisCitation>(),                Confidence: null,                UnsupportedClaims: Array.Empty<string>(),                CorrelationId: corrId);        }         var sw = Stopwatch.StartNew();

118 more lines on GitHub

LIBRAIN/Agents/ClaimValidatorAgent.cs234 lines · first 80 shownOpen on GitHub

using System.Diagnostics;using System.Text;using System.Text.Json.Nodes;using Anthropic.SDK.Common;using Anthropic.SDK.Constants;using Anthropic.SDK.Messaging;using LIBRAIN.Storage;using AnthropicTool = Anthropic.SDK.Common.Tool; namespace LIBRAIN.Agents; // Stage 2 of the claim-level hallucination mitigation prototype. After// DiscoveryAgent produces novelClaim + extrapolation_basis, this agent runs a// secondary Haiku-backed pass that scores each sentence of novel_claim against the// retrieved chunks and classifies it as GROUNDED, EXTRAPOLATED, or RISKY using the// rubric's hallucination definition. The aggregate risk is C#-computed as the max// of per-sentence probabilities to keep the score halo-resistant (mirroring the// Phase 2 Evaluator pattern).public sealed class ClaimValidatorAgent(    ILogger<ClaimValidatorAgent> logger,    AnthropicChatClient claude){    private readonly ILogger<ClaimValidatorAgent> _logger = logger;    private readonly AnthropicChatClient _claude = claude;     private const string SystemPromptText = """        You are a claim-level factuality validator. You are given the novel_claim        portion of a discovery hypothesis and the retrieved source chunks that were        available to the synthesizer. Your job is to split novel_claim into its        constituent sentences and classify each sentence under three statuses:         - GROUNDED: the sentence is directly supported by at least one retrieved          chunk. Cite the chunk(s) in supporting_chunks as "paper_id:chunk_index".        - EXTRAPOLATED: the sentence is speculative or hypothesis-framed. It goes          beyond the retrieved evidence but does NOT assert a specific factual claim          as established. Examples: "X could enable Y", "this suggests Y", "future          work may show Y". Speculation framed as hypothesis is EXTRAPOLATED, not          RISKY.        - RISKY: the sentence states a SPECIFIC FACTUAL CLAIM (a mechanism, a          quantity, a named entity, a date, an attribution, or a process detail) as          if it were established knowledge, AND that claim is not supported by any          retrieved chunk. The hallucination signature is confident factual framing          without retrieval support. Examples that ARE risky:            * "EEG biomarkers determine drug-target binding in real time" (specific              mechanism stated as fact, no retrieval support)            * "GraphCast achieves 98% accuracy on protein folding" (fabricated stat)            * "PharmAgents was released by DeepMind in 2024" (wrong attribution)          Examples that are NOT risky (these are EXTRAPOLATED):            * "Weather forecasting algorithms could plausibly transfer to protein              folding via shared mathematical structure"            * "Real-time biomarker integration may eventually inform drug discovery"        Hedging language ("could", "may", "suggests", "is hypothesized") is the        marker that distinguishes EXTRAPOLATED from RISKY. Confident factual framing        of an unsupported specific claim is the marker that distinguishes RISKY.         For each sentence also return factual_hallucination_probability in [0, 1].        GROUNDED ≈ 0.0, EXTRAPOLATED ≈ 0.1–0.3, RISKY ≈ 0.6–1.0. Use the full        continuous range; do not snap to round numbers.         Provide a one-sentence rationale per claim describing why you chose the        status. Also return an aggregate_risk in [0, 1] (the application will        recompute the canonical aggregate in code; your aggregate is a sanity        check).         Always call the `submit_claim_validation` tool. Do not respond in plain        text.        """;     private const string ToolSchemaJson = """        {          "type": "object",          "properties": {            "claims": {              "type": "array",              "minItems": 1,              "items": {                "type": "object",                "properties": {                  "sentence":           { "type": "string", "description": "Exact sentence from novel_claim." },                  "factuality_status":  { "type": "string", "enum": ["GROUNDED", "EXTRAPOLATED", "RISKY"] },

154 more lines on GitHub

LIBRAIN/Program.cs114 lines · first 80 shownOpen on GitHub

using LIBRAIN.Agents;using LIBRAIN.Embeddings;using LIBRAIN.Endpoints;using LIBRAIN.Models;using LIBRAIN.Reading;using LIBRAIN.Storage;using Microsoft.AspNetCore.Http.Features;using Microsoft.Extensions.Options;using Qdrant.Client;using Scalar.AspNetCore; const long maxUploadBytes = 50_000_000; // 50MB cap on PDF uploads (largest data/papers/ paper is ~9MB) var builder = WebApplication.CreateBuilder(args); builder.WebHost.ConfigureKestrel(options =>{    options.Limits.MaxRequestBodySize = maxUploadBytes;}); builder.Services.Configure<FormOptions>(options =>{    options.MultipartBodyLengthLimit = maxUploadBytes;}); var applicationInsightsConnectionString = builder.Configuration["ApplicationInsights:ConnectionString"];if (!string.IsNullOrWhiteSpace(applicationInsightsConnectionString)){    builder.Services.AddApplicationInsightsTelemetry();} builder.Services.AddOpenApi(); builder.Services.Configure<AnthropicOptions>(    builder.Configuration.GetSection(AnthropicOptions.SectionName));builder.Services.Configure<OpenAIOptions>(    builder.Configuration.GetSection(OpenAIOptions.SectionName));builder.Services.Configure<QdrantOptions>(    builder.Configuration.GetSection(QdrantOptions.SectionName));builder.Services.Configure<ModelOptions>(    builder.Configuration.GetSection(ModelOptions.SectionName)); // Qdrant.Client uses gRPC (port 6334), not REST (6333). Cloud clusters require https + apiKey;// local Docker dev uses neither. Empty ApiKey selects local mode automatically.builder.Services.AddSingleton<QdrantClient>(sp =>{    var options = sp.GetRequiredService<IOptions<QdrantOptions>>().Value;    return string.IsNullOrWhiteSpace(options.ApiKey)        ? new QdrantClient(options.Host, options.Port)        : new QdrantClient(            host: options.Host,            port: options.Port,            https: options.UseHttps,            apiKey: options.ApiKey);}); builder.Services.AddSingleton<AnthropicChatClient>();builder.Services.AddScoped<OpenAIEmbeddingClient>();builder.Services.AddScoped<LIBRAIN.Generation.OpenAIChatClient>();builder.Services.AddScoped<LIBRAIN.Generation.OpenAiDiscoveryAgent>();builder.Services.AddScoped<QdrantPaperRepository>();builder.Services.AddScoped<PdfTextExtractor>();builder.Services.AddScoped<RecursiveChunker>();builder.Services.AddScoped<ReaderAgent>();builder.Services.AddScoped<SynthesisAgent>();builder.Services.AddScoped<EvaluatorAgent>();builder.Services.AddScoped<DiscoveryAgent>();builder.Services.AddScoped<DiscoveryEvaluatorAgent>();builder.Services.AddScoped<ClaimValidatorAgent>();builder.Services.AddScoped<NoveltyScorer>();builder.Services.AddScoped<SingleLlmAgent>();builder.Services.AddScoped<NaiveRagAgent>(); var app = builder.Build(); if (app.Environment.IsDevelopment()){    app.MapOpenApi();    app.MapScalarApiReference();}

34 more lines on GitHub

.secrets/key.txtnot on GitHub

# You opened the dotfiles. Most people don't.# This one is yours to take: 

mainC#★ 1README.mdGitHub

gh repo view TrendyolOrderService

commits
17
stars
★ 9 · 1 fork
files
22
licence
none
first commit
5 Aug 2021
last commit
8 Nov 2025
  • C# 100%

02Trendyol Order Service

A .NET 7 background service that pulls Trendyol orders into SQL Server.

A .NET 7.0 background service that pulls orders from the Trendyol API and saves them to SQL Server. It runs continuously and checks for new orders every 10 seconds.
  • Fetches orders every 10 seconds
  • Saves order, shipping and invoice addresses, product lines and package history
  • Skips orders that already exist
  • If one order fails, rolls that order back and continues with the next
dotnet run

# CASE_STUDY.md

Trendyol Order Service

Problem

  • At Teknoraks (2019–2021) I built .NET Worker Services that brought in real-time orders from Trendyol, Hepsiburada, Çiçeksepeti and n11.
  • After I left, the problem still interested me, so I kept going on my own: this public repo is my own continuation, written after Teknoraks, that pulls Trendyol orders into SQL Server.

Approach

A .NET Worker Service that runs in the background, calls the Trendyol API every 10 seconds and writes each new order inside its own transaction.

What I built

  • Worker.cs polls the supplier orders endpoint with Basic auth from appsettings.json.
  • For every order it saves the order, the shipment and invoice addresses, the product lines and the package history, each in its own table (CreateDatabase.txt).
  • Orders that already exist are skipped; if one fails, only that order rolls back and the loop carries on.

Result

On GitHub since August 2021, last updated November 2025; 9 stars and 1 fork.

What I learned

A poller that runs every 10 seconds has to be safe to repeat: skipping orders that already exist and rolling back one failed order at a time is what keeps the database clean.

Open on GitHub

~/TrendyolOrderService dotnet run

running · fake data, the repo’s real behaviour

Illustrationfake orders · the real loop: poll every 10 s, skip duplicates, roll back one order on failure

Workernext poll in 10 s

  1. #TY-402183 linessaved
  2. #TY-402091 linesaved

Utils/TokenManager.cs16 linesOpen on GitHub

using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks; namespace TrendyolOrderService.Utils{    public class TokenManager    {        public static string GetToken(string textToEncode)        {            return EncodeDecodeManager.Base64Encode(textToEncode);        }    }}

Worker.cs257 lines · first 80 shownOpen on GitHub

using Microsoft.Extensions.Hosting;using Microsoft.Extensions.Logging;using RestSharp;using System;using System.Linq;using System.Threading;using System.Threading.Tasks;using Newtonsoft.Json;using TrendyolOrderService.DBContext;using TrendyolOrderService.Context;using TrendyolOrderService.Models;using TrendyolOrderService.Utils;using Microsoft.Extensions.Configuration; namespace TrendyolOrderService{    public class Worker : BackgroundService    {        private readonly ILogger<Worker> _logger;        private readonly IConfiguration _configuration;         public Worker(ILogger<Worker> logger, IConfiguration configuration)        {            _logger = logger;            _configuration = configuration;        }         protected override async Task ExecuteAsync(CancellationToken stoppingToken)        {            // Pull configuration values from appsettings.json            var apiKey = _configuration["TrendyolApi:ApiKey"];            var apiSecret = _configuration["TrendyolApi:ApiSecret"];            var supplierId = _configuration["TrendyolApi:SupplierId"];            var pollingInterval = int.TryParse(_configuration["TrendyolApi:PollingIntervalSeconds"], out int interval) ? interval : 10;             // Validate credentials before starting the service loop            if (string.IsNullOrWhiteSpace(apiKey) || string.IsNullOrWhiteSpace(apiSecret) || string.IsNullOrWhiteSpace(supplierId))            {                _logger.LogError("API credentials are not configured. Please check appsettings.json");                return;            }             // Main service loop - runs until cancellation is requested            while (!stoppingToken.IsCancellationRequested)            {                try                {                    _logger.LogInformation("Worker running at: {time}", DateTimeOffset.Now);                     string token = TokenManager.GetToken($"{apiKey}:{apiSecret}");                    var orders = await FetchOrdersAsync(supplierId, token);                     if (orders?.content != null)                    {                        await ProcessOrdersAsync(orders);                    }                }                catch (Exception ex)                {                    // Log errors but continue the service - don't let one failure stop the polling                    _logger.LogError(ex, "Error occurred while processing orders");                }                 await Task.Delay(pollingInterval * 1000, stoppingToken);            }        }         private async Task<TrendyolOrderContext.TrendyolRest> FetchOrdersAsync(string supplierId, string token)        {            var client = new RestClient($"https://api.trendyol.com/sapigw/suppliers/{supplierId}/orders");            var request = new RestRequest { Method = Method.GET, Timeout = 30000 };            request.AddHeader("Authorization", $"Basic {token}");                        var response = await client.ExecuteAsync(request);                        // Return null on failure            if (!response.IsSuccessful)            {                _logger.LogWarning("API request failed with status: {status}", response.StatusCode);                return null;

177 more lines on GitHub

Program.cs25 linesOpen on GitHub

using Microsoft.Extensions.DependencyInjection;using Microsoft.Extensions.Hosting;using Serilog; namespace TrendyolOrderService{    public class Program    {        public static void Main(string[] args)        {            CreateHostBuilder(args).Build().Run();        }         public static IHostBuilder CreateHostBuilder(string[] args) =>            Host.CreateDefaultBuilder(args)                .ConfigureLogging(logging =>                {                    logging.AddSerilog();                })                .ConfigureServices((hostContext, services) =>                {                    services.AddHostedService<Worker>();                });    }}

masterC#★ 9README.mdGitHub

gh repo view citizen-plane-flight-service

commits
1
stars
0
files
14
licence
none
first commit
29 Aug 2025
last commit
29 Aug 2025
  • JavaScript 100%

03CitizenPlane Flight Service API

A flight search API with caching, rate limiting and request validation.

A flight search service powered by the CitizenPlane API.
  • Real-time flight search with caching
  • Rate limiting: 30 searches per minute per IP
  • Request validation (IATA codes, dates, 1–9 seats)
  • Structured JSON errors
GET /api/flights?origin=LAX&destination=JFK&start=2025-12-25&seats=2

# CASE_STUDY.md

CitizenPlane Flight Service

Problem

At Calibre Tour, before Paximum, I tried to bring CitizenPlane in as an external flight provider. That integration didn’t go ahead, so I built it on my own GitHub, to keep the idea alive and as a portfolio piece.

Approach

An Express service where each concern is its own middleware: validation, rate limiting, then a cached service call.

What I built

  • validation.js: a Joi schema for IATA codes, dates, 1–9 seats, sort and currency, with field-level 400 errors.
  • rateLimiter.js: 30 searches per minute per IP and 100 requests per minute for everything else.
  • flightService.js: responses cached in MySQL under a key built from the query, for 10 minutes by default.
  • A health endpoint and structured JSON errors.

Result

Shipped as a single commit on 29 August 2025.

What I learned

A cache for repeated searches plus a per-IP rate limit is what lets a small service sit safely in front of someone else’s API.

Open on GitHub

~/citizen-plane-flight-service npm run dev

running · fake data, the repo’s real behaviour

Illustrationfake responses · the real rules: cache, 30 searches / min / IP, validated input

GET /api/flights?origin=LAX&destination=JFK&start=2025-12-25&seats=2

0 / 30 this minute

200 {
  "success": true,
  "source": "citizenplane",
  "searchCriteria": { "route": "LAX → JFK" },
  "performance": { "cached": false },
  "data": { "flights": […] }
}

src/middlewares/rateLimiter.js38 linesOpen on GitHub

const rateLimit = require('express-rate-limit'); const searchRateLimit = rateLimit({  windowMs: 60 * 1000,  max: 30,  message: {    error: 'Too many flight searches',    details: 'You have exceeded the rate limit. Please try again in a minute.',    retryAfter: '60 seconds'  },  standardHeaders: true,  legacyHeaders: false,  handler: (req, res) => {    res.status(429).json({      error: 'Rate limit exceeded',      details: 'Too many requests. Please slow down.',      retryAfter: Math.round(req.rateLimit.resetTime / 1000),      limit: req.rateLimit.limit,      remaining: req.rateLimit.remaining,    });  },}); const generalRateLimit = rateLimit({  windowMs: 60 * 1000,  max: 100,  message: {    error: 'Too many requests',    details: 'You have exceeded the rate limit. Please try again later.',  },  standardHeaders: true,  legacyHeaders: false,}); module.exports = {  searchRateLimit,  generalRateLimit,};

src/middlewares/validation.js88 lines · first 80 shownOpen on GitHub

const Joi = require('joi'); const flightSearchSchema = Joi.object({  origin: Joi.string()    .pattern(/^[A-Za-z]{3}$/)    .required()    .messages({      'string.pattern.base': 'Origin must be a valid 3-letter IATA code',      'any.required': 'Origin is required'    }),    destination: Joi.string()    .pattern(/^[A-Za-z]{3}$/)    .required()    .messages({      'string.pattern.base': 'Destination must be a valid 3-letter IATA code',       'any.required': 'Destination is required'    }),      start: Joi.string()    .pattern(/^\d{4}-\d{2}-\d{2}$/)    .optional()    .messages({      'string.pattern.base': 'Start date must be in YYYY-MM-DD format'    }),      end: Joi.string()    .pattern(/^\d{4}-\d{2}-\d{2}$/)    .optional()    .messages({      'string.pattern.base': 'End date must be in YYYY-MM-DD format'    }),      seats: Joi.number()    .integer()    .min(1)    .max(9)    .optional()    .messages({      'number.min': 'Seats must be at least 1',      'number.max': 'Seats cannot exceed 9',      'number.integer': 'Seats must be a whole number'    }),      pageToken: Joi.string().optional(),  sort: Joi.string().valid('price', 'duration', 'departure').optional(),  currency: Joi.string().valid('EUR', 'USD', 'GBP').optional(),}); const validateFlightSearch = (req, res, next) => {  const { error, value } = flightSearchSchema.validate(req.query, {    abortEarly: false,    stripUnknown: true,  });   if (error) {    const errorDetails = error.details.map(detail => ({      field: detail.path.join('.'),      message: detail.message,      value: detail.context?.value,    }));     return res.status(400).json({      error: 'Validation failed',      details: errorDetails,      example: {        valid_request: '/api/flights?origin=LAX&destination=JFK&start=2025-12-25&seats=2',        parameters: {          origin: 'Required 3-letter IATA code (e.g., LAX, JFK, LHR)',          destination: 'Required 3-letter IATA code',          start: 'Optional date in YYYY-MM-DD format',          end: 'Optional date in YYYY-MM-DD format',          seats: 'Optional number 1-9',          pageToken: 'Optional pagination token',          sort: 'Optional: price, duration, or departure',          currency: 'Optional: EUR, USD, or GBP',        }      }    });  }

8 more lines on GitHub

src/routes/flights.js16 linesOpen on GitHub

const express = require('express');const { search, getDetails, health } = require('../controllers/flightsController');const { searchRateLimit, generalRateLimit } = require('../middlewares/rateLimiter');const { validateFlightSearch } = require('../middlewares/validation');const router = express.Router(); router.use(generalRateLimit); router.get('/flights', searchRateLimit, validateFlightSearch, search);router.get('/flights/:flightId', getDetails);router.get('/health', (req, res, next) => {  req.skipRateLimit = true;  next();}, health); module.exports = router;

src/services/flightService.js47 linesOpen on GitHub

const pool = require('../db/pool');const { searchFlights } = require('./citizenplaneClient'); const TTL = parseInt(process.env.CACHE_TTL_SECONDS || '600', 10); const buildCacheKey = (q) => {  const { origin, destination, start, end, seats, next_page_id, customerCode } = q;  return [    'flights',    origin?.toUpperCase(),    destination?.toUpperCase(),    start || '',    end || '',    seats || '',    next_page_id || '',    customerCode || ''  ].join(':');}; async function getFromCache(cacheKey) {  const [rows] = await pool.query(    'SELECT response_json FROM flights_cache WHERE cache_key=? AND expires_at > NOW()',    [cacheKey]  );  return rows[0]?.response_json || null;} async function saveToCache(cacheKey, reqObj, respObj) {  const [rows] = await pool.query(    `REPLACE INTO flights_cache (cache_key, request_json, response_json, expires_at)     VALUES (?, CAST(? AS JSON), CAST(? AS JSON), DATE_ADD(NOW(), INTERVAL ? SECOND))`,    [cacheKey, JSON.stringify(reqObj), JSON.stringify(respObj), TTL]  );  return rows;} async function searchFlightsWithCache(query) {  const cacheKey = buildCacheKey(query);  const cached = await getFromCache(cacheKey);  if (cached) return cached;   const data = await searchFlights(query);  await saveToCache(cacheKey, query, data);  return data;} module.exports = { searchFlightsWithCache };

mainJavaScriptREADME.mdGitHub

gh repo view google-hotel-fetcher

commits
8
stars
0
files
16
licence
none
first commit
26 Apr 2025
last commit
28 Apr 2025
  • JavaScript 60.1%
  • CSS 23%
  • HTML 16.9%

04Global Hotel Fetcher

Fetches hotels worldwide from Google Places with a grid search and stores them in MongoDB.

Fetches hotel data worldwide from the Google Places API, stores it in MongoDB and serves it through search and listing endpoints.
  • Grid-based search: expands the search area with a coordinate grid
  • Ratings, reviews, photos and addresses
  • Filter by city and rating, sort, search
  • An import wizard in the web interface
POST /api/import-hotels/:city?grid=…&distance=…&radius=…

# CASE_STUDY.md

Global Hotel Fetcher

Problem

Collect real hotel data for any city in the world and keep it searchable.

Approach

Geocode the city, split the area into a coordinate grid, and run a Google Places search in every cell, following the result pages.

What I built

  • An Express API: POST /api/import-hotels/:city with grid, distance and radius options, plus listing and search endpoints.
  • MongoDB storage with Mongoose, with ratings, reviews, photos and addresses.
  • A vanilla JS front end with an import wizard, filters, sorting, and grid and list views.

Result

Built in three days, 26–28 April 2025, in 8 commits.

What I learned

One search on a paged places API only reaches so far; covering a whole city took a coordinate grid and following every page token.

Open on GitHub

~/google-hotel-fetcher npm run dev

running · fake data, the repo’s real behaviour

Illustrationfake map and hotels · the real idea: split a city into a grid and search every cell

cells 0/9 · hotels 0

models/hotel.model.js23 linesOpen on GitHub

const mongoose = require('mongoose'); const reviewSchema = new mongoose.Schema({  author: { type: String, required: true },  text: { type: String, required: true },  rating: { type: Number, required: true },}); const hotelSchema = new mongoose.Schema({  name: { type: String, required: true },  place_id: { type: String, required: true, unique: true },  address: { type: String, required: true },  location: {    lat: { type: Number, required: true },    lng: { type: Number, required: true }  },  rating: { type: Number },  hotel_photos: [String],  reviews: [reviewSchema],  createdAt: { type: Date, default: Date.now }}); module.exports = mongoose.model('Hotel', hotelSchema);

routes/hotel.routes.js13 linesOpen on GitHub

const express = require('express');const router = express.Router();const { importHotels, getHotels, testAPI } = require('../controllers/hotel.controller'); console.log('Setting up hotel routes'); router.get('/test-api', testAPI);router.get('/hotels', getHotels); router.post('/import-hotels', importHotels);router.post('/import-hotels/:city', importHotels); module.exports = router;

utils/hotelAPI.js194 lines · first 80 shownOpen on GitHub

const axios = require('axios'); const getPhotoUrl = (photoReference) => {  if (!photoReference || typeof photoReference !== 'string' || photoReference.trim() === '') {    return null;  }    return `/api/hotel-photo/${photoReference}`;}; const getHotelDetails = async (placeId) => {  try {    const fields = 'name,rating,formatted_address,photos,reviews';    const url = `https://maps.googleapis.com/maps/api/place/details/json?place_id=${placeId}&fields=${fields}&key=${process.env.GOOGLE_API_KEY}`;     const response = await axios.get(url);    const data = response.data.result;     const hotelName = data.name || 'Hotel';    const defaultImage = `/api/placeholder-image?text=${encodeURIComponent(hotelName)}`;    let hotelPhotos = [defaultImage];     if (data.photos && data.photos.length > 0) {      const googlePhotos = data.photos        .map(photo => getPhotoUrl(photo.photo_reference))        .filter(url => url !== null);            if (googlePhotos.length > 0) {        hotelPhotos = hotelPhotos.concat(googlePhotos);      }    }     return {      name: data.name,      address: data.formatted_address,      rating: data.rating,      hotel_photos: hotelPhotos,      reviews: data.reviews ? data.reviews        .filter(r => r.text && r.text.trim() !== '')        .map(r => ({          author: r.author_name || 'Anonymous',          text: r.text,          rating: r.rating || 0        }))      : []    };  } catch (error) {    console.error(`Error fetching hotel details for place_id ${placeId}:`, error);    return {      name: "Hotel Information Unavailable",      address: "Address unavailable",      rating: 0,      hotel_photos: [`/api/placeholder-image?text=Error+Loading+Hotel`],      reviews: []    };  }};  const searchHotelsByLocation = async (location, radius = 5000, maxResults = Number.MAX_SAFE_INTEGER) => {  try {    let allHotels = [];    let nextPageToken = null;    let pageCount = 0;        do {      let url = `https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=${location.lat},${location.lng}&radius=${radius}&type=lodging&key=${process.env.GOOGLE_API_KEY}`;      if (nextPageToken) {        url += `&pagetoken=${nextPageToken}`;      }            console.log(`Fetching hotels page ${pageCount+1}...`);      const response = await axios.get(url);      const results = response.data.results || [];            allHotels = [...allHotels, ...results];      nextPageToken = response.data.next_page_token;      pageCount++;            if (nextPageToken) {

114 more lines on GitHub

masterJavaScriptREADME.mdGitHub

gh repo view EvaExchange-API

commits
19
stars
0
files
30
licence
none
first commit
20 Jan 2024
last commit
26 Jan 2024
  • JavaScript 100%

05EvaExchange-API

A stock exchange simulation API for trades and portfolios.

A Node.js API for managing trades and portfolios in a stock exchange simulation.
  • Buy shares
  • Sell owned shares from a portfolio
  • Trade history
  • Portfolio and share management
npx sequelize-cli db:migrate

# CASE_STUDY.md

EvaExchange API

Problem

A stock exchange simulation: trades and portfolios behind an API.

Approach

Express on Sequelize and PostgreSQL, layered as routes → controllers → repositories → models, with migrations and seeders.

What I built

Buy shares; sell only shares the portfolio owns; trade history; portfolio and share management.

Result

19 commits over one week, 20–26 January 2024.

What I learned

A trade touches two records, the trade and the portfolio, so every check (registered portfolio, enough funds, shares owned) has to pass before either is written.

Open on GitHub

~/EvaExchange-API npm start

running · fake data, the repo’s real behaviour

Illustrationfake shares and prices · the real operations: buy, sell what you own, trade history

qty10

Portfolio

  • EVA20
  1. BUY20 EVA @ 12.40filled

controllers/tradeController.js70 linesOpen on GitHub

const tradeRepository = require('../repository/tradeRepository'); class TradeController {  async getAllTrades(req, res) {    try {      const trades = await tradeRepository.getAllTrades();      res.json(trades);    } catch (error) {      console.error(error);      res.status(500).json({ error: 'Internal Server Error' });    }  }   async getTradeById(req, res) {    const { tradeId } = req.params;    try {      const trade = await tradeRepository.getTradeById(tradeId);      if (!trade) {        res.status(404).json({ error: 'Trade not found' });        return;      }      res.json(trade);    } catch (error) {      console.error(error);      res.status(500).json({ error: 'Internal Server Error' });    }  }   async createTrade(req, res) {    const { type, quantity, price, shareId } = req.body;     try {      const newTrade = await tradeRepository.createTrade({ type, quantity, price, shareId });      res.status(201).json(newTrade);    } catch (error) {      console.error(error);      res.status(500).json({ error: 'Internal Server Error' });    }  }   async updateTrade(req, res) {    const { tradeId } = req.params;    const { type, quantity, price, shareId } = req.body;     try {      const trade = await tradeRepository.updateTrade(tradeId, { type, quantity, price, shareId });      res.json(trade);    } catch (error) {      console.error(error);      res.status(500).json({ error: 'Internal Server Error' });    }  }   async deleteTrade(req, res) {    const { tradeId } = req.params;    try {      const deletedTrade = await tradeRepository.deleteTrade(tradeId);      if (deletedTrade) {        res.json(deletedTrade);      } else {        res.status(404).json({ error: 'Trade not found' });      }    } catch (error) {      console.error(error);      res.status(500).json({ error: 'Internal Server Error' });    }  }} module.exports = TradeController;

models/Trade.js23 linesOpen on GitHub

module.exports = (sequelize, DataTypes) => {  const Trade = sequelize.define('Trade', {    type: DataTypes.STRING,    quantity: DataTypes.INTEGER,    price: DataTypes.DECIMAL(10, 2),    shareId: {      type: DataTypes.INTEGER,      allowNull: false,     },    portfolioId: {      type: DataTypes.INTEGER,      allowNull: false,     },  });   Trade.associate = (models) => {    Trade.belongsTo(models.Share, { foreignKey: 'shareId' });     //The foreignKey relation added to Portfolio     Trade.belongsTo(models.Portfolio, { foreignKey: 'portfolioId' });  };   return Trade;};

routes/tradeRoutes.js161 lines · first 80 shownOpen on GitHub

const express = require('express');const router = express.Router();const { Trade, Share, Portfolio } = require('../models'); // Get all tradesrouter.get('/', async (req, res) => {  try {    const trades = await Trade.findAll();    res.json(trades);  } catch (error) {    console.error(error);    res.status(500).json({ error: 'Internal Server Error' });  }}); // Get a specific trade by IDrouter.get('/:id', async (req, res) => {  const { id } = req.params;  try {    const trade = await Trade.findByPk(id);    if (!trade) {      return res.status(404).json({ error: 'Trade not found' });    }    res.json(trade);  } catch (error) {    console.error(error);    res.status(500).json({ error: 'Internal Server Error' });  }}); // Create a new trade (BUY operation)router.post('/buy', async (req, res) => {  const { symbol, quantity, portfolioId } = req.body;  try {    // Check if the share is registered    const share = await Share.findOne({ where: { symbol } });    if (!share) {      return res.status(400).json({ error: 'Specified share is not registered' });    }     // Check if the portfolio is registered    const portfolio = await Portfolio.findByPk(portfolioId);    if (!portfolio) {      return res.status(400).json({ error: 'Specified portfolio is not registered' });    }     // Calculate the total cost based on the latest share price    const price = share.price;    const totalCost = quantity * price;     // Check if the user has sufficient funds in the portfolio    if (portfolio.value < totalCost) {      return res.status(400).json({ error: 'Insufficient funds in the portfolio' });    }     // Create a new BUY trade    const newTrade = await Trade.create({ type: 'BUY', quantity, price, shareId: share.id, portfolioId });     // Update the portfolio value by subtracting the total cost    await portfolio.update({ value: portfolio.value - totalCost });     res.status(201).json(newTrade);  } catch (error) {    console.error(error);    res.status(500).json({ error: 'Internal Server Error' });  }}); // Create a new trade (SELL operation)router.post('/sell', async (req, res) => {  const { symbol, quantity, portfolioId } = req.body;   const numericValue = parseFloat(req.body.value);   // Check numeric value in request body  if (isNaN(numericValue)) {    return res.status(400).json({ error: 'Invalid numeric value for portfolio value' });  }   try {

81 more lines on GitHub

masterJavaScriptREADME.mdGitHub

gh repo view roadrunner-studio

visibility
private
live at
roadrunnerstudio.nl
stack
Next.js · PostgreSQL · Prisma

06roadrunnerstudio.nl

A full-stack client website built entirely in Next.js, front end and back end, with a custom admin panel and multi-language support. I designed and built all of it.

  • Front end and back end in Next.js
  • A custom admin panel
  • Multi-language support

# CASE_STUDY.md

roadrunnerstudio.nl

Problem

My friend Rohan runs RoadRunner Studio, a music recording studio in Rotterdam. He needed a website where people can book a session online, in English and Dutch, and a way to manage those bookings.

Approach

One Next.js codebase (App Router, TypeScript) for the site and its back end, with Prisma for the data, next-intl for English and Dutch, and Resend for email.

What I built

  • Online booking: pick an available date and time and get a confirmation email straight away.
  • An admin dashboard to review bookings, approve or reject them, filter by status and read the customer’s notes.
  • Status emails sent automatically, in the customer’s own language.
  • I designed and built all of it.

Result

Live at roadrunnerstudio.nl in English and Dutch. The repository is private.

What I learned

A booking is a small state machine (pending, approved, rejected), and every change of state has to reach the customer in their own language.

Visit roadrunnerstudio.nl

~/roadrunnerstudio open https://roadrunnerstudio.nl

running · fake data, the repo’s real behaviour

Illustrationa wireframe, not the real site · the real idea: content edited in a custom admin panel

roadrunnerstudio.nl

Studio headline

Book now

privateREADME.mdVisit site

Code fetched from GitHub with scripts/fetch-repo-files.mjs; languages, commits and stars from the GitHub API, checked 15 Nov 2026. Every demo uses made-up data to show the repo’s real behaviour.

04case study

How LIBRAIN works

LIBRAIN is an open-source multi-agent RAG system, built end to end in .NET 10, that reads scientific papers and proposes hypotheses whose every citation resolves to a chunk in the corpus. Follow one Discovery Mode query through it, in eight steps.

  • .NET 10
  • ASP.NET Core Minimal APIs
  • Claude Sonnet 4.6 · Haiku 4.5
  • OpenAI text-embedding-3-small
  • Qdrant
  • Semantic Kernel
  • PdfPig
  • Application Insights

Scroll, or tap a step on the rail. At step 04 you pick the question.

  1. 01papersReader agent · PdfPig

    41 papers go in.

    The Reader agent ingests arXiv PDFs from very different fields, so Discovery Mode has something to connect. A 5-paper seed on RAG and agents (218 chunks) proved the pipeline; a second round widened it until every cross-domain pair had at least two strongly relevant papers on each side.

    • RAG & agentic methods
    • drug discovery & proteins
    • weather, climate & energy
    • agriculture & clinical trials
    • cognition & neuroscience
    under the hood
    POST /api/papers/ingest        multipart PDF
      extract → chunk → embed → persist
      ← paperId, chunk count, correlation ID

    PdfPig's ContentOrderTextExtractor rebuilds glyph order with proper word spacing; the default extractor dropped the spaces on column-layout PDFs. Synthetic tests had passed with 0/15 sections detected. Real arXiv papers exposed the bug: 17/18 sections detected after the fix.

  2. 02chunksRecursiveChunker.cs

    Cut into 1,766 chunks.

    A recursive chunker tries a paragraph break first, then a sentence, and only then a hard cut: a 512-token target (about 2,000 characters), a 1,024 max, 15% overlap. Every chunk keeps its offset, page number and section heading, so a citation can point back to a span you can check.

    under the hood
    private static int ChooseEnd(string text, int start)
    {
        int remaining = text.Length - start;
        if (remaining <= MaxChars) return text.Length;
        int targetEnd = start + TargetChars;
        int maxEnd = start + MaxChars;
        // Prefer paragraph boundary in [target, max]
        int paraEnd = LatestMatchIndex(ParagraphBreakRegex(), text, targetEnd, maxEnd);
        if (paraEnd > start) return paraEnd;
        // Fall back to sentence boundary
        int sentEnd = LatestMatchIndex(SentenceBreakRegex(), text, targetEnd, maxEnd);
        if (sentEnd > start) return sentEnd;
        // Hard cut as last resort
        return maxEnd;
    }

    From LIBRAIN/Reading/RecursiveChunker.cs. TargetChars = 2000, MaxChars = 4000; each chunk also rewinds OverlapChars = 300 to keep context across the boundary.

  3. 03vectorsOpenAI · Qdrant

    Each chunk becomes 1,536 numbers.

    OpenAI text-embedding-3-small turns every chunk into a vector, in batches sized to the account's real rate limit. All 1,766 live in Qdrant's librain_chunks collection under deterministic UUID v5 IDs, so re-ingesting a paper updates it instead of duplicating it.

    Drawn here in three dimensions and coloured by corpus domain: an illustration, not a projection of the real vectors.

    under the hood
    batch
    ≤ 100 inputs · ≤ 35K tokens · 1.5 s gap
    limit
    Tier 1: 40K tokens per minute
    id
    UUID v5 (RFC 4122): SHA-1 over a project namespace + paperId-chunkIndex
    store
    Qdrant · librain_chunks · cosine
    boot
    collection created lazily behind a Lazy<Task>: the app starts before Qdrant is reachable

    Catch: an early 250K-token batch assumed Tier 2 and rejected 2 of 5 papers on a fresh Tier 1 account. The fix was honest sizing, with no retry logic.

  4. 04questionQdrant cosine

    Pick a question.

    Discovery Mode takes one or two topics, embeds them the same way, and Qdrant runs a cosine search for the nearest chunks. These are three real runs from the project; pick one and watch where it lands.

    the question

    It ends up citing Aurora (chunks 0, 5), GraphCast (16, 19) and Pangu-Weather (4).

    It ends up citing the RAG paper (chunks 0, 2, 10), PharmAgents (6, 7) and the 2508.14111 survey (38).

    It ends up citing PharmAgents (chunks 1, 2), the 2508.14111 survey (33), GraphCast (8, 65) and Aurora (16).

    Each hit carries paperId, chunkIndex, page and section, so footnotes render without a second query. Below Qdrant's 10K-point HNSW threshold the brute-force scan stays under 200 ms.

    under the hood

    A citation record, from the README's Phase 2 smoke test:

    { "paperId": "2005.11401", "section": "1 Introduction", "pageNumber": 1 }

    Seed-corpus check: “How does retrieval augmented generation work?” returned all 5 top hits from 2005.11401, the RAG paper itself, from pages 1, 2, 8 and 9, at cosine 0.52 to 0.61.

  5. 05discoveryClaude Sonnet 4.6

    Discovery drafts, and fences the leap.

    Claude Sonnet 4.6 gets an inverted prompt that invites going beyond the evidence. Whatever goes beyond comes back in its own novelClaim field, exempt from citation validation by contract, with every sentence labelled generalisation, analogy or pure speculation.

    novelClaim · exempt from citation validationFine-tuning such models on domain-specific renewable energy variables, such as hub-height wind profiles or photovoltaic irradiance, could unlock a new class of AI-native energy planning tools that co-optimize forecast accuracy and infrastructure investment decisions in a single differentiable framework.
    novelClaim · exempt from citation validationCrucially, such a system would self-evolve over successive design cycles by accumulating an experience database of past docking results and interaction reports, allowing the retriever to progressively sharpen its relevance signal toward high-affinity, drug-like chemical space.
    novelClaim · exempt from citation validationA climate-adaptation counterpart could iteratively refine regional adaptation strategies, such as infrastructure hardening or crop-switching recommendations, by incorporating real-time extreme-heat and atmospheric-river forecasts from models like GraphCast as dynamic environmental inputs. This cross-domain transfer would enable the first fully autonomous, interpretable pipeline that closes the loop from probabilistic climate hazard forecasting to actionable, location-specific adaptation policy generation.

    /api/querySynthesis Evaluator

    /api/discoverDiscovery 3 scorersthis story

    Both share the Reader and Qdrant. Discovery runs as a parallel branch; it does not replace the Synthesis → Evaluator path.
    under the hood
    Discovery output
      hypothesis           the whole draft
      supportingEvidence   the cited chunks
      novelClaim           the speculative part, fenced
        extrapolation_basis   generalisation | analogy | pure speculation
                              (one label per sentence)

    On the query path, Synthesis (Sonnet 4.6, forced tool use for citations) feeds an Evaluator (Haiku 4.5, T=0.0) that scores groundedness, relevance and completeness. The synthesis model is config-driven (Models:SynthesisModel), so it swaps to Haiku 4.5 without touching source. Prompt caching runs on all seven LLM-backed agents: within a 5-minute TTL about 80% of the system and tool prefix tokens hit the cache.

  6. 06contractC#

    Then C# checks every citation.

    Every cited chunk must resolve to the retrieval set, or it is dropped before the response returns. That makes citation fidelity a property of the architecture rather than of the model.

    670

    fabricated citations. The contract-free baseline surfaced 67 (14 clean, 53 under starved retrieval); the contracted pipeline leaked 0, caught 100%.

    Measuring it took some work: with a strong model on a clean corpus, an unconstrained baseline rarely fabricates (0 of 44 under Sonnet 4.6). So the test induced it, with free-text citations, weaker generators and starved retrieval, across 160 cells on gpt-4o-mini and gpt-4o.

    The three struck cards stand for the adversarial test, run on the weather × energy pair: a prompt that demanded 3 out-of-corpus citations. None got through, under Sonnet 4.6 or Haiku 4.5.

    under the hood
    free-text
    36 fabricated in prose-citation mode, the mode most deployed RAG systems use
    structured
    31 fabricated
    family
    GPT-4o-mini and GPT-4o: a different model family than the paper's Claude
    sweep
    topK 3 → 10, Sonnet → Haiku, adversarial prompt: 0 fabricated in every configuration
    dotnet run --project LIBRAIN.Experiments -- fabrication-delta --provider openai
  7. 07scoringClaude Haiku 4.5 · C#

    Three scorers, one Task.WhenAll.

    The draft goes to three scorers at once, so the wait is the slowest single call, not the sum. Then C# averages: the aggregate is arithmetic, not a model's opinion, which keeps it halo-resistant by construction.

    • NoveltyScorerDeterministic. Embeds the novelClaim, finds the nearest chunk in the corpus, returns 1 − similarity.novelty 0.45novelty 0.38novelty 0.41
    • Discovery EvaluatorClaude Haiku 4.5, T=0.0. Plausibility (does the claim follow from the cited evidence?) and structural coherence (a well-formed, testable hypothesis).plausibility 0.62 · coherence 0.75plausibility 0.62 · coherence 0.75plausibility 0.62 · coherence 0.68
    • ClaimValidatorClaude Haiku 4.5, T=0.0. Labels each novelClaim sentence GROUNDED, EXTRAPOLATED or RISKY with a hallucination probability; C# takes the max.sentence 2 → RISKY · 0.75
    • C# aggregatequality 0.61 = mean(0.45, 0.62, 0.75)quality 0.58 = mean(0.38, 0.62, 0.75)quality 0.57 = mean(0.41, 0.62, 0.68)

    The RISKY label is the contract doing its job, not failing: the speculative sentence is flagged, not hidden.

    under the hood

    Why trust the novelty number? Cosine novelty tracks human novelty at ρ = 0.41 (pooled Spearman, n = 45): a reproducible measurement surface, not a control surface.

    An early noveltyTarget knob tried to steer it through the prompt. Six calls showed a 0.0184 shift against a 0.0668 noise band, in the wrong direction, so it was retired before any caller saw it.

    ClaimValidator came after a blinded pilot flagged 3 of 5 outputs for factually framed speculation inside novelClaim. After the fix: 0 of 5.

  8. 08answerPOST /api/discover

    A hypothesis you can trace.

    POST /api/discoverDiscovery Mode

    weather foundation models × renewable energy planning

    What if fine-tuning a weather foundation model on wind and solar variables gave one differentiable tool that co-optimizes forecasts and infrastructure investment?

    Supporting evidence · 5 citations, 3 papers, all resolved

    • 2405.13063Bodnar et al., Aurorachunks 0, 5 · direct
    • 2212.12794Lam et al., GraphCastchunks 16, 19 · direct
    • 2211.02556Bi et al., Pangu-Weatherchunk 4 · direct
    Novelty
    0.45
    Plausibility
    0.62
    Coherence
    0.75
    Quality
    0.61

    A hypothesis seed for investigation, not a verified discovery. The chunks support the framing, not the claim itself. Captured on the project's earlier 13-paper corpus; scored by the Discovery Evaluator (Claude Haiku, T=0.0).

    POST /api/discoverDiscovery Mode

    retrieval-augmented generation × de novo molecular design

    What if the retriever itself got better every design cycle, learning from past docking results to aim squarely at high-affinity, drug-like chemical space?

    Supporting evidence · 6 citations, 3 papers, all resolved

    • 2005.11401Lewis et al., RAGchunks 0, 2, 10 · direct
    • 2503.22164Gao et al., PharmAgentschunks 6, 7 · direct
    • 2508.14111Agentic AI for Scientific Discoverychunk 38 · direct
    Novelty
    0.38
    Plausibility
    0.62
    Coherence
    0.75
    Quality
    0.58

    A hypothesis seed for investigation, not a verified discovery. The chunks support the framing, not the claim itself. Captured on the project's earlier 13-paper corpus; scored by the Discovery Evaluator (Claude Haiku, T=0.0).

    POST /api/discoverDiscovery Mode

    drug discovery × climate adaptation

    What if the agentic pipeline built for drug discovery were turned on climate adaptation, refining regional strategies as live extreme-weather forecasts arrive?

    Supporting evidence · 6 citations, 4 papers, all resolved

    • 2503.22164Gao et al., PharmAgentschunks 1, 2 · direct
    • 2508.14111Agentic AI for Scientific Discoverychunk 33 (Protein Science section) · direct
    • 2212.12794Lam et al., GraphCastchunks 8, 65 (Atmospheric Rivers section) · direct
    • 2405.13063Bodnar et al., Aurorachunk 16 (Training methods section) · analogous
    Novelty
    0.41
    Plausibility
    0.62
    Coherence
    0.68
    Quality
    0.57

    A hypothesis seed for investigation, not a verified discovery. The chunks support the framing, not the claim itself. Captured on the project's earlier 13-paper corpus; scored by the Discovery Evaluator (Claude Haiku, T=0.0).

    ask another

    0 / 30hallucination flags across two blinded three-rater panels. The unconstrained Naive-RAG baseline drew 3 / 30.

    4.47pooled novelty (1 to 5), against 1.80 for Naive-RAG and 2.47 for a single LLM.

    under the hood

    Three-system baseline, pre-registered, Claude Haiku-judged (10 topic pairs):

    systemnoveltyplaus.coher.quality
    LIBRAIN0.4030.5050.7070.538
    Naive-RAG0.3070.6220.7920.574
    Single-LLM0.3890.3570.7090.485

    LIBRAIN leads on novelty (+31% over Naive-RAG) by fencing speculation, trading roughly 19% plausibility for it by design. An independent GPT-4o judge shifts the ranking, because it rewards safe, well-structured output; the project page reports both.

052021 – today

Certifications & publications

  1. certificateEF

    EF SET English Certificate

    EF Standard English Test · B2 Upper Intermediate

    Able to work in professional environments where English is the primary language.

  2. publicationTÜBİTAK

    Mobile Application for Hearing Impaired Communication

    i-Ceviri · Zenodo · TUBITAK 2209-A · Unity3D · C# · speech-to-text

    A mobile app that translates spoken language into Turkish Sign Language animations in real time, to bridge the gap between hearing-impaired people and everyone else.

    Readdoi 10.5281/zenodo.17457628

    2021
  3. certificateAIESEC

    Back-end Web Developer

    AIESEC Global Talent · Rijswijk, NL

    Continuous professional development through AIESEC's global talent programme in Rijswijk, the Netherlands.

  4. publicationZenodo

    LIBRAIN: A Multi-Agent RAG System for Scientific Discovery

    Eren Mutlu · Zenodo · Independent research · .NET 10 · RAG · multi-agent

    An auditable multi-agent RAG system for hypothesis discovery. A citation-validation contract drops any reference that does not resolve to the retrieved set; a Discovery Mode fences the speculative part into a separately scored novelClaim.

    ReadCodedoi 10.5281/zenodo.20745782

    2026
ORCID0009-0003-1888-4035

~/ the human behind the commits

Personal space

There are places I haven't seen, people I haven't met, ideas I haven't tried.

I don't need to know where everything will lead. When something makes me curious, I want to go find out. Sometimes things click while I'm walking through a new city, sometimes while I'm wandering around in my own head. And if something I make helps someone along the way, that's a good day.

— Erry Carlmicheal

Interrail '2339 stops · 9 countries · 1 Jul – 8 Aug 2023

12 seen. 230 places on this map, not yet.

Where I've been 12 countries

Home base: the south-west corner of Turkey, where the Aegean meets the Mediterranean.

pull request for whoever looks closely

Personal stuff nobody knows #3

awaiting approvalmergederen wants to merge 3 commits into main from secret/ereneren merged 3 commits into main from secret/eren

Three keys are hidden on this page. Each one is a reviewer: once all three approve, this branch merges and you get to read what’s in it.

  • Review required: 3 approvals0 of 3 approvedChanges approved3 keys, 3 approvals.
  • Merging is blockedmain wants all three keys first.Ready to mergeNo conflicts with main. Auto-merge is on.Pull request mergedsecret/eren is part of main now.

Files changed 4+49 −0

reward/+24

reward/finders-card.png

your prize

A finder’s card, with your own code

The card is drawn by JavaScript, which is off right now.

finder code
EM-K3-···-·······-····

Your mail app opens with the code filled in. Attach the card if you like.

secrets/three.md+9

and, as promised

Three secrets. Only one is true.

Which one actually happened? Pick one.

Open them one by one. Two are made up.

  1. #1

    I once fixed a production bug from a gulet in the middle of the Aegean, on a phone hotspot with 4% battery, while the captain held the phone up at the one spot on deck that had signal. The fix went live before we reached the next bay.

  2. #2

    My pen name, Erry Carlmicheal, is a nod to Charles Carmichael, the spy alias of Chuck Bartowski in Chuck: the computer guy who accidentally gets the Intersect, a whole government database of secrets, uploaded into his head, and starts “flashing” on things he never learned. Some of the code here was written under that name.

  3. #3

    On Interrail ’23 I missed the night train and slept in a station. The stranger on the next bench was a retired railway engineer. By sunrise he’d drawn the whole European rail network from memory, on the back of my ticket. I still have it.

unlocked by the truthright answer · unlockedwrong guess · yours anyway

Every agent needs a cover.

Mine has a badge, a branch and a barcode that carries your finder code.

The true one was the pen name, and every guess earns the cover.

NERDHERD
Black-and-white portrait of Erry Carlmicheal

ERRY CARLMICHEAL

Nerd Herd · Marmaris branch

ERRY-CARLMICHEAL

nobody-knows.md+12

no game this time, all true

3 things nobody knows

  1. 01 the people

    Three people have seen me debugging at 3 a.m. and still answer my calls: my best friends Erkay and Jonathan, and my cousin Deniz. If this site ever goes down, they’ll probably tell me before my monitoring does.

  2. 02 the shoes

    Chuck Bartowski proved you can save the world in Converse. I’ve got the Converse, laced and ready. The world just hasn’t asked yet.

  3. 03 the scooter

    I knew Beste Kanter from her YouTube channel; she had never heard of me. Couchsurfing brought us together to see Muse at Rome’s Stadio Olimpico. Afterwards the taxis cost a fortune, so we took one e-scooter for two, me riding and her holding on, all the way from the stadium to the city centre, with a few creative detours every time we spotted the police.

note.md+4

Three keys, three approvals, and you didn’t give up. Like Chuck with the Intersect, you just flashed on something most people never see. Curious people are my favourite kind. Send me your code, agent, and say hi.

— Eren

Rotterdam Delft

“It doesn’t interest me what you do for a living. I want to know what you ache for.”

— Oriah Mountain Dreamer

the whole trip

Interrail '23

39stops

9countries

1 Jul – 8 Aug 2023

Marmaris Rhodes

“A walled town the size of an afternoon, where every gate opens on a different century.”

d'Amboise Gate → Akti Sachtouri

the walk, stop by stop

Rhodes '26

10stops

29sights

09:00 – 17:30