<?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: Ramiro Ocampo Rodriguez</title>
    <description>The latest articles on DEV Community by Ramiro Ocampo Rodriguez (@ror2022).</description>
    <link>https://dev.to/ror2022</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%2F975215%2F9e2d0be2-30b3-44db-a550-d175a7c191f9.jpg</url>
      <title>DEV Community: Ramiro Ocampo Rodriguez</title>
      <link>https://dev.to/ror2022</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ror2022"/>
    <language>en</language>
    <item>
      <title>Corner Store App Basic Prototype</title>
      <dc:creator>Ramiro Ocampo Rodriguez</dc:creator>
      <pubDate>Thu, 11 Jul 2024 20:29:07 +0000</pubDate>
      <link>https://dev.to/ror2022/corner-store-app-basic-prototype-45b0</link>
      <guid>https://dev.to/ror2022/corner-store-app-basic-prototype-45b0</guid>
      <description>&lt;p&gt;Corner Store App&lt;/p&gt;

&lt;p&gt;Corner Store App is a progressive web application (PWA) developed using Next.js and Nest.js, designed as a prototype to serve as a platform for small businesses, either individually or in groups. Additionally, it has the potential to be adapted for medium-sized corporations that need to manage multiple branches, inventories, employees, and sales control.&lt;/p&gt;

&lt;p&gt;Technologies and Features&lt;br&gt;
Frontend and Backend: The application is built with Next.js for the frontend and Nest.js for the backend, ensuring agile, efficient, and scalable development.&lt;br&gt;
Cloud Storage: Utilizes AWS S3 Buckets for secure and scalable image storage, allowing efficient management of multimedia resources.&lt;br&gt;
Database: MongoDB Atlas is the database, offering a flexible and scalable solution to store and manage application data.&lt;br&gt;
Authentication and Authorization: Implements JWT (JSON Web Tokens) and bcrypt to handle user authentication and authorization, ensuring secure and protected access to the application.&lt;/p&gt;

&lt;p&gt;Purpose and Potential&lt;br&gt;
The main goal of this prototype is to demonstrate a solid foundation for development that can expand according to the specific requirements of clients. Thanks to the choice of powerful and modern technologies, Corner Store App guarantees:&lt;br&gt;
Scalability: Grow and adapt easily as business needs increase.&lt;br&gt;
Functionality: Integrate new features and functionalities that enhance user experience and operational efficiency.&lt;br&gt;
User Experience (UX/UI): Offer an intuitive and user-friendly interface that facilitates user interaction with the application.&lt;br&gt;
Performance: Maintain optimal performance, even with increased data and users.&lt;br&gt;
Security: Protect user data and transactions through advanced security practices and technologies.&lt;br&gt;
In summary, Corner Store App is designed to be a robust and scalable solution that can evolve to meet the needs of small and medium-sized businesses, providing a comprehensive platform for managing their daily operations.&lt;/p&gt;

&lt;p&gt;Frontend:&lt;/p&gt;

&lt;p&gt;url: &lt;a href="https://clientcornerstore.vercel.app/" rel="noopener noreferrer"&gt;https://clientcornerstore.vercel.app/&lt;/a&gt;&lt;br&gt;
code: &lt;a href="https://github.com/ROR2022/clientcornerstore" rel="noopener noreferrer"&gt;https://github.com/ROR2022/clientcornerstore&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The frontend of Corner Store App is built using Next.js, a powerful React framework that enables server-side rendering and static site generation. This ensures a fast and responsive user experience, which is critical for web applications. Key features of the frontend include:&lt;br&gt;
User Interface: Designed with an intuitive and user-friendly interface that simplifies interaction and navigation.&lt;br&gt;
Responsive Design: Ensures compatibility across various devices and screen sizes, providing a seamless experience for users.&lt;br&gt;
Performance Optimization: Utilizes Next.js features such as server-side rendering and static site generation to enhance performance and load times.&lt;/p&gt;

&lt;p&gt;Backend:&lt;/p&gt;

&lt;p&gt;url: &lt;a href="https://servercornerstore-production.up.railway.app/" rel="noopener noreferrer"&gt;https://servercornerstore-production.up.railway.app/&lt;/a&gt;&lt;br&gt;
code: &lt;a href="https://github.com/ROR2022/servercornerstore" rel="noopener noreferrer"&gt;https://github.com/ROR2022/servercornerstore&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The backend of Corner Store App is developed using Nest.js, a progressive Node.js framework that provides a robust architecture for building scalable and maintainable server-side applications. Key features of the backend include:&lt;br&gt;
API Development: Provides a comprehensive set of APIs for handling various functionalities such as user management, inventory control, and sales tracking.&lt;br&gt;
Database Management: Utilizes MongoDB Atlas for a flexible and scalable database solution, ensuring efficient data storage and retrieval.&lt;br&gt;
Security: Implements JWT (JSON Web Tokens) and bcrypt for secure user authentication and authorization, protecting sensitive data and transactions.&lt;br&gt;
Cloud Integration: Uses AWS S3 Buckets for secure and scalable storage of images and other multimedia resources.&lt;/p&gt;

&lt;p&gt;Corner Store App Short Description:&lt;/p&gt;

&lt;p&gt;Corner Store App is a progressive web application (PWA) developed using Next.js and Nest.js, designed to serve small businesses or medium-sized corporations managing multiple branches, inventories, employees, and sales. It leverages AWS S3 for secure image storage, MongoDB Atlas for flexible data management, and uses JWT and bcrypt for secure user authentication and authorization. With an intuitive UI and responsive design, the app ensures optimal performance through server-side rendering and static site generation. The main goal is to provide a scalable, functional, and secure platform that can adapt to the evolving needs of businesses, enhancing user experience and operational efficiency.&lt;/p&gt;

&lt;p&gt;Resume: &lt;a href="https://docs.google.com/document/d/104ek8dOTdOU6RcDMtGT-g1T--FWxq2earIDvMZoQ79E/edit?usp=sharing" rel="noopener noreferrer"&gt;https://docs.google.com/document/d/104ek8dOTdOU6RcDMtGT-g1T--FWxq2earIDvMZoQ79E/edit?usp=sharing&lt;/a&gt;&lt;br&gt;
Portfolio: &lt;a href="https://prodigy-wd-05-kappa.vercel.app/#/portfolio" rel="noopener noreferrer"&gt;https://prodigy-wd-05-kappa.vercel.app/#/portfolio&lt;/a&gt;&lt;br&gt;
Github: &lt;a href="https://github.com/ROR2022" rel="noopener noreferrer"&gt;https://github.com/ROR2022&lt;/a&gt;&lt;br&gt;
Linkedin: &lt;a href="https://www.linkedin.com/in/ramiro-ocampo-5a661b1a7/" rel="noopener noreferrer"&gt;https://www.linkedin.com/in/ramiro-ocampo-5a661b1a7/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Best regards,&lt;br&gt;
Ramiro Ocampo Rodriguez.&lt;br&gt;
Developer ReactJS-NodeJS&lt;br&gt;
Tel: +52 7777937484&lt;br&gt;
Whatsapp: +52 8332998900&lt;br&gt;
&lt;a href="mailto:rami.ror279@gmail.com"&gt;rami.ror279@gmail.com&lt;/a&gt;&lt;br&gt;
Cuernavaca,Mor.México.&lt;/p&gt;

</description>
      <category>nextjs</category>
      <category>nestjs</category>
      <category>typescript</category>
      <category>api</category>
    </item>
    <item>
      <title>HackerRank Beautiful 3 Set Problem Solution</title>
      <dc:creator>Ramiro Ocampo Rodriguez</dc:creator>
      <pubDate>Fri, 05 Jul 2024 23:05:52 +0000</pubDate>
      <link>https://dev.to/ror2022/hackerrank-beautiful-3-set-problem-solution-13fp</link>
      <guid>https://dev.to/ror2022/hackerrank-beautiful-3-set-problem-solution-13fp</guid>
      <description>&lt;p&gt;HackerRank Beautiful 3 Set Problem Solution&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/ROR2022" rel="noopener noreferrer"&gt;GitHub_ror2022&lt;/a&gt;&lt;br&gt;&lt;br&gt;
&lt;a href="https://docs.google.com/document/d/104ek8dOTdOU6RcDMtGT-g1T--FWxq2earIDvMZoQ79E/edit?usp=sharing" rel="noopener noreferrer"&gt;CV_ror2022&lt;/a&gt;&lt;br&gt;&lt;br&gt;
&lt;a href="https://www.linkedin.com/in/ramiro-ocampo-5a661b1a7/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt; &lt;br&gt;
&lt;a href="https://prodigy-wd-05-kappa.vercel.app/#/portfolio" rel="noopener noreferrer"&gt;portfolio&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We will solve the HackerRank Beautiful 3 Set problem.&lt;br&gt;
Given an integer nnn, a set SSS of triples (x,y,z)(x, y, z)(x,y,z) is beautiful if and only if:&lt;br&gt;
0&amp;lt;=Xi,Yi,Zi&lt;br&gt;
Xi + Yi + Zi = n &lt;br&gt;
Let X be the set of different x's in S, Y be the set of different y's in S, and Z be the set of different z's in S. Then ∣X∣=∣Y∣=∣Z∣=∣S∣&lt;br&gt;&lt;br&gt;
The third condition means that all values of x, y, and z are pairwise distinct. Given n, find any beautiful set having the maximum number of elements. Then, print the cardinality of S (i.e., ∣S∣) on a new line, followed by ∣S∣ lines where each line contains 3 space-separated integers describing the respective values of x_i​, y_i​, and z_i.&lt;br&gt;
Input Format&lt;br&gt;
A single integer, n.&lt;br&gt;
Output Format&lt;br&gt;
On the first line, print the cardinality of S (i.e., ∣S∣).&lt;br&gt;
For each of the ∣S∣ subsequent lines, print three space-separated numbers per line describing the respective values of x_i​, y_i​, and z_i​ for triple i in S.&lt;br&gt;
Sample Input&lt;br&gt;
3&lt;/p&gt;

&lt;p&gt;Sample Output&lt;br&gt;
3&lt;br&gt;
0 1 2&lt;br&gt;
2 0 1&lt;br&gt;
1 2 0&lt;/p&gt;

&lt;p&gt;Solution Analysis&lt;br&gt;
We need a function in JavaScript that returns the combination of valid triples given a number n. This combination should satisfy:&lt;br&gt;
Each of its triples (x,y,z) satisfies x+y+z=n.&lt;br&gt;
The set of x values are distinct, the set of y values are distinct, and the set of z values are distinct.&lt;br&gt;
The cardinality k is the length of the combination of triples that meets these conditions.&lt;br&gt;
Examples Analysis&lt;br&gt;
For n=1:&lt;br&gt;
Cardinality: 1&lt;br&gt;
Triples:&lt;br&gt;
0 1 0&lt;/p&gt;

&lt;p&gt;For n=2:&lt;br&gt;
Cardinality: 2&lt;br&gt;
Triples:&lt;br&gt;
0 2 0&lt;br&gt;
1 0 1&lt;/p&gt;

&lt;p&gt;For n=3:&lt;br&gt;
Cardinality: 3&lt;br&gt;
Triples:&lt;br&gt;
0 1 2&lt;br&gt;
1 2 0&lt;br&gt;
2 0 1&lt;/p&gt;

&lt;p&gt;For n=4:&lt;br&gt;
Cardinality: 3&lt;br&gt;
Triples:&lt;br&gt;
0 1 3&lt;br&gt;
1 2 1&lt;br&gt;
2 0 2&lt;/p&gt;

&lt;p&gt;For n=5:&lt;br&gt;
Cardinality: 4&lt;br&gt;
Triples:&lt;br&gt;
0 3 2&lt;br&gt;
1 4 0&lt;br&gt;
2 0 3&lt;br&gt;
3 1 1&lt;/p&gt;

&lt;p&gt;General Observations&lt;br&gt;
From the examples, the pattern for the cardinality k can be observed as:&lt;br&gt;
k=n−offset &lt;br&gt;
where the offset follows the pattern 0,0,0,1,1,1,2,2,2,3,3,3,…  so:&lt;br&gt;
offset= Math.floor((n-1)/3)&lt;br&gt;
The upper limit of z is k−1 and the lower limit is 0, unless n is part of the sequence 4,7,10,13,16,…where the upper limit becomes k and the lower limit becomes 1.&lt;/p&gt;

&lt;p&gt;JavaScript Implementation&lt;br&gt;
const beatiful3set= (data)=&amp;gt;{&lt;br&gt;
    //determ cardinality of the set based on the amount of elements&lt;br&gt;
    const n=Number(data); //amount of elements&lt;br&gt;
    const o=Math.floor((n-1)/3); //offset&lt;br&gt;
    const k=n-o;        //cardinality of the set&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;//the cardinality of the set is the amount of triplets
// 0&amp;lt;=x&amp;lt;=k-1
//y=n-x-z

let evenZ=[];
let oddZ=[];

//first we need to determine if n is in the set 4,7,10,13,16,19,22,25,28,31,34,37,40,43,46,49,52,55.....
//create a function to determine if n is in the set
const isNInSet=(num)=&amp;gt;{
    let temp= (num-1)/3;
    if(Number.isInteger(temp) &amp;amp;&amp;amp; temp&amp;gt;=1){
        return true;
    }else{
        return false;
    }
}
let upperLimZ=0;
let lowerLimZ=0;
if(isNInSet(n)===true){
    //if n is in the set then
    upperLimZ=k;
    lowerLimZ=1;
}else{
    //if n is not in the set then
    upperLimZ=k-1;
    lowerLimZ=0;
}





for(let c=upperLimZ;c&amp;gt;=lowerLimZ;c--){
    if(c%2===0){
        evenZ.push(c);
    }else{
        oddZ.push(c);
    }
}

//complete the set z 
let completeZ=[];
if(evenZ.length&amp;gt;=oddZ.length){
completeZ=[...evenZ,...oddZ];
}else{
completeZ=[...oddZ,...evenZ];
}

let triplets=[];
for(let x=0;x&amp;lt;k;x++){
        let z=completeZ[x];
        let y=n-x-z;
        triplets.push([x,y,z]);
    }
//output
console.log('Input n:',n);
console.log('cardinality:',k);
triplets.forEach(triplet=&amp;gt;{
    console.log(triplet.join(' '));
});
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;}&lt;/p&gt;

&lt;p&gt;This function calculates the valid combination of triples for a given n and prints the cardinality and the triples themselves. The algorithm is designed to ensure that the conditions of the problem are met and provides a clear, efficient solution.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/ROR2022" rel="noopener noreferrer"&gt;GitHub_ror2022&lt;/a&gt;&lt;br&gt;&lt;br&gt;
&lt;a href="https://docs.google.com/document/d/104ek8dOTdOU6RcDMtGT-g1T--FWxq2earIDvMZoQ79E/edit?usp=sharing" rel="noopener noreferrer"&gt;CV_ror2022&lt;/a&gt;&lt;br&gt;&lt;br&gt;
&lt;a href="https://www.linkedin.com/in/ramiro-ocampo-5a661b1a7/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt; &lt;br&gt;
&lt;a href="https://prodigy-wd-05-kappa.vercel.app/#/portfolio" rel="noopener noreferrer"&gt;portfolio&lt;/a&gt;&lt;/p&gt;

</description>
      <category>algorithms</category>
      <category>javascript</category>
      <category>node</category>
      <category>problemsolve</category>
    </item>
    <item>
      <title>Gossip RorApp, Basic Example Social App Next.js Nest.js</title>
      <dc:creator>Ramiro Ocampo Rodriguez</dc:creator>
      <pubDate>Wed, 29 May 2024 23:15:33 +0000</pubDate>
      <link>https://dev.to/ror2022/gossip-rorapp-basic-example-social-app-nextjs-nestjs-1n7p</link>
      <guid>https://dev.to/ror2022/gossip-rorapp-basic-example-social-app-nextjs-nestjs-1n7p</guid>
      <description>&lt;p&gt;Hello,&lt;/p&gt;

&lt;p&gt;I would like to share the latest PWA I have developed. It is a basic example of a social network created with Next.js and deployed on Vercel. The API is built with Nest.js and deployed on Railway.&lt;/p&gt;

&lt;p&gt;This application includes essential features of a social network, such as user profile creation, message posting, and the ability to like posts.&lt;/p&gt;

&lt;p&gt;Technologies used:&lt;/p&gt;

&lt;p&gt;Next.js: Used for the frontend, providing a fast and efficient user experience.&lt;/p&gt;

&lt;p&gt;Nest.js: Used for the backend, offering a robust and scalable structure for the API.&lt;/p&gt;

&lt;p&gt;Vercel: Platform used to deploy and host the frontend easily and efficiently.&lt;/p&gt;

&lt;p&gt;Railway: Used to deploy and manage the backend, leveraging its ease of use for integrations with databases and external services.&lt;/p&gt;

&lt;p&gt;I have learned a lot during the development of this PWA, from implementing basic functionalities to optimizing for optimal performance. I hope you find this project interesting, and I am open to any feedback or suggestions you may have.&lt;/p&gt;

&lt;p&gt;Thank you for your time!&lt;/p&gt;

&lt;p&gt;vercelLinkApp: &lt;a href="https://clientchismografo.vercel.app/" rel="noopener noreferrer"&gt;https://clientchismografo.vercel.app/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;clientCodeLink: &lt;a href="https://github.com/ROR2022/clientchismografo" rel="noopener noreferrer"&gt;https://github.com/ROR2022/clientchismografo&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;serverCodeLink: &lt;a href="https://github.com/ROR2022/serverchismografo" rel="noopener noreferrer"&gt;https://github.com/ROR2022/serverchismografo&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;portfolioLink: &lt;a href="https://prodigy-wd-05-kappa.vercel.app/#/portfolio" rel="noopener noreferrer"&gt;https://prodigy-wd-05-kappa.vercel.app/#/portfolio&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;rorCVLink: &lt;a href="https://docs.google.com/document/d/104ek8dOTdOU6RcDMtGT-g1T--FWxq2earIDvMZoQ79E/edit?usp=sharing" rel="noopener noreferrer"&gt;https://docs.google.com/document/d/104ek8dOTdOU6RcDMtGT-g1T--FWxq2earIDvMZoQ79E/edit?usp=sharing&lt;/a&gt;&lt;/p&gt;

</description>
      <category>nestjs</category>
      <category>nextjs</category>
      <category>pwa</category>
      <category>api</category>
    </item>
    <item>
      <title>Basic Login Webapp</title>
      <dc:creator>Ramiro Ocampo Rodriguez</dc:creator>
      <pubDate>Sun, 31 Mar 2024 21:31:31 +0000</pubDate>
      <link>https://dev.to/ror2022/basic-login-webapp-2h91</link>
      <guid>https://dev.to/ror2022/basic-login-webapp-2h91</guid>
      <description>&lt;p&gt;Basic Login Web App Using ReactJS, React-Bootstrap and Formik for UI and Node-Express-Mongo at Backend, deploy in AWS-EC2. &lt;a href="http://18.116.42.126/" rel="noopener noreferrer"&gt;http://18.116.42.126/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>mern</category>
      <category>api</category>
      <category>reactjsdevelopment</category>
      <category>node</category>
    </item>
  </channel>
</rss>
