<h1>Installation<aclass="headerlink"href="#installation"title="Permalink to this headline">¶</a></h1>
<p>This application is written in Python (API) and Javascript (client):</p>
<ulclass="simple">
<li><dlclass="simple">
<dt>API:</dt><dd><ul>
<li><p>Flask</p></li>
<li><p><aclass="reference external"href="https://github.com/tkrajina/gpxpy">gpxpy</a> to parse gpx files</p></li>
<li><p><aclass="reference external"href="https://github.com/komoot/staticmap">staticmap</a> to generate a static map image from gpx coordinates</p></li>
<li><p><aclass="reference external"href="https://github.com/ZeevG/python-forecast.io">python-forecast.io</a> to fetch weather data from <aclass="reference external"href="https://darksky.net">Dark Sky</a> (former forecast.io)</p></li>
</ul>
</dd>
</dl>
</li>
<li><dlclass="simple">
<dt>Client:</dt><dd><ul>
<li><p>React/Redux</p></li>
<li><p><aclass="reference external"href="https://leafletjs.com/">Leaflet</a> to display map</p></li>
<li><p><aclass="reference external"href="https://github.com/recharts/recharts">Recharts</a> to display charts with elevation and speed</p></li>
</ul>
</dd>
</dl>
</li>
</ul>
<p>Sports and weather icons are made by Freepik from www.flaticon.com.</p>
<divclass="section"id="prerequisites">
<h2>Prerequisites<aclass="headerlink"href="#prerequisites"title="Permalink to this headline">¶</a></h2>
<ulclass="simple">
<li><p>PostgreSQL database (10+)</p></li>
<li><p>Python 3.7+</p></li>
<li><p><aclass="reference external"href="https://yarnpkg.com">Yarn</a> and
<li><p>Update <strong>Makefile.config</strong> file if needed and copy/paste the
<strong>ThunderForest</strong> and <strong>Dark Sky</strong> API keys value in
<strong>Makefile.custom.config</strong> file (see example)</p></li>
<li><p>Install Python virtualenv, React and all related packages and
initialize the database:</p></li>
</ul>
<divclass="highlight-bash notranslate"><divclass="highlight"><pre><span></span>$ make install-dev
$ make install-db
</pre></div>
</div>
<ulclass="simple">
<li><p>Start the server and the client:</p></li>
</ul>
<divclass="highlight-bash notranslate"><divclass="highlight"><pre><span></span>$ make serve
</pre></div>
</div>
<p>Open <aclass="reference external"href="http://localhost:3000">http://localhost:3000</a> and login (the email is <codeclass="docutils literal notranslate"><spanclass="pre">admin@example.com</span></code>
and the password <codeclass="docutils literal notranslate"><spanclass="pre">mpwoadmin</span></code>) or register</p>
</div>
<divclass="section"id="prod-environment">
<h3>Prod environment<aclass="headerlink"href="#prod-environment"title="Permalink to this headline">¶</a></h3>
<li><p>Update <strong>Makefile.config</strong> file if needed and copy/paste the
<strong>ThunderForest</strong> and <strong>Dark Sky</strong> API keys value in
<strong>Makefile.custom.config</strong> file (see example)</p></li>
<li><p>Install Python virtualenv, React and all related packages and
initialize the database:</p></li>
</ul>
<divclass="highlight-bash notranslate"><divclass="highlight"><pre><span></span>$ make install
$ make install-db
</pre></div>
</div>
<ulclass="simple">
<li><p>Build the client:</p></li>
</ul>
<divclass="highlight-bash notranslate"><divclass="highlight"><pre><span></span>$ make build-client
</pre></div>
</div>
<ulclass="simple">
<li><p>Start the server and the client:</p></li>
</ul>
<divclass="highlight-bash notranslate"><divclass="highlight"><pre><span></span>$ make run
</pre></div>
</div>
<p>Open <aclass="reference external"href="http://localhost:3000">http://localhost:3000</a>, log in as admin (the email is
<codeclass="docutils literal notranslate"><spanclass="pre">admin@example.com</span></code> and the password <codeclass="docutils literal notranslate"><spanclass="pre">mpwoadmin</span></code>) and change the
password</p>
</div>
</div>
<divclass="section"id="upgrade">
<h2>Upgrade<aclass="headerlink"href="#upgrade"title="Permalink to this headline">¶</a></h2>