<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Jean</title>
    <description>The latest articles on DEV Community by Jean (@djomo).</description>
    <link>https://dev.to/djomo</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F966242%2F98e13f91-11e6-45b6-a706-1bc65953d116.png</url>
      <title>DEV Community: Jean</title>
      <link>https://dev.to/djomo</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/djomo"/>
    <language>en</language>
    <item>
      <title>free Real-Time Deployment to GitHub Pages with CI/CD for React +vite+tailwind app</title>
      <dc:creator>Jean</dc:creator>
      <pubDate>Wed, 20 Aug 2025 17:26:50 +0000</pubDate>
      <link>https://dev.to/djomo/free-real-time-deployment-to-github-pages-with-cicd-for-react-vitetailwind-app-43aj</link>
      <guid>https://dev.to/djomo/free-real-time-deployment-to-github-pages-with-cicd-for-react-vitetailwind-app-43aj</guid>
      <description>&lt;p&gt;Have you ever wanted to see your app updates live the moment you push to a branch? In this post, I’ll walk you through how I set up a CI/CD pipeline using GitHub Actions to deploy my Node.js application to GitHub Pages automatically and in real time whenever I push to the dev branch.&lt;br&gt;
This is a good practice to simulate and see how the application looks like  and test functionalities online before pushing it in production(main).&lt;br&gt;
   --Why CI/CD for GitHub Pages?&lt;br&gt;
Continuous Integration and Continuous Deployment (CI/CD) helps automate the process of building, testing, and deploying your code. By integrating this into your GitHub workflow, you:&lt;br&gt;
Catch bugs early with automated tests&lt;br&gt;
Ensure consistent builds&lt;br&gt;
Instantly reflect changes on your hosted site&lt;/p&gt;

&lt;p&gt;🛠️ The Setup:&lt;br&gt;
Here’s the GitHub Actions workflow I created, named CI/CD. It does two main things:&lt;br&gt;
Build and test the app on every push or pull request.&lt;br&gt;
Deploy the app to GitHub Pages—but only if the push is to the dev branch.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;name: CI/CD

                    on:
                    push:
                    branches: ["*"]
                    pull_request:
                    branches: ["*"]

                    permissions:
                    contents: write
                    pages: write
                    id-token: write

                    jobs:
                    build-and-test:
                    runs-on: ubuntu-latest
                    steps:
                     - name: Checkout code
                    uses: actions/checkout@v4
                    - name: Set up Node.js
                    uses: actions/setup-node@v4
                    with:
                   node-version: "20"
                   - name: Install dependencies
                   run: npm install
                   - name: Build
                  run: npm run build
                  - name: Test
                 run: npm test

                 deploy:
                 if: github.ref == 'refs/heads/dev'
                 runs-on: ubuntu-latest
                 needs: build-and-test
                 steps:
                - name: Checkout code
                uses: actions/checkout@v4
              - name: Set up Node.js
               uses: actions/setup-node@v4
               with:
               node-version: "20"
           - name: Install dependencies
            run: npm install
           - name: Build
           run: npm run build
          - name: Deploy to GitHub Pages
           uses: peaceiris/actions-gh-pages@v4
           with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          publish_dir: ./dist
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🔍 How It Works&lt;br&gt;
Triggering: The workflow runs on any push or pull request to any branch.&lt;/p&gt;

&lt;p&gt;Build &amp;amp; Test: It installs dependencies, builds the app, and runs tests.&lt;/p&gt;

&lt;p&gt;Conditional Deploy: The deploy job only runs if the push is to the dev branch.&lt;/p&gt;

&lt;p&gt;Deployment: It uses peaceiris/actions-gh-pages to publish the contents of the ./dist folder to GitHub Pages&lt;/p&gt;

&lt;p&gt;🌐 Hosting on GitHub Pages&lt;br&gt;
Make sure your repository is configured to serve GitHub Pages from the gh-pages branch (which the action creates and updates). You can set this in your repo settings under Pages &amp;gt; Source.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F12j0v8adeqskawlr99op.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F12j0v8adeqskawlr99op.png" alt=" " width="800" height="477"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This setup has been a game-changer for my development workflow. I can push to dev, and within seconds, my changes are live. It’s perfect for previewing features before merging to main.&lt;/p&gt;

&lt;p&gt;If you’re building a frontend app and want instant feedback, give this workflow a try. And if you have questions or want to improve it further (like adding caching or linting), let’s chat in the comments!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>How to Implement Entity Relationships in Spring Boot</title>
      <dc:creator>Jean</dc:creator>
      <pubDate>Fri, 08 Aug 2025 11:51:58 +0000</pubDate>
      <link>https://dev.to/djomo/how-to-implement-entity-relationships-in-spring-boot-2jg</link>
      <guid>https://dev.to/djomo/how-to-implement-entity-relationships-in-spring-boot-2jg</guid>
      <description>&lt;p&gt;In real-world applications, data rarely lives alone in its own . &lt;/p&gt;

&lt;p&gt;Users place orders, books have authors, students enroll in courses — and in my case, customers fill carts and place purchases. &lt;/p&gt;

&lt;p&gt;These connections between pieces of data are modeled using entity relationships in Spring Boot with JPA (Java Persistence API). &lt;/p&gt;

&lt;p&gt;Getting these relationships right is key to building robust, scalable applications. &lt;/p&gt;

&lt;p&gt;In JPA: &lt;/p&gt;

&lt;p&gt;Entities are Java classes that map to database tables. &lt;/p&gt;

&lt;p&gt;Each class field represents a column in that table. &lt;/p&gt;

&lt;p&gt;We mark a class as an entity using @Entity. &lt;/p&gt;

&lt;p&gt;If a field’s name matches the database column name, we’re good to go. If not, we can explicitly set it using &lt;a class="mentioned-user" href="https://dev.to/column"&gt;@column&lt;/a&gt;(name = "custom_column_name"). &lt;/p&gt;

&lt;p&gt;In this post, We will go through the three main types of entity relationships I commonly used, using examples from my e-commerce REST API project. &lt;/p&gt;

&lt;p&gt;🔗 Types of Relationships in Spring Boot &lt;/p&gt;

&lt;p&gt;Spring Boot uses JPA annotations to define relationships between entities. Here are the most common types: &lt;/p&gt;

&lt;p&gt;1️⃣ One-to-One (@OneToOne) &lt;/p&gt;

&lt;p&gt;Each entity has exactly one related entity. &lt;/p&gt;

&lt;p&gt;Example: “A cart is assigned to one purchase, and each purchase is associated with one cart.” &lt;/p&gt;

&lt;p&gt;To create this relationship, we use the JPA annotation @OneToOne on the corresponding entity property. &lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;     @Entity 
     public class CartEntity { 
     @OneToOne 
     private PurchaseEntity purchase; 
     } 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Nice — the connection is made. Easy, don’t you think? 😊 &lt;/p&gt;

&lt;p&gt;2️⃣ One-to-Many / Many-to-One (@OneToMany, @ManyToOne) &lt;/p&gt;

&lt;p&gt;As the name suggests: &lt;/p&gt;

&lt;p&gt;One entity is related to many others, and each of those relates back to one. &lt;/p&gt;

&lt;p&gt;Example: One user can have many carts (e.g., past carts, saved carts), but each cart belongs to only one user. &lt;/p&gt;

&lt;p&gt;To make this connection, we can either: &lt;/p&gt;

&lt;p&gt;Use annotations directly on the entity properties, or &lt;/p&gt;

&lt;p&gt;Create a separate entity and table if we want to store additional properties related to the relationship (like total product cost or number of products in the cart). &lt;/p&gt;

&lt;p&gt;Here’s an example of the second approach: &lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@Entity 
public class CartUser { 
@Id
private Long idCartUser; 
@ManyToOne 
@JoinColumn(name = "cart_id") 
private CartEntity cart; 
@ManyToOne 
@JoinColumn(name = "user_id") 
private UserEntity user; 
private Long numberOfProductsInCart; 
private Double totalCost; 
} 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;The corresponding database table will have the same properties. If you don’t need extra fields like totalcost or numberofproductincart, you can simply use @OneToMany or @ManyToOne with @JoinColumn directly on the entity — both approaches work correctly. &lt;/p&gt;

&lt;p&gt;3️⃣ Many-to-Many (@ManyToMany) &lt;/p&gt;

&lt;p&gt;Entities relate to many others in both directions. &lt;/p&gt;

&lt;p&gt;Example: One order can contain multiple products, and one product can appear in multiple orders. &lt;/p&gt;

&lt;p&gt;We use the @ManyToMany annotation to define this relationship. For convenience, you can either: &lt;/p&gt;

&lt;p&gt;Create a new table and entity to store both foreign keys (especially if you need extra fields like quantity or price), or &lt;/p&gt;

&lt;p&gt;Use the annotation directly on the appropriate property. &lt;/p&gt;

&lt;p&gt;I hope you found this guide useful! If you have additional insights or pro tips, feel free to share them in the comments — I’d love to hear your thoughts. 😊&lt;/p&gt;

</description>
      <category>java</category>
      <category>tutorial</category>
      <category>learning</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
