<?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 Charith J De Silva on Medium]]></title>
        <description><![CDATA[Stories by Charith J De Silva on Medium]]></description>
        <link>https://medium.com/@charithjdesilva?source=rss-46f0e015ad8d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*LSeNZ2nh6SX9SooVoeJl0A.jpeg</url>
            <title>Stories by Charith J De Silva on Medium</title>
            <link>https://medium.com/@charithjdesilva?source=rss-46f0e015ad8d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 04:11:15 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@charithjdesilva/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[StudyFi’s Service Discovery and API Gateway Implementation]]></title>
            <link>https://medium.com/@charithjdesilva/studyfis-service-discovery-and-api-gateway-implementation-0a48305b1105?source=rss-46f0e015ad8d------2</link>
            <guid isPermaLink="false">https://medium.com/p/0a48305b1105</guid>
            <category><![CDATA[spring-boot]]></category>
            <category><![CDATA[eureka]]></category>
            <category><![CDATA[service-discovery]]></category>
            <category><![CDATA[spring-cloud]]></category>
            <category><![CDATA[load-balancing]]></category>
            <dc:creator><![CDATA[Charith J De Silva]]></dc:creator>
            <pubDate>Sun, 18 May 2025 15:02:31 GMT</pubDate>
            <atom:updated>2025-05-18T15:02:31.423Z</atom:updated>
            <content:encoded><![CDATA[<h4>Week 15 Progress Update of StudyFi</h4><h3>Introduction</h3><p>This week marks the end of our semester-long journey with StudyFi, focusing on finalizing the project. We’ve transitioned from the foundational services to establishing robust service discovery and an API gateway, bringing our microservices architecture to a functional state. This post details our final efforts, reflects on the project’s architectural journey, and outlines potential future enhancements.</p><h3>🔥 Highlights of Work Done</h3><p>The final weeks were dedicated to integrating the various microservices through crucial architectural components.</p><h3>🔗 Service Discovery</h3><p>We implemented a Eureka Discovery Server to manage the registration and discovery of our microservices. This allows services to find each other dynamically without hardcoded configurations.</p><p><strong>Implementation Steps</strong></p><ul><li>Added spring-cloud-starter-netflix-eureka-client dependency to each microservice&#39;s pom.xml. Here&#39;s a sample from userandgroup/pom.xml:</li></ul><pre>&lt;dependency&gt;<br>    &lt;groupId&gt;org.springframework.cloud&lt;/groupId&gt;<br>    &lt;artifactId&gt;spring-cloud-starter-netflix-eureka-client&lt;/artifactId&gt;<br>&lt;/dependency&gt;</pre><p>Configured each microservice to register with Eureka:<br>Added <strong><em>@EnableDiscoveryClient </em></strong>annotation to the main application class.<br>Configured Eureka server URL inapplication.properties.</p><p>For example</p><pre>properties<br>          eureka.client.service-url.defaultZone=http://localhost:8761/eureka</pre><p>We tested service discovery to ensure that services could locate and communicate with each other effectively through Eureka.</p><h3>🚪 API Gateway</h3><p>We set up a Spring Cloud API Gateway to serve as a single entry point for all client requests.</p><h4>Implementation Steps</h4><ul><li>Added necessary Spring Cloud Gateway dependencies to a new module.</li><li>Configured routing rules in the API gateway’s application.properties to direct incoming requests based on the request path. Here&#39;s an example from apigateway/src/main/resources/application.properties for the user service:</li></ul><pre>properties<br>      spring.cloud.gateway.routes[0].id=user-service<br>      spring.cloud.gateway.routes[0].uri=lb://userandgroup<br>      spring.cloud.gateway.routes[0].predicates[0]=Path=/api/v1/users/**</pre><p>We thoroughly tested the API gateway for proper request routing and security enforcement.</p><h3>📚 Documentation and Refinement</h3><p>We finalized the README.md file in the GitHub repository with a comprehensive project description, setup instructions. We ensured the codebase was well-structured and included comments where necessary. We added documentation on the architectural patterns used (Microservices), the technology stack, and testing strategies.</p><h3>🌟 Challenges and Key Learnings</h3><ul><li>API Gateway Configuration: Setting up the API gateway with correct routing and security filters required careful attention to detail and troubleshooting.</li><li>Solution: We overcame these challenges by extensively referencing the official Spring Cloud Gateway documentation and following YouTube tutorials. When we encountered specific issues, we turned to Stack Overflow for solutions from the community. Iterative testing after each configuration change was crucial for verifying correctness and identifying problems early.</li><li>Inter-service Communication: Ensuring seamless communication between services through the discovery server and API gateway presented challenges, especially with asynchronous operations, service registration, and potential network delays.</li><li>Solution: Referencing Stack Overflow was instrumental in resolving issues related to inter-service communication. We learned best practices for using Eureka for service discovery and how the API Gateway facilitates communication, including understanding load balancing and handling potential service unavailability.</li></ul><h4>Learnings</h4><ul><li>Importance of Service Discovery: Implementing service discovery with Eureka proved crucial for the flexibility and scalability of our microservices architecture, allowing services to locate each other dynamically.</li><li>API Gateway as a Central Hub: The API Gateway serves as a vital central point for managing client requests, routing, and cross-cutting concerns like security, simplifying the client-side interaction with our microservices.</li><li>Iterative Development: The project reinforced the value of an iterative development approach, allowing us to address challenges and refine our architecture progressively, leading to a more robust system.</li></ul><h3>🔮 What’s Next?</h3><p>While the core requirements for the assignment are complete, StudyFi has potential for further development.</p><ul><li>Monitoring and Logging: Integrate monitoring tools (e.g., Prometheus, Grafana) and centralized logging (e.g., ELK stack) for system performance insights and troubleshooting.</li><li>Adding More Features: Develop new microservices for user preferences, group moderations, analytics, etc.</li></ul><p>This project has provided invaluable hands-on experience in designing and implementing a microservices architecture. We have learned a lot throughout the progress we’ve made and the foundation we’ve built for StudyFi.</p><h3>🚀 Conclusion</h3><p>Week 15 marks the successful completion of our StudyFi project. We have successfully implemented a microservices architecture with functional content and news services, service discovery (Eureka), and an API gateway (Spring Cloud Gateway). This journey has been filled with challenges and learnings, significantly enhancing our understanding of software architecture principles and their practical application. We are grateful for the opportunity to work on this project and are excited about the potential for StudyFi’s future development. We’d love to hear your thoughts, feedback, or suggestions.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0a48305b1105" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ StudiFy — Content and News Unleashed]]></title>
            <link>https://medium.com/@charithjdesilva/studify-content-and-news-unleashed-20c84e49b084?source=rss-46f0e015ad8d------2</link>
            <guid isPermaLink="false">https://medium.com/p/20c84e49b084</guid>
            <category><![CDATA[rest-api]]></category>
            <category><![CDATA[study]]></category>
            <category><![CDATA[cloudinary]]></category>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[spring-boot]]></category>
            <dc:creator><![CDATA[Charith J De Silva]]></dc:creator>
            <pubDate>Mon, 28 Apr 2025 18:05:37 GMT</pubDate>
            <atom:updated>2025-04-28T18:12:00.227Z</atom:updated>
            <content:encoded><![CDATA[<h3>StudiFy — Content and News Unleashed</h3><h4>Week 13 Progress Update</h4><h3>Introduction</h3><p>This week at StudyFi marked a major milestone as we focused on completing the core features of our <strong>Content and News microservice</strong>. Our goal was clear: to finalize the ability to <strong>create, manage, and deliver</strong> dynamic content and news articles — a service critical for keeping our platform vibrant and informative.</p><p>We set out to ensure the service would be <strong>fully functional</strong> and <strong>ready for internal review</strong> — and we’re excited to share the progress we’ve made!</p><h3>🔥 Highlights of Work Done</h3><p>Our focus was on strengthening the foundation of the Content and News service. Here’s a breakdown of the key accomplishments:</p><h3>📄 Content Management</h3><ul><li>Developed a ContentController to handle HTTP requests for <strong>creating</strong>, <strong>retrieving</strong>, <strong>updating</strong>, and <strong>deleting</strong> content.</li><li>Built a ContentService to manage business logic, interacting with the ContentRepo for seamless database operations.</li><li>Designed the Content entity to store essential details such as <strong>title</strong>, <strong>body</strong>, <strong>author</strong>, and <strong>creation date</strong>.</li><li>Created ContentDTO for effective data transfer between layers.</li><li>Integrated CloudinaryService and CloudinaryConfig to allow <strong>image uploads</strong> and management within content.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/984/1*hHRkJD44coHH7V8Ya5zm7A.png" /></figure><h3>📰 News Article Management</h3><ul><li>Developed the NewsController, mirroring ContentController functionality, specifically for news articles.</li><li>Implemented the NewsService and NewsRepo to handle business logic and persistence.</li><li>Defined the News entity, structurally similar to the Content entity, to manage news articles effectively.</li><li>Created NewsDTO for standardized data transfer.</li></ul><h3>🛢️ Database Integration</h3><ul><li>Leveraged <strong>Spring Data JPA</strong> for smooth interaction with our relational database.</li><li>Implemented ContentRepo and NewsRepo to handle persistence operations for content and news.</li></ul><h3>🛠️ API Design and Integration</h3><ul><li>Crafted <strong>RESTful APIs</strong> for both Content and News modules, ensuring consistency and easy integration with other services.</li><li>Introduced <strong>WebClient</strong> to allow other services to <strong>consume</strong> Content and News data easily.</li></ul><h3>🌟 Challenges and Key Learnings</h3><h3>Challenges</h3><ul><li><strong>Cloudinary Configuration Issues</strong><br>Integrating <strong>Cloudinary</strong> for image uploads presented initial challenges, particularly with dependency and configuration setup.</li><li><strong>Solution</strong><br>Adding the correct dependencies in the pom.xml and creating a robust configuration file solved the issue.</li></ul><h3>Learnings</h3><ul><li><strong>Clear API Design</strong><br>Refining our API endpoint structure improved service boundaries and made integration smoother.</li><li><strong>Efficient Database Handling</strong><br>Utilizing <strong>Spring Data JPA</strong> significantly simplified database operations, reducing boilerplate code.</li></ul><h3>🔮 What’s Next?</h3><p>Looking ahead to next week, we are diving into <strong>service discovery</strong> and <strong>API gateway</strong> setup — critical components for scaling our microservices architecture.</p><h3>Our Focus Areas</h3><ul><li><strong>Service Discovery</strong><br> Implement dynamic service registration and discovery to allow services to find each other without hardcoding URLs.</li><li><strong>API Gateway</strong><br> Set up an <strong>API gateway</strong> to provide a unified entry point for all client requests — handling <strong>routing</strong>, <strong>security</strong>, and <strong>cross-cutting concerns</strong>.</li></ul><p>This transition will lay the foundation for a <strong>scalable</strong>, <strong>maintainable</strong>, and <strong>resilient</strong> system as StudyFi continues to grow.</p><h3>🚀 Conclusion</h3><p>Week 13 was an incredibly productive chapter in our journey. We’ve successfully built a robust base for the Content and News service, paving the way for richer, more dynamic interactions on our platform.</p><p>As we move toward service discovery and API gateway implementation, we’re excited about the challenges and new learnings that lie ahead.</p><p>We’d love to hear your thoughts, feedback, or suggestions on our progress!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=20c84e49b084" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Implementing Forgot Password Functionality in StudyFi]]></title>
            <link>https://medium.com/@charithjdesilva/implementing-forgot-password-functionality-in-studyfi-0dcd996e96ee?source=rss-46f0e015ad8d------2</link>
            <guid isPermaLink="false">https://medium.com/p/0dcd996e96ee</guid>
            <category><![CDATA[email-sending]]></category>
            <category><![CDATA[user-authentication]]></category>
            <category><![CDATA[password-reset]]></category>
            <category><![CDATA[spring-boot]]></category>
            <dc:creator><![CDATA[Charith J De Silva]]></dc:creator>
            <pubDate>Fri, 28 Feb 2025 10:50:33 GMT</pubDate>
            <atom:updated>2025-02-28T10:50:33.544Z</atom:updated>
            <content:encoded><![CDATA[<h4>Week 4 Progress Update — Forgot Password Functionality for StudyFi</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DesCajyaTObrF1dGHCF_wQ.jpeg" /></figure><h3>1. Understanding the Forgot Password Feature</h3><p>The <strong>Forgot Password</strong> functionality is an essential security feature that allows users to regain access to their accounts if they’ve forgotten their password. Here’s the overall flow of how the feature works:</p><ul><li><strong>Password Reset Tokens</strong>: A <strong>reset token</strong> is generated when the user requests a password reset. This token is then sent to the user’s registered email.</li><li><strong>Token Expiration</strong>: To add another layer of security, the token has an <strong>expiration time</strong>. After this time, the token becomes invalid.</li><li><strong>Password Reset Process</strong>: When users click on the password reset link, they can enter a new password. The reset token is validated, and if it’s valid and hasn’t expired, the password is updated.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/794/1*92SwGbhIDrI36QwOIYEHww.png" /></figure><h3>2. Building the Forgot Password Flow</h3><h4>Step 1: Generating the Reset Token</h4><p>The first step in implementing the <strong>Forgot Password</strong> functionality is generating a <strong>reset token</strong>. We used <strong>UUID</strong> to generate a unique token, ensuring that each reset link is different. Here’s how we handle it:</p><ul><li>When a user requests a password reset, we generate a <strong>unique token</strong> using UUID.randomUUID().toString().</li><li>Along with the reset token, we store an <strong>expiration time</strong> — typically set to 1 hour after the token is generated. This ensures the token doesn’t stay valid indefinitely.</li></ul><h4>Step 2: Sending the Reset Link</h4><p>Once the <strong>reset token</strong> is generated, we send an email to the user with a <strong>password reset link</strong>. The token is included as part of the URL:</p><pre>https://studyfi.com/users/reset-password?token={resetToken}</pre><h4>Step 3: Token Expiration</h4><p>To enhance security, we set an <strong>expiration time</strong> for the reset token. After a set period (e.g., 1 hour), the token expires and can no longer be used.</p><p>We store the <strong>reset token</strong> and <strong>expiration time</strong> in the database for the respective user. When the user clicks on the reset link, we check whether the token is valid and whether it has expired.</p><h4>Step 4: Validating the Token and Resetting the Password</h4><p>Once the user clicks the reset link, we validate the <strong>reset token</strong> by comparing it to the one stored in the database. If the token is valid and hasn’t expired, we allow the user to enter a new password.</p><p>To ensure security, we use <strong>BCrypt</strong> to hash the new password before storing it in the database. This makes sure that passwords are never stored in plaintext.</p><p>If the token is invalid or expired, the user is shown an error message, prompting them to request a new password reset.</p><h3>3. Implementation Details</h3><h4>User Entity and Database Changes</h4><p>We updated the <strong>User entity</strong> to store the <strong>reset token</strong> and <strong>expiration time.</strong></p><h4>Reset Token Generation and Validation</h4><p>In <strong>UserService</strong>, we implemented methods for generating the reset token and sending the reset email, and validating the token when the user attempts to reset their password.</p><p>To send the reset email, we used <strong>JavaMailSender</strong> to generate and send an email with the reset link.</p><pre>// The method to send reset link email with token and expiration time<br>public void sendPasswordResetLink(String email) {<br>    // Generate a random token for password reset<br>    String resetToken = UUID.randomUUID().toString();<br><br>    // Set the expiration time for the token (e.g., 1 hour from now)<br>    Date expiryDate = new Date(System.currentTimeMillis() + 3600 * 1000);  // 1 hour expiry time<br><br>    // Save this reset token and expiration time in the database for the user<br>    User user = userRepo.findByEmail(email);<br>    if (user == null) {<br>        throw new RuntimeException(&quot;User not found&quot;);<br>    }<br>    user.setResetToken(resetToken);<br>    user.setResetTokenExpiry(expiryDate);  // Save the expiration time<br>    userRepo.save(user);  // Save the user with the reset token and expiry time<br><br>    // Create the complete URL for password reset with the real domain<br>    String resetLink = resetPasswordUrl + &quot;?token=&quot; + resetToken;<br><br>    // Prepare the email message<br>    SimpleMailMessage message = new SimpleMailMessage();<br>    message.setTo(email);<br>    message.setSubject(&quot;Password Reset Request&quot;);<br>    message.setText(&quot;Click the following link to reset your password: &quot; + resetLink);<br><br>    // Send the email<br>    try {<br>        mailSender.send(message);<br>        System.out.println(&quot;Password reset email sent to: &quot; + email);<br>    } catch (Exception ex) {<br>        System.err.println(&quot;Error sending email: &quot; + ex.getMessage());<br>    }<br>}<br><br>// The method to reset the user&#39;s password using the reset token<br>public void resetPassword(String token, PasswordResetDTO passwordResetDTO) {<br>    // Find the user by the reset token<br>    User user = userRepo.findByResetToken(token);<br>    if (user == null) {<br>        throw new RuntimeException(&quot;Invalid reset token&quot;);<br>    }<br><br>    // Check if the token has expired<br>    if (user.getResetTokenExpiry().before(new Date())) {<br>        throw new RuntimeException(&quot;Reset token has expired&quot;);<br>    }<br><br>    // Validate the new password<br>    validatePassword(passwordResetDTO.getNewPassword());<br><br>    // Encrypt the new password before saving<br>    user.setPassword(passwordEncoder.encode(passwordResetDTO.getNewPassword()));  // BCrypt encoding<br><br>    // Clear the reset token and expiry after the password reset<br>    user.setResetToken(null);<br>    user.setResetTokenExpiry(null);<br><br>    // Save the updated user<br>    userRepo.save(user);<br>}</pre><h3>4. Challenges and Resolutions</h3><h4>Challenge 1: “Authentication Failed” Error</h4><p>During the implementation of the <strong>Forgot Password</strong> feature, we ran into an issue with sending emails through <strong>SMTP</strong>. The error message we encountered was <strong>“Authentication Failed”</strong>, which prevented the email from being sent.</p><p><strong>Resolution</strong>: After troubleshooting, we tested both <strong>Gmail</strong> SMTP configurations. By using <strong>Gmail’s SMTP </strong>with an App Password, we were able to send emails successfully. After further adjustments to our configuration and <strong>testing with Gmail</strong>, we resolved the issue and were able to successfully send reset emails.</p><pre>@Configuration<br>public class MailConfig {<br><br>    @Value(&quot;${spring.mail.host}&quot;)<br>    private String mailHost;<br><br>    @Value(&quot;${spring.mail.port}&quot;)<br>    private int mailPort;<br><br>    @Value(&quot;${spring.mail.username}&quot;)<br>    private String mailUsername;<br><br>    @Value(&quot;${spring.mail.password}&quot;)<br>    private String mailPassword;<br><br>    @Value(&quot;${spring.mail.properties.mail.smtp.auth}&quot;)<br>    private String smtpAuth;<br><br>    @Value(&quot;${spring.mail.properties.mail.smtp.starttls.enable}&quot;)<br>    private String smtpStartTlsEnable;<br><br>    @Bean<br>    public JavaMailSender javaMailSender() {<br>        JavaMailSenderImpl mailSender = new JavaMailSenderImpl();<br>        mailSender.setHost(mailHost);<br>        mailSender.setPort(mailPort);<br>        mailSender.setUsername(mailUsername);<br>        mailSender.setPassword(mailPassword);<br><br>        java.util.Properties props = mailSender.getJavaMailProperties();<br>        props.put(&quot;mail.smtp.auth&quot;, smtpAuth);<br>        props.put(&quot;mail.smtp.starttls.enable&quot;, smtpStartTlsEnable);<br>        props.put(&quot;mail.smtp.ssl.trust&quot;, mailHost);<br><br>        return mailSender;<br>    }<br>}</pre><h4>Challenge 2: Token Expiration Handling</h4><p>Managing <strong>token expiration</strong> was tricky at first, especially in terms of comparing the expiration time with the current time to prevent expired tokens from being used.</p><p><strong>Resolution</strong>: We used <strong>Java’s </strong><strong>Date class</strong> to handle the token expiration and implemented logic to check if the reset token had expired before allowing the password reset.</p><h3>5. Next Steps</h3><p>Looking ahead, our next steps will include:</p><ul><li><strong>Implementing Content and News Service</strong>: We will begin building the <strong>Content</strong> and <strong>News Service</strong> to allow users to share academic content, such as study materials, articles, and news updates 📚.</li></ul><p>We’re excited to continue refining <strong>StudyFi</strong> and bringing new features to life for students.</p><h3>Conclusion</h3><p>In this article, we’ve outlined how we implemented the <strong>Forgot Password</strong> functionality for <strong>StudyFi</strong>, including:</p><ul><li>Generating <strong>reset tokens</strong>.</li><li>Managing <strong>token expiration</strong> for added security.</li><li>Implementing a secure and smooth <strong>password reset process</strong> for users.</li></ul><p>This functionality enhances user experience by allowing secure account recovery, an essential feature for any modern application.</p><p>Stay tuned for more updates as we continue to build and refine the core features of <strong>StudyFi</strong>. Next up: <strong>Content and News Service</strong> development!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0dcd996e96ee" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Creating User and Group Services for StudyFi: Distraction-Free Social Media Platform]]></title>
            <link>https://medium.com/@charithjdesilva/creating-user-and-group-services-for-studyfi-distraction-free-social-media-platform-cfbea14e146f?source=rss-46f0e015ad8d------2</link>
            <guid isPermaLink="false">https://medium.com/p/cfbea14e146f</guid>
            <dc:creator><![CDATA[Charith J De Silva]]></dc:creator>
            <pubDate>Thu, 20 Feb 2025 12:51:50 GMT</pubDate>
            <atom:updated>2025-02-20T12:51:50.521Z</atom:updated>
            <content:encoded><![CDATA[<p>Week 3 Progress Update — Creation of the <strong>User</strong> and <strong>Group Services</strong></p><p>As we embark on building <strong>StudyFi</strong>, a dedicated social media platform for students, one of the foundational components is creating the <strong>User</strong> and <strong>Group Services</strong>. These services will be at the heart of managing user data, facilitating group interactions, and ensuring the proper flow of academic collaboration. In this article, I’ll walk you through how we approached the design and creation of these services and what technologies we used to implement them.</p><h3>1. Understanding the Project Scope</h3><p>Before diving into the services, let’s quickly recap the core functionality that <strong>StudyFi</strong> aims to provide with user and group service:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/662/1*MYKK6Ryt7NrKFkujqagOkA.png" /></figure><ul><li><strong>User Management</strong>: We need to manage user data, such as usernames, emails, passwords, and profile information.</li><li><strong>Group Management</strong>: Our platform allows users to form or join study groups based on their academic interests and courses.</li></ul><p>The <strong>User</strong> and <strong>Group</strong> services we built were designed to support these functionalities. Here’s a step-by-step look at how we went about creating them.</p><h3>2. Building the User Service</h3><p>The <strong>User Service</strong> is responsible for managing all the user-related functionalities. This includes creating new users, updating user information, retrieving user data, and managing group memberships.</p><h4>Creating User Profiles</h4><p>To begin with, we focused on allowing users to <strong>register</strong> and create their profiles. Fields were taken after the UI/UX design conducted by my partner. Fig.2. shows the sign-up screen for the users. Each user profile includes essential information such as in the sign-up screen.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/375/1*dXdno5Zh7sHYok_VUFSpdw.png" /><figcaption>Fig.2. shows the sign-up screen for the users</figcaption></figure><p>We also included a mechanism for password management, which involved securely hashing the passwords before storing them. For the password hashing, we chose to use <strong>BCrypt</strong>, a strong hashing algorithm, to ensure that user credentials are protected.</p><h4>Managing User Groups</h4><p>Since <strong>StudyFi</strong> is a platform focused on collaboration, users can <strong>join groups</strong> related to their academic interests. Our <strong>User Service</strong> also needed to manage the relationship between users and groups.</p><p>The <strong>many-to-many relationship</strong> between <strong>Users</strong> and <strong>Groups</strong> was implemented using a <strong>JPA</strong> relationship. A user can belong to multiple groups, and each group can have multiple users. We used <strong>Spring Data JPA</strong> to handle database operations for managing these relationships efficiently.</p><h3>3. Creating the Group Service</h3><p>The <strong>Group Service</strong> is essential for managing the creation and maintenance of study groups within <strong>StudyFi</strong>. Each group is defined by:</p><ul><li><strong>Name</strong>: The name of the group (e.g., “Math Study Group”).</li><li><strong>Description</strong>: A short description of what the group is about.</li></ul><h4>Group Creation and Management</h4><p>The <strong>Group Service</strong> provides functionality for creating new groups and allowing users to join or leave groups. To simplify the process, we used <strong>Spring Data JPA</strong> for CRUD operations, making the interaction with the database seamless.</p><p>When a user joins a group, the <strong>UserService</strong> handles the process of adding that user to the group and vice versa. Additionally, users can <strong>create groups</strong> for specific subjects or academic interests, and they can invite other users to join their group.</p><p>The <strong>GroupService</strong> allows administrators (or the group creators) to <strong>update group details</strong>, like the description or name.</p><h4>Many-to-Many Relationship</h4><p>To manage the relationship between users and groups, we used a <strong>many-to-many relationship</strong>. This allows users to belong to multiple groups, and each group can have multiple members. The relationship is mapped using a <strong>Junction Table</strong> (the user_group table) in the database, which stores references to both the <strong>user</strong> and <strong>group</strong>.</p><h3>4. Database Design and Structure</h3><p>To store the data for users and groups, we designed the following structure in the database (Fig.3):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/641/1*BUTh8OomkI6tLDlVOPzyYw.png" /><figcaption>Fig.3. ERD for the user and group</figcaption></figure><p>This structure ensures that we can easily manage the <strong>many-to-many relationship</strong> between users and groups.</p><h3>5. Challenges and Resolutions</h3><ul><li><strong>Challenge</strong>: During development, we encountered a <strong>406 error</strong>. This error occurred when trying to execute certain API requests, preventing the backend from returning the expected responses.</li><li><strong>Resolution</strong>: After thorough investigation, we discovered that the issue was related to <strong>annotation processing settings</strong> in <strong>IntelliJ IDEA</strong>. By enabling correct <strong>annotation processing</strong> in the <strong>IDE settings</strong>, we were able to resolve the issue.</li></ul><h3>6. Next Steps</h3><p>Looking ahead, our focus for the upcoming week will be on building and refining the <strong>Forgot Password</strong> functionality. We will:</p><ul><li>Implement <strong>password reset tokens</strong>.</li><li>Set <strong>token expiration</strong> and create a secure process for resetting passwords.</li><li>Ensure that all security measures (such as token validation) are robust to protect user accounts.</li></ul><h3>7. Let’s Collaborate</h3><p>Feel free to connect and share your thoughts or feedback. If you’re working on similar projects or have any insights, let’s collaborate and exchange ideas!</p><h3>Conclusion</h3><p>In this article, we have explained the creation of the <strong>User Service</strong> and <strong>Group Service</strong> for our <strong>StudyFi</strong> project. We covered:</p><ul><li>How <strong>users</strong> are registered and managed.</li><li>How <strong>groups</strong> are created and users can join or leave groups.</li><li>The <strong>many-to-many relationship</strong> between users and groups.</li></ul><p>These services are critical to the core structure of <strong>StudyFi</strong> as a <strong>distraction-free social media platform</strong> for students. The next step will be adding a forgot password functionality for users to reset there password. For the next article, we will dive into this <strong>forgot password</strong> feature and discuss how we handle reset tokens and expiration.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cfbea14e146f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[StudyFi — A Distraction-Free Social Media Platform for Students]]></title>
            <link>https://medium.com/@charithjdesilva/studyfi-a-distraction-free-social-media-platform-for-students-0730cfd7db37?source=rss-46f0e015ad8d------2</link>
            <guid isPermaLink="false">https://medium.com/p/0730cfd7db37</guid>
            <category><![CDATA[students]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[social-media]]></category>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[software-architecture]]></category>
            <dc:creator><![CDATA[Charith J De Silva]]></dc:creator>
            <pubDate>Fri, 07 Feb 2025 19:25:40 GMT</pubDate>
            <atom:updated>2025-02-07T19:25:40.309Z</atom:updated>
            <content:encoded><![CDATA[<h3>StudyFi — A <strong>Distraction-Free Social Media Platform for Students</strong></h3><p><strong>Introducing Our Distraction-Free Social Media Platform for Students</strong></p><p>Week 2 Progress Update — Core Features, Architecture, and Tech Stack</p><blockquote>As we move through the development of our distraction-free social media platform for students, Week 2 marks an important phase in our project. In the previous weeks, we focused on understanding the fundamentals of Spring Boot. This week, we’ve taken a significant step forward by solidifying our platform’s core features, architecture, and technology stack. Here’s an update on the progress we’ve made so far.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*_OMERCwadhuTQzgk-DTpiQ.png" /></figure><p>In today’s academic world, students often find themselves navigating through general social media platforms filled with distractions. To solve this issue, we are developing a dedicated social media platform that offers a focused, academic-driven environment where students can collaborate, share resources, and engage in meaningful discussions, free from the usual distractions found on mainstream platforms.</p><h3>Problem Statement</h3><p>Existing social media platforms like Facebook, Instagram, and LinkedIn fail to meet the unique needs of students. These platforms are designed for broader audiences, making it difficult for students to focus on academic collaboration and resource sharing. Our platform will address this gap by offering a space specifically designed for students to collaborate and share academic resources in a distraction-free environment.</p><h3>Core Features</h3><p>Our platform is designed to offer essential features that cater to students’ academic needs:</p><ul><li><strong>User Authentication and Profiles</strong>: Students can create and manage profiles, including their academic details such as university, course, and areas of academic interest.</li><li><strong>Study Groups</strong>: Students can form or join study groups for various subjects, participate in discussions, and collaborate on academic projects.</li><li><strong>Academic Content Sharing</strong>: Students can upload, share, and interact with academic materials like notes, articles, and slides. Content can be liked, commented on, and shared within study groups.</li><li><strong>Resource Search</strong>: A robust search functionality allows students to find relevant academic materials based on courses, subjects, or specific keywords.</li><li><strong>News Feed</strong>: The platform will include a simple news feed that displays posts related to academic content, events, and updates, with the ability to like and comment on posts.</li><li><strong>Notifications</strong>: Students will receive notifications for new posts, updates from their groups, and upcoming academic events or deadlines.</li></ul><h3>Proposed Architecture</h3><p>To build a scalable and flexible system, we have chosen a <strong>Microservice Architecture</strong> for the platform. This architecture divides the platform into independent services that handle specific functionalities, enabling us to scale and maintain each service individually.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/890/1*6w4x7UNhdLd4UIJ7zxdq2g.png" /><figcaption>Fig.1: Proposed architecture pattern</figcaption></figure><p>Fig.1 shows the proposed architecture pattern for this Web Application. Key components of the system include,</p><p><strong>Flutter Client</strong>: A mobile app developed using Flutter, ensuring a seamless experience across both Android and iOS devices.</p><p><strong>API Gateway</strong>: The API Gateway routes requests from the Flutter client to the appropriate backend services.</p><p><strong>Backend Services</strong></p><ul><li><strong>User and Group Service</strong>: Handles user authentication and group memberships.</li><li><strong>Content and News Service</strong>: Manages the sharing and retrieval of academic content and news.</li><li><strong>Notification Service</strong>: Sends notifications about new content, activities, and events.</li></ul><p><strong>Database</strong>: Each service communicates with its own MySQL database to ensure data isolation and efficient management.</p><h3>Technology Stack</h3><p>The platform is built with the following technologies:</p><ul><li><strong>Frontend</strong>: <strong>Flutter</strong>, a framework for building cross-platform mobile applications, ensures a seamless experience for students across Android and iOS devices.</li><li><strong>Backend</strong>: <strong>Spring Boot</strong> is used to develop scalable microservices. Each service (User &amp; Group Service, Content and News Service, Notification Service) operates independently, making it easier to scale and maintain.</li><li><strong>Database</strong>: <strong>MySQL</strong> is used to manage structured data. Each service has its own database to ensure isolation and ease of maintenance.</li></ul><h3>Conclusion</h3><p>This platform aims to create a distraction-free space where students can collaborate, share resources, and stay informed about their academic communities. By leveraging a microservice architecture and modern technologies, we are building a solution that meets the specific needs of students and helps them succeed in their academic journey.</p><p>For more details on how the idea for this platform was conceived and the research process behind it, check out our previous article <a href="https://medium.com/@sarasiyashodha89/the-future-of-academic-collaboration-a-social-media-platform-built-for-students-94f107a9c606">here.</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0730cfd7db37" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding Dependency Injection in Spring Framework]]></title>
            <link>https://medium.com/@charithjdesilva/understanding-dependency-injection-in-spring-framework-cabe741dffe2?source=rss-46f0e015ad8d------2</link>
            <guid isPermaLink="false">https://medium.com/p/cabe741dffe2</guid>
            <category><![CDATA[spring]]></category>
            <category><![CDATA[spring-framework]]></category>
            <category><![CDATA[spring-training]]></category>
            <category><![CDATA[spring-boot]]></category>
            <category><![CDATA[dependency-injection]]></category>
            <dc:creator><![CDATA[Charith J De Silva]]></dc:creator>
            <pubDate>Wed, 29 Jan 2025 13:03:41 GMT</pubDate>
            <atom:updated>2025-01-29T13:03:41.142Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TZZ3PmCG1R_8vTaDCyTpwQ.jpeg" /></figure><h3>Introduction</h3><p><em>Dependency Injection (DI)</em> is a fundamental concept in modern software development, particularly in the <strong>Spring Framework</strong>. It enables objects to be loosely coupled and easily manageable, promoting better testability, maintainability, and scalability. This article explores Dependency Injection in Spring, its working mechanism, and its benefits.</p><h3>What is Dependency Injection (DI)?</h3><p>Dependency Injection (DI) is a design pattern that implements <strong><em>Inversion of Control (IoC)</em></strong>, where the <em>creation and management of dependencies are handled externally instead of within the class itself</em>. Instead of manually instantiating objects, DI allows dependencies to be injected by an external container like <strong>Spring’s IoC container</strong>.</p><h3>Dependency Injection in Spring</h3><p>Spring manages dependencies through the <strong>IoC container</strong>, which automatically injects dependencies into Spring beans. There are two primary types of Dependency Injection in Spring:</p><ol><li><strong>Constructor Injection</strong></li><li><strong>Setter Injection</strong></li></ol><p>Let’s explore each type in detail.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/572/1*sgdXejo64MVu2AmhW0MV_w.png" /><figcaption>Fig.1. Primary types of Dependency Injection in Spring</figcaption></figure><h4>1. Constructor Injection</h4><p>Constructor Injection is a method where dependencies are passed through the class constructor. It ensures that dependencies are available at object creation.</p><p><strong>Example:</strong></p><pre>@Component<br>public class UserService {<br>    private final UserRepository userRepository;<br><br>    @Autowired<br>    public UserService(UserRepository userRepository) {<br>        this.userRepository = userRepository;<br>    }<br>}</pre><p>In this example, Spring automatically injects <em>UserRepository</em> into <em>UserService</em>.</p><p><strong>Advantages:</strong></p><ul><li>Ensures <strong>immutability</strong> of dependencies.</li><li>Enhances <strong>testability</strong> by explicitly requiring dependencies.</li><li>Clearly defines required dependencies at <strong>object creation</strong>.</li></ul><h4>2. Setter Injection</h4><p>Setter Injection allows dependencies to be provided through <strong>setter methods</strong>, making them optional and modifiable.</p><p><strong>Example:</strong></p><pre>@Component<br>public class UserService {<br>    private UserRepository userRepository;<br><br>    @Autowired<br>    public void setUserRepository(UserRepository userRepository) {<br>        this.userRepository = userRepository;<br>    }<br>}</pre><p><strong>Advantages:</strong></p><ul><li>Allows for <strong>optional dependencies</strong>.</li><li>Useful for dependencies that may change after object creation.</li><li>Provides <strong>flexibility</strong> in modifying dependencies at runtime.</li></ul><h3>Different Ways to Inject Dependencies in Spring</h3><p>Spring provides multiple ways to configure and inject dependencies:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/452/1*TYLuGPCFUhONS4UZA1VjGg.png" /><figcaption>Fig.2. Ways to inject dependencies in Spring</figcaption></figure><h4>1. Using Annotations (@Autowired)</h4><p>The @Autowired annotation enables automatic dependency injection by Spring.</p><p><strong>Field Injection</strong> (not recommended due to testability issues):</p><pre>@Autowired<br>private UserRepository userRepository;</pre><p><strong>Constructor Injection</strong> (recommended approach):</p><pre>@Autowired<br>public UserService(UserRepository userRepository) {<br>    this.userRepository = userRepository;<br>}</pre><p><strong>Setter Injection:</strong></p><pre>@Autowired<br>public void setUserRepository(UserRepository userRepository) {<br>    this.userRepository = userRepository;<br>}</pre><h4>2. XML-based Configuration</h4><p>Spring also allows DI configuration using XML, though it is now less common due to annotation-based configuration.</p><p><strong>Example:</strong></p><pre>&lt;bean id=&quot;userService&quot; class=&quot;com.example.UserService&quot;&gt;<br>    &lt;constructor-arg ref=&quot;userRepository&quot; /&gt;<br>&lt;/bean&gt;<br><br>&lt;bean id=&quot;userRepository&quot; class=&quot;com.example.UserRepository&quot; /&gt;</pre><h3>Benefits of Dependency Injection in Spring</h3><ul><li><strong>Loose Coupling:</strong> Reduces tight dependency between components, improving flexibility.</li><li><strong>Enhanced Testability:</strong> Dependencies can be easily mocked, making unit testing more effective.</li><li><strong>Improved Maintainability:</strong> Changes in dependencies do not require modifying dependent classes.</li><li><strong>Centralized Configuration:</strong> Dependencies are managed centrally by Spring’s IoC container.</li><li><strong>Efficient Lifecycle Management:</strong> Spring controls object lifecycle, reducing memory management overhead.</li></ul><h3>Challenges of Dependency Injection</h3><ul><li><strong>Overuse of DI</strong> can lead to unnecessary complexity.</li><li><strong>Constructor vs. Setter Injection</strong>: Choosing the right approach based on mandatory vs. optional dependencies is crucial.</li><li><strong>Circular Dependencies</strong>: Occurs when two beans depend on each other; Spring resolves this using setter injection but should generally be avoided.</li></ul><h3>Conclusion</h3><p><em>Dependency Injection</em> is a powerful feature in Spring that enhances code maintainability, testability, and scalability. By leveraging Spring’s DI mechanism, developers can build flexible and modular applications. Whether using constructor injection for mandatory dependencies or setter injection for optional ones, Spring’s IoC container simplifies dependency management effectively.</p><p>By understanding and applying Dependency Injection correctly, you can build cleaner, more maintainable, and scalable Spring applications.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cabe741dffe2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Transfer WhatsApp data from an old phone to a new phone without Google backup]]></title>
            <link>https://medium.com/@charithjdesilva/transfer-whatsapp-data-from-an-old-phone-to-a-new-phone-without-google-backup-5e55291e8da2?source=rss-46f0e015ad8d------2</link>
            <guid isPermaLink="false">https://medium.com/p/5e55291e8da2</guid>
            <category><![CDATA[restore-whatsapp-data]]></category>
            <category><![CDATA[whatsapp-after-a-reset]]></category>
            <category><![CDATA[transfer-whatsapp-data]]></category>
            <category><![CDATA[whatsapp-old-phone-to-new]]></category>
            <category><![CDATA[without-google-backup]]></category>
            <dc:creator><![CDATA[Charith J De Silva]]></dc:creator>
            <pubDate>Sat, 01 Jan 2022 14:06:24 GMT</pubDate>
            <atom:updated>2022-01-01T14:16:12.722Z</atom:updated>
            <content:encoded><![CDATA[<p>It’s a headache when we are looking for a way to transfer out WhatsApp chats into another device or get WhatsApp data back into our phone after a reset. There are some tools available but you have to pay for them. I searched and searched but did not find a method until I carried out my own thoughts. And it was successful. From this article, I am going to show you how you can get back all your data to a new phone or the same phone after a reset as it was in the previous device.</p><p>Note: <em>You have to use the same phone number. Backing up from a Google backup is the easiest way.</em></p><p>This method can be done with or without a PC.</p><h4>1st step :</h4><p>First, we have to navigate to the ‘chats settings’ on WhatsApp. (You can go to settings from the 3 dots right beside the search bar.)</p><p>Settings → Chats → Chat backup</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bQ-upuruwB3PP5cEu1gX3A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vuuwPrsNRyF_n-OTAZ52gA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sVq9z_iH5aq-w04_3vT6yw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d9hAIE83fSvxEQlivKGi9w.png" /></figure><h4>2nd step :</h4><p>From here you can see Google drive backup frequency, Google account, backing up method (Wi-Fi or Wi-Fi /cellular data), and whether to include videos.</p><p><em>(If you want to backup over the Google account all you have to do is select the “Back up to Google Drive” setting to “Only when I tap ‘Back up’ ”, and click the ‘BACK UP’ button. After that, you have to add that Google account to your new device and when you open WhatsApp for the first time on the new device it will ask for a restore from the Google backup.)</em></p><p>But since we are going to back up our data via a local backup, we have to change the <em>“Back up to Google Drive” </em>setting to <em>“Never”. </em>After that click the <em>“BACK UP”</em> button. It will take several minutes to back up the chats depending on the file size.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5OHXnss4DwMzpvP8G5n6BA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ST6y0W8NU7kilceagi4EZg.jpeg" /></figure><p>After the backing up is finished you will see the backup details as follows.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*PiKR1tmjlkBjTeucxQ-MPg.png" /></figure><h4>3rd step :</h4><p>Now you have to navigate to the “<em>WhatsApp</em>” folder after connecting your device to the PC. (You can do this without a PC, but you will have to use a memory card or a sharing application such as “Share-it”, “Share-mi”.)</p><p><em>(For some android devices you will not be able to find the WhatsApp folder directly on the internal storage. You have to navigate, “Android → media → com.whatsapp → WhatsApp”)</em></p><p>From the WhatsApp folder go to the “<em>Database</em>” folder and select the backup file that you have created. You can see the date and time of that file and it will match the file size of your backup on the previous step.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*MKA9A0Wbe_W1nYWMzdbskQ.png" /></figure><p>Copy that file to your PC (or to the memory card).</p><p><em>(If your device does not allow you to copy that file, you will first have to archive that file using archiving software for android such as ZArchive. And then copy that archived file. Later you can extract that file from your PC after copying is done.)</em></p><p>To get your wallpapers and stickers also to the new phone you will have to copy the “<em>Backups</em>” folder in the “<em>WhatsApp</em>” folder. To get your media (images, videos, documents, etc.) you have to copy the “<em>media</em>” folder. Copy both these folders into the PC.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*Me8fEtZTllqp7mq2hgtnsg.png" /></figure><h4>4th step :</h4><p>Now, you will have to uninstall the WhatsApp application from your old device.</p><p>After that, install the WhatsApp application on the new device. <strong>Do not open it yet.</strong></p><p>Copy and paste your database file to “WhatsApp → Databases” that we copied to the PC in the 3rd step. (<em>If a folder called Databases is not in the folder, create a one</em>).</p><p>And also, copy and paste the <em>“Backups”</em> folder and <em>“media”</em> folder in the “<em>WhatsApp</em>” folder. (Not inside the Databases folder)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*aE9-dg-GjqNkqQ1Bgnycpg.png" /></figure><h4>5th step :</h4><p>Now, open the WhatsApp application and enter the same phone number you were using for WhatsApp on the previous device. Click next. Then it will ask you to verify the number. Verify it by SMS code or phone number. Now, <strong>quickly turn off the internet</strong> of your device.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*v0dCnEB-zzypsggfcc1r3g.png" /></figure><p>Then it will ask to add contacts or not. Click continue for that. After that, if it asks for permission for contacts, and storage click allow.</p><p>Then it will show you a screen as follows. (If this screen not showing, close WhatsApp quickly and reset its data from the phone settings. The reasons can be your Internet connection may be on, or you forgot to copy the backup files back into WhatsApp of the new device, as in the 4th step. Remember for some devices(ex: Samsung) location of the Whatsapp folder is <em>“Android → media → com.whatsapp → WhatsApp”</em>)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*LHQFNAxdX3ft6z0VEEZ8wg.jpeg" /></figure><p>Click <em>skip</em>. Then it will ask for a check internet connection. Click <em>skip</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*y5n4cmkB-n8McZhYK-6Osg.jpeg" /></figure><p>After that, it will show us this screen saying a backup found on the phone’s internal storage. Click “Restore”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*YW8yB6zHgQA1R_tsezOcEg.jpeg" /></figure><p><em>(If an error appears saying as follows, connect to the Internet and click “retry”. It will now proceed to 100%). Do not click skip. Click retry. Turn off the Internet connection and back again it will restore.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*zIHmMQFYuLsi29lqtBOYkg.jpeg" /><figcaption>If this shows up, connect to the Internet and click “retry”</figcaption></figure><p>Wait for restoring to be completed. After that, you will get all your chats on the new phone. Click next. Add profile picture and name. Click next. Then they ask about the backing up method for the new device. Select as you wish, click “<em>Done</em>”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*oFujJjVkbn7mG4xNUeccdw.jpeg" /></figure><p>Hope you got your chats back! 😃</p><p>Good Luck! 😃</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5e55291e8da2" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>