<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Metin Kuzey on Medium]]></title>
        <description><![CDATA[Stories by Metin Kuzey on Medium]]></description>
        <link>https://medium.com/@metinkuzeyapp?source=rss-aacb4d79018e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*N7RJdciruVdGYtcu</url>
            <title>Stories by Metin Kuzey on Medium</title>
            <link>https://medium.com/@metinkuzeyapp?source=rss-aacb4d79018e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 09:13:57 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@metinkuzeyapp/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[#  Building “Shortie”: A Modern URL Shortener & QR Generator with FastAPI]]></title>
            <link>https://medium.com/@metinkuzeyapp/building-shortie-a-modern-url-shortener-qr-generator-with-fastapi-a3edfd03543f?source=rss-aacb4d79018e------2</link>
            <guid isPermaLink="false">https://medium.com/p/a3edfd03543f</guid>
            <dc:creator><![CDATA[Metin Kuzey]]></dc:creator>
            <pubDate>Thu, 23 Oct 2025 18:10:08 GMT</pubDate>
            <atom:updated>2025-10-23T18:10:08.942Z</atom:updated>
            <content:encoded><![CDATA[<p>## 🧠 Introduction</p><p>If you’ve been keeping an eye on Python web frameworks, you’ve probably noticed **FastAPI** everywhere – powering APIs from hobby projects to large-scale platforms like Netflix, Uber, and Microsoft services.</p><p>To truly appreciate its performance and developer-friendly design, let’s go beyond theory and **build something practical, fast, and trendy**:</p><p>A **URL Shortener + QR Generator** called **Shortie** – complete with **JWT authentication**, **async SQLAlchemy**, **background tasks**, and **automated API docs**.</p><p>– -</p><p>## ⚙️ Why FastAPI?</p><p>FastAPI stands out for three key reasons:</p><ol><li>**Speed** – Built on top of **Starlette** and **Uvicorn**, it delivers near-Node.js performance.</li><li>2. **Developer Experience** – **Pydantic** handles validation and serialization automatically, so your data models and docs always stay in sync.</li><li>3. **Asynchronous by Design** – Every endpoint can use `async/await`, enabling scalable non-blocking I/O.</li></ol><p>![Diagram: FastAPI Architecture Overview](https://via.placeholder.com/800x400?text=FastAPI+Architecture)</p><p>– -</p><p>## 🧩 Project Overview: “Shortie”</p><p>**Shortie** is a minimal yet production-ready REST API that allows users to:</p><ul><li>🔐 Register &amp; log in with JWT authentication.</li><li>- ✂️ Shorten long URLs and assign custom aliases.</li><li>- 📈 Track click counts asynchronously.</li><li>- 📸 Generate QR codes for each link.</li><li>- 🗂 Retrieve personal links via `/links/me`</li></ul><p>– -</p><p>## 🏗 Tech Stack</p><p>| Component | Technology |</p><p>| – – – – – – | – – – – – – -|</p><p>| Framework | **FastAPI** |</p><p>| ORM | **SQLAlchemy 2.0 (async)** |</p><p>| Database | SQLite (via `aiosqlite`) |</p><p>| Auth | JWT (`python-jose` + `passlib`) |</p><p>| QR Codes | `qrcode` |</p><p>| Tests | `pytest` + `httpx` |</p><p>| Server | `uvicorn` |</p><p>– -</p><p>## 📂 Project Structure</p><p>```text</p><p>app/</p><p>. ├── main.py</p><p>. ├── db.py</p><p>. ├── models.py</p><p>. ├── schemas.py</p><p>. ├── security.py</p><p>. ├── routers/</p><p>. │. ├── auth.py</p><p>. │. └── links.py</p><p>. └── services/</p><p>. └── qrcode_service.py</p><p>tests/</p><p>. └── test_app.py</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a3edfd03543f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ Building a Serverless Invoice Validator on AWS with Java, Terraform, and Spring Boot]]></title>
            <link>https://medium.com/@metinkuzeyapp/building-a-serverless-invoice-validator-on-aws-with-java-terraform-and-spring-boot-b12f6e781ef0?source=rss-aacb4d79018e------2</link>
            <guid isPermaLink="false">https://medium.com/p/b12f6e781ef0</guid>
            <category><![CDATA[java]]></category>
            <category><![CDATA[spring-boot]]></category>
            <category><![CDATA[terraform]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Metin Kuzey]]></dc:creator>
            <pubDate>Wed, 20 Aug 2025 20:25:40 GMT</pubDate>
            <atom:updated>2025-08-20T20:25:40.481Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yk6P74kbQ8vbcEaQiA69Mw.png" /></figure><h3>🚀 Introduction</h3><p>In this article, we’ll walk through the design and development of a cloud-native, serverless <strong>Invoice Validator</strong> system using <strong>AWS</strong>, <strong>Terraform</strong>, <strong>Java</strong>, and <strong>Spring Boot</strong>. This project is designed to simulate a real-world document validation scenario while embracing modern DevOps and backend development practices.</p><p>We divided the system into <strong>three independent components</strong>:</p><ul><li><strong>Infrastructure provisioning</strong>: <a href="https://github.com/metinkuzey/invoice-validator-infra">invoice-validator-infra</a></li><li><strong>Lambda-based validation function</strong>: <a href="https://github.com/metinkuzey/invoice-validator-lambda">invoice-validator-lambda</a></li><li><strong>REST API microservice for managing invoices</strong>: <a href="https://github.com/metinkuzey/invoice-validator-api">invoice-validator-api</a></li></ul><h3>🎯 Project Goals</h3><ul><li>Practice real-world AWS infrastructure provisioning with <strong>Terraform</strong></li><li>Implement a <strong>serverless function</strong> with Java Lambda for lightweight invoice validation</li><li>Create a <strong>Spring Boot REST API</strong> to manage and persist invoice data</li><li>Learn how to connect <strong>S3, Lambda, RDS, and API services</strong> into a functional pipeline</li><li>Demonstrate a modern approach to microservices, CI/CD, and cloud-native deployment</li></ul><h3>🏗️ Technologies Used</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Qg7IlJ80N-gVj3YO4HJ4hg.png" /><figcaption>Technologies in Project</figcaption></figure><h3>🧱 Architecture Overview</h3><pre>Client (Postman / UI)<br>        |<br>        V<br>[ Spring Boot REST API ] --&gt; [ PostgreSQL (RDS) ]<br>        ^<br>        |<br>   Trigger: File Upload<br>        |<br>        V<br>    [ S3 Bucket ] --&gt; [ Lambda Function (Java) ]</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zY0EL3-xu7WnEFzVHV1_EQ.png" /><figcaption>AWS Flow</figcaption></figure><ul><li>Users upload PDF files to S3</li><li>Lambda function is triggered, validates file, stores result to RDS</li><li>API is used to retrieve, list or manage invoice entries</li></ul><h3>✅ Benefits and Observations</h3><h3>☁️ Why AWS?</h3><ul><li>Native serverless support</li><li>Seamless integration of S3, Lambda, and RDS</li><li>Cost-efficient for small-scale and scalable for production</li></ul><h3>⚙️ Why Terraform?</h3><ul><li>Reproducibility: consistent setup in different environments</li><li>Version-controlled infrastructure</li><li>Easy to share and document changes</li></ul><h3>🧪 Why Spring Boot?</h3><ul><li>Rapid development for RESTful APIs</li><li>Easy integration with PostgreSQL</li><li>Supported by a wide Java ecosystem</li></ul><h3>🔄 Next Steps</h3><ul><li>Add file content analysis via AWS Textract</li><li>Implement authentication and role-based access</li><li>Integrate with CI/CD using GitHub Actions</li><li>Enable frontend interface with file drag-drop and history view</li></ul><h3>✅ Sample Code Blocks</h3><h3>Terraform RDS Resource</h3><pre>resource &quot;aws_db_instance&quot; &quot;invoice_db&quot; {<br>  identifier         = &quot;invoice-db&quot;<br>  engine             = &quot;postgres&quot;<br>  instance_class     = &quot;db.t3.micro&quot;<br>  allocated_storage  = 20<br>  username           = var.db_username<br>  password           = var.db_password<br>  publicly_accessible = true<br>  skip_final_snapshot = true<br>}</pre><h3>Java Lambda Handler</h3><pre>public class InvoiceValidatorHandler implements RequestHandler&lt;S3Event, String&gt; {<br>  @Override<br>  public String handleRequest(S3Event event, Context context) {<br>      // Invoice validation logic<br>      return &quot;Invoice processed successfully&quot;;<br>  }<br>}</pre><h3>Spring Boot Upload Endpoint</h3><pre>@PostMapping(&quot;/upload&quot;)<br>public ResponseEntity&lt;String&gt; uploadInvoice(@RequestParam(&quot;file&quot;) MultipartFile file) {<br>    invoiceService.processInvoice(file);<br>    return ResponseEntity.ok(&quot;Invoice uploaded and processed.&quot;);<br>}</pre><h3>📈 SEO Keywords</h3><ul><li>AWS Lambda Java Example</li><li>Terraform AWS Infrastructure Setup</li><li>Spring Boot REST API AWS Integration</li><li>Java PDF Invoice Processing</li><li>Serverless Java Application</li><li>Invoice Validator on AWS</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b12f6e781ef0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ Building MCP Service Control: A Secure, Observable, and Scalable Spring Boot Microservice]]></title>
            <link>https://medium.com/@metinkuzeyapp/building-mcp-service-control-a-secure-observable-and-scalable-spring-boot-microservice-c5fc183d7184?source=rss-aacb4d79018e------2</link>
            <guid isPermaLink="false">https://medium.com/p/c5fc183d7184</guid>
            <dc:creator><![CDATA[Metin Kuzey]]></dc:creator>
            <pubDate>Sat, 21 Jun 2025 22:23:31 GMT</pubDate>
            <atom:updated>2025-06-21T22:23:31.089Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nTCsliZ4zOGOEAYwOx6g9Q.png" /></figure><p>In modern software systems, observability and security are no longer optional — they are essential. That’s why I built <strong>MCP Service Control</strong>, a Java-based microservice that not only manages application metadata securely but also provides full observability with <strong>Prometheus</strong> and <strong>Grafana</strong>, while ensuring a clean <strong>JWT authentication</strong> mechanism and modern API documentation using <strong>Swagger/OpenAPI</strong>.</p><h3>🎯 Project Goals</h3><p>The motivation behind this project was to:</p><ul><li>✅ Create a <strong>RESTful service</strong> to manage monitored applications</li><li>🔐 Implement <strong>secure JWT authentication</strong> with refresh tokens</li><li>📊 Enable real-time <strong>observability and monitoring</strong></li><li>📘 Document the API using <strong>Swagger UI</strong> for consumers</li><li>📦 Prepare the application for containerization and production use</li></ul><h3>🧰 Technology Stack</h3><p><strong>🔧 Backend</strong></p><ul><li>Java 17</li><li>Spring Boot 3</li></ul><p><strong>🔐 Security</strong></p><ul><li>Spring Security</li><li>JWT</li><li>Refresh Token</li></ul><p><strong>💾 Persistence</strong></p><ul><li>Spring Data JPA</li><li>PostgreSQL</li></ul><p><strong>📈 Observability</strong></p><ul><li>Prometheus</li><li>Grafana</li></ul><p><strong>📘 API Documentation</strong></p><ul><li>Swagger/OpenAPI 3</li></ul><p><strong>📦 Packaging (Future)</strong></p><ul><li>Docker-ready project structure</li></ul><h3>🔐 Secure Authentication with JWT + Refresh Token</h3><p>Authentication is powered by Spring Security and JWT tokens. The process includes:</p><ol><li><strong>Login endpoint</strong> that returns both access and refresh tokens.</li><li><strong>Refresh endpoint</strong> to get a new access token using the refresh token.</li><li><strong>Role-based authorization</strong> (USER, ADMIN).</li><li><strong>Stateless security</strong> configuration, ideal for microservices.</li></ol><blockquote><em>✅ We followed best practices with </em><em>BCryptPasswordEncoder, </em><em>SecurityFilterChain, and token validation filters.</em></blockquote><p><strong>Sample Login Request</strong>:</p><pre>POST /api/auth/login<br>Content-Type: application/json</pre><pre>{<br>  &quot;username&quot;: &quot;admin&quot;,<br>  &quot;password&quot;: &quot;admin123&quot;<br>}</pre><p><strong>Sample Login Response</strong>:</p><pre>{<br>  &quot;accessToken&quot;: &quot;eyJhbGci...&quot;,<br>  &quot;refreshToken&quot;: &quot;dGhpc2lzYXJlZnJlc2h0b2tlbg==&quot;,<br>  &quot;tokenType&quot;: &quot;Bearer&quot;<br>}</pre><h3>📊 Observability with Prometheus and Grafana</h3><p>We expose application metrics at:</p><pre>/actuator/prometheus</pre><p>Using a prometheus.yml configuration, Prometheus scrapes these metrics every 5 seconds. Grafana dashboards visualize the application status in real-time.</p><p><strong>Sample Prometheus Config</strong>:</p><pre>global:<br>  scrape_interval: 5s</pre><pre>scrape_configs:<br>  - job_name: &#39;mcp-service&#39;<br>    metrics_path: &#39;/actuator/prometheus&#39;<br>    static_configs:<br>      - targets: [&#39;localhost:8080&#39;]</pre><p>Grafana provisioning is done via config files:</p><pre>grafana/<br>└── provisioning/<br>    ├── datasources/prometheus.yaml<br>    └── dashboards/dashboards.yaml</pre><blockquote><em>📌 Dashboard metrics: request count, response times, heap usage, uptime, status codes.</em></blockquote><h3>📘 API Documentation with Swagger</h3><p>All REST APIs are documented automatically via OpenAPI 3 and are accessible at:</p><ul><li><a href="http://localhost:8080/swagger-ui/index.html">/swagger-ui/index.html</a></li><li><a href="http://localhost:8080/v3/api-docs">/v3/api-docs</a></li></ul><blockquote><em>✅ This ensures easy onboarding for frontend teams, QA, and third-party integrators.</em></blockquote><h3>🧪 Testing the System</h3><p><strong>🧍‍♂️ Test Users (Manual QA)</strong></p><p><strong>Admin User</strong></p><ul><li>Username: admin</li><li>Password: admin123</li><li>Role: ADMIN</li></ul><p><strong>Regular User</strong></p><ul><li>Username: user</li><li>Password: user123</li><li>Role: USER</li></ul><h3>🗂️ Project Structure</h3><pre>com.metinkuzey.mcp<br>├── controller<br>├── model<br>├── repository<br>├── security<br>├── service<br>├── dto<br>├── config<br>└── util</pre><p>This structure promotes modularity, testability, and separation of concerns.</p><h3>🚀 Getting Started</h3><h3>Requirements</h3><ul><li>Java 17+</li><li>PostgreSQL</li><li>Maven 3.x</li></ul><h3>Setup &amp; Run</h3><pre># 1. Edit application.yml<br>spring:<br>  datasource:<br>    url: jdbc:postgresql://localhost:5432/mcpdb<br>    username: youruser<br>    password: yourpassword</pre><pre># 2. Start the app<br>./mvnw spring-boot:run</pre><h3>📍 Links</h3><ul><li>Swagger UI: <a href="http://localhost:8080/swagger-ui/index.html">http://localhost:8080/swagger-ui/index.html</a></li><li>Prometheus: <a href="http://localhost:9090/">http://localhost:9090</a></li><li>Grafana: <a href="http://localhost:3000/">http://localhost:3000</a></li></ul><h3>📆 Conclusion</h3><p><strong>MCP Service Control</strong> is a modern Spring Boot microservice that combines:</p><ul><li>Secure JWT authentication</li><li>Refresh token lifecycle management</li><li>Real-time observability with Prometheus</li><li>Interactive dashboards via Grafana</li><li>Developer-friendly documentation via Swagger</li></ul><blockquote><em>✅ All while following clean code and best practices.</em></blockquote><h3>📎 GitHub Repository</h3><p><a href="https://github.com/metinkuzey/mcp-service-control">View the source code on GitHub</a></p><p>Feel free to fork, clone, or contribute. Feedback is welcome!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c5fc183d7184" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>