<?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: Johann Gonçalves Pereira</title>
    <description>The latest articles on DEV Community by Johann Gonçalves Pereira (@johanngoncalvespereira).</description>
    <link>https://dev.to/johanngoncalvespereira</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%2F656037%2Fd99da9eb-e518-472f-9860-2e04d31afec5.jpg</url>
      <title>DEV Community: Johann Gonçalves Pereira</title>
      <link>https://dev.to/johanngoncalvespereira</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/johanngoncalvespereira"/>
    <language>en</language>
    <item>
      <title>Building Spotify with Elm-01</title>
      <dc:creator>Johann Gonçalves Pereira</dc:creator>
      <pubDate>Sat, 04 Sep 2021 23:01:26 +0000</pubDate>
      <link>https://dev.to/johanngoncalvespereira/building-spotify-with-elm-01-c12</link>
      <guid>https://dev.to/johanngoncalvespereira/building-spotify-with-elm-01-c12</guid>
      <description>&lt;h1&gt;
  
  
  Starting The Project:
&lt;/h1&gt;

&lt;p&gt;I will try to explain everything as simply and as friendly as possible so that beginners can also understand me okay?&lt;/p&gt;

&lt;p&gt;I have a repository with all the basics parts of a project, so we just need to clone the repository and start the same project without worries. &lt;/p&gt;

&lt;p&gt;&lt;em&gt;(note: I use Linux, so I’ll make Linux examples.)&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Let's start:
&lt;/h2&gt;

&lt;p&gt;The first thing that we'll do it's build our work space.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Install all the dependencies from the first post.

&lt;ul&gt;
&lt;li&gt;Elm&lt;/li&gt;
&lt;li&gt;Docker&lt;/li&gt;
&lt;li&gt;Git&lt;/li&gt;
&lt;li&gt;IDE&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Setting up the project:

&lt;ol&gt;
&lt;li&gt;Make a directory to be the &lt;strong&gt;root&lt;/strong&gt; of our project&lt;/li&gt;
&lt;li&gt;Git Init - Clone the boilerplate and move all to the &lt;strong&gt;root&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Start &lt;strong&gt;docker compose&lt;/strong&gt; and check if everything is working&lt;/li&gt;
&lt;li&gt;Open IDE&lt;/li&gt;
&lt;/ol&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  Set up project
&lt;/h3&gt;

&lt;h4&gt;
  
  
  I
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;mkdir&lt;/strong&gt; serves to make a directory with this name, &lt;strong&gt;&amp;amp;&amp;amp;&lt;/strong&gt; is equal to "and", &lt;strong&gt;cd&lt;/strong&gt; it's just go to this directory.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;mkdir &lt;/span&gt;spotify-elm &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;cd &lt;/span&gt;spotify-elm
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  II
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;git init &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; git clone git@github.com:Johann-Goncalves-Pereira/Projects-Boilerplate.git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;mv == move&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;mv&lt;/span&gt; ./Projects-Boilerplate/&lt;span class="k"&gt;*&lt;/span&gt; ./
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  III
&lt;/h4&gt;

&lt;p&gt;The boilerplate has a script that do all the work for us, so we just need to run it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;./run-docker-compose.sh 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Waittt, It needs to download the dependencies for us. Go drink a Coffee :) . When you come back, we should see this message:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;Dev server running on http://0.0.0.0:8080
boilerplate_1  | 
boilerplate_1  | ℹ ｢wds｣: Project is running at http://0.0.0.0:8080/
boilerplate_1  | ℹ ｢wds｣: webpack output is served from /
boilerplate_1  | ℹ ｢wds｣: Content not from webpack is served from /app/run/public
boilerplate_1  | ℹ ｢wds｣: 404s will fallback to /index.html
boilerplate_1  | Running elm make /app/run/src/App/Main.elm &lt;span class="nt"&gt;--debug&lt;/span&gt; &lt;span class="nt"&gt;--output&lt;/span&gt; /tmp/202181-30-yu80vz.wo4s.js
Success!       | Compiling ...
boilerplate_1  | 
boilerplate_1  |     Main ───&amp;gt; /tmp/202181-30-yu80vz.wo4s.js
boilerplate_1  | 
boilerplate_1  | 
boilerplate_1  | ℹ ｢wdm｣: Compiled successfully.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Very simple! Now you have the Scss, Elm, and JS running with fast reload. So if you change something on the folder Stylesheet, it will auto recompile the page for you, the same with elm.&lt;/p&gt;

&lt;p&gt;Note: If you want to change or add a folder, you'll need to edit the script on: &lt;em&gt;src/JavaScript/load_stylesheet.js&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Just add a new route here, like this one:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nf"&gt;requireAll&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;require&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;context&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;../Stylesheets&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sr"&gt;/.*/&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But in any case, Open your Browser and go to the port &lt;a href="http://0.0.0.0:8080" rel="noopener noreferrer"&gt;http://0.0.0.0:8080&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;You will see the boilerplate home page. You'll probably notice something like the ''debug'' on the bottom right, a &lt;strong&gt;button&lt;/strong&gt; to page 2 and a &lt;strong&gt;Shared/Local&lt;/strong&gt; inputs. But I won’t dive into this for now.&lt;/p&gt;

&lt;h4&gt;
  
  
  IV
&lt;/h4&gt;

&lt;p&gt;Use this command to open Visual Studio Code.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;code &lt;span class="nb"&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And now you should see this ''tree''of folders:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;.&lt;/span&gt;
├── build
│   └── package
│       └── &lt;span class="nb"&gt;local&lt;/span&gt;
│           ├── docker-compose.yaml
│           └── Dockerfile
├── default.conf
├── elm.json
├── elm-stuff
│   └── 0.19.1
│       ├── d.dat
│       ├── i.dat
│       ├── lock
│       ├── Main.elmi
│       ├── Main.elmo
│       ├── o.dat
│       ├── Pages.elmi
│       ├── Pages.elmo
│       ├── Pages-NotFound.elmi
│       ├── Pages-NotFound.elmo
│       ├── Pages-One.elmi
│       ├── Pages-One.elmo
│       ├── Pages-Two.elmi
│       ├── Pages-Two.elmo
│       ├── Route.elmi
│       ├── Route.elmo
│       ├── Shared.elmi
│       ├── Shared.elmo
│       ├── Svg-HomeSvg.elmi
│       └── Svg-HomeSvg.elmo
├── LICENSE
├── Makefile
├── 
node_modules -&amp;gt; ../node_modules
├── package.json
├── package-lock.json
├── public
│   └── base.html
├── README.md
├── run-docker-compose.sh
├── scripts
│   └── run.sh
├── src
│   ├── App
│   │   ├── Main.elm
│   │   ├── Pages
│   │   │   ├── NotFound.elm
│   │   │   ├── One.elm
│   │   │   └── Two.elm
│   │   ├── Pages.elm
│   │   ├── Route.elm
│   │   ├── Shared.elm
│   │   └── Svg
│   │       └── HomeSvg.elm
│   ├── index.html
│   ├── JavaScript
│   │   ├── index.js
│   │   └── load_stylesheet.js
│   └── Stylesheets
│       ├── destroy-me.scss
│       └── index.scss
├── webpack.common.js
├── webpack.dev.js
├── webpack.prod.js
└── yarn.lock
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.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%2F8t7pyuw3myib6x2qifm2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2F8t7pyuw3myib6x2qifm2.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The only part that is important for us, It’s the &lt;strong&gt;src&lt;/strong&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;src
├── App
│   ├── Main.elm
│   ├── Pages
│   │   ├── NotFound.elm
│   │   ├── One.elm
│   │   └── Two.elm
│   ├── Pages.elm
│   ├── Route.elm
│   ├── Shared.elm
│   └── Svg
│       └── HomeSvg.elm
├── index.html
├── JavaScript
│   ├── index.js
│   └── load_stylesheet.js
└── Stylesheets
    ├── destroy-me.scss
    └── index.scss
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you managed to do these steps by tomorrow, Great :). Let's start!&lt;/p&gt;

&lt;h2&gt;
  
  
  How can you help?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://github.com/Johann-Goncalves-Pereira/Spotify-Elm/issues" rel="noopener noreferrer"&gt;Open issues&lt;/a&gt; for suggestions of better approaches or ideas for the site.&lt;/li&gt;
&lt;li&gt;Connect &lt;a href="https://dev.todiscord"&gt;Discord&lt;/a&gt; Johann Pereira#7150&lt;/li&gt;
&lt;li&gt;Star the &lt;a href="https://github.com/Johann-Goncalves-Pereira/Spotify-Elm" rel="noopener noreferrer"&gt;Github&lt;/a&gt; repository.&lt;/li&gt;
&lt;li&gt;Follow me on &lt;a href="https://github.com/Johann-Goncalves-Pereira/Spotify-Elm" rel="noopener noreferrer"&gt;Github&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Source:
&lt;/h3&gt;

&lt;p&gt;Author: Johann Gonçalves Pereira&lt;br&gt;
Reviewed by: Nathali Thiemy Motooka&lt;/p&gt;

</description>
      <category>elm</category>
      <category>css</category>
      <category>html</category>
      <category>docker</category>
    </item>
    <item>
      <title>Building Spotify with Elm-00</title>
      <dc:creator>Johann Gonçalves Pereira</dc:creator>
      <pubDate>Fri, 03 Sep 2021 22:29:56 +0000</pubDate>
      <link>https://dev.to/johanngoncalvespereira/building-spotify-with-elm-p6k</link>
      <guid>https://dev.to/johanngoncalvespereira/building-spotify-with-elm-p6k</guid>
      <description>&lt;p&gt;In this series I’ll be making a copy of the front end of Spotify using Elm and Scss. The main goal is to improve my skills, but also teach others and create a habit of making blog posts, while improving my writing in English. Before I start, I don’t know how long it will take to finish this project, but I’ll try to finish it within three weeks.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Spotify? And what will be built?
&lt;/h2&gt;

&lt;p&gt;So, I love the Spotify interface, it’s really beautiful, clean and have one of the best ''dark sites'' in my opinion (I love dark sites). Really, you just take a tiny peek at the site and think that this was made by very good designers.&lt;/p&gt;

&lt;p&gt;The plan is to make the views (Elm-Html), Stylesheet (Scss) and also add some functionalities to the site, such as:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Pages (Home, Playlist, Your Library, Search).&lt;/li&gt;
&lt;li&gt;Change playlist pages.&lt;/li&gt;
&lt;li&gt;(SPA) Single page application with elm.&lt;/li&gt;
&lt;li&gt;The bottom player.&lt;/li&gt;
&lt;li&gt;And... Idk with time I'll figure it out what I need to do. &lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  How will I execute it?
&lt;/h2&gt;

&lt;p&gt;Everyday I’ll write about the progress of the project. The posts will be short and they will have a list of resources in the end.&lt;/p&gt;

&lt;p&gt;I’ll be following the best practices (that I Know) of Elm and Scss.&lt;/p&gt;

&lt;h2&gt;
  
  
  What are the tools that I will use for this project?
&lt;/h2&gt;

&lt;p&gt;The technologies that I will use:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Elm &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;^0.19.1 &lt;/li&gt;
&lt;li&gt;Do I need to explain why?&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;Docker &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;^20.10.8 &lt;/li&gt;
&lt;li&gt;To make our life easier&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;Git &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Because it’s the git&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;&lt;p&gt;VSCode or any IDE that you like&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Yes! Just that for today.&lt;/p&gt;

&lt;h2&gt;
  
  
  How can you help?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://github.com/Johann-Goncalves-Pereira/Spotify-Elm/issues"&gt;Open issues&lt;/a&gt; for suggestions of better approaches or ideas for the site.&lt;/li&gt;
&lt;li&gt;Connect &lt;a href="https://dev.todiscord"&gt;Discord&lt;/a&gt; Johann Pereira#7150&lt;/li&gt;
&lt;li&gt;Star the &lt;a href="https://github.com/Johann-Goncalves-Pereira/Spotify-Elm"&gt;Github&lt;/a&gt; repository.&lt;/li&gt;
&lt;li&gt;Follow me on &lt;a href="https://github.com/Johann-Goncalves-Pereira/Spotify-Elm"&gt;Github&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Source:
&lt;/h3&gt;

&lt;p&gt;Author: Johann Gonçalves Pereira&lt;br&gt;
Reviewed by: Nathali Thiemy Motooka&lt;br&gt;
&lt;a href="https://medium.com/@adityadroid/60-days-of-flutter-building-a-messenger-from-scratch-ab2c89e1fd0f"&gt;Blog Inspiration&lt;/a&gt;&lt;/p&gt;

</description>
      <category>elm</category>
      <category>html</category>
      <category>css</category>
      <category>design</category>
    </item>
  </channel>
</rss>
