<?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>Forem: Alyssa Mhie Matila</title>
    <description>The latest articles on Forem by Alyssa Mhie Matila (@alyssa_mhie).</description>
    <link>https://forem.com/alyssa_mhie</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%2F2530922%2Fb889ba58-2493-4dc1-a941-b6fd3836c80b.png</url>
      <title>Forem: Alyssa Mhie Matila</title>
      <link>https://forem.com/alyssa_mhie</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/alyssa_mhie"/>
    <language>en</language>
    <item>
      <title>Deploy a Django App from GitHub on AWS Lightsail Using the Bitnami Django Stack</title>
      <dc:creator>Alyssa Mhie Matila</dc:creator>
      <pubDate>Fri, 20 Dec 2024 11:22:31 +0000</pubDate>
      <link>https://forem.com/alyssa_mhie/deploy-a-django-app-from-github-on-aws-lightsail-using-the-bitnami-django-stack-4124</link>
      <guid>https://forem.com/alyssa_mhie/deploy-a-django-app-from-github-on-aws-lightsail-using-the-bitnami-django-stack-4124</guid>
      <description>&lt;p&gt;In this tutorial, I'll  walk you through deploying your &lt;strong&gt;Django web application&lt;/strong&gt; hosted on &lt;strong&gt;GitHub&lt;/strong&gt; to an &lt;strong&gt;AWS Lightsail instance&lt;/strong&gt; using the &lt;strong&gt;Bitnami Django stack&lt;/strong&gt;. Bitnami simplifies deployment by providing a pre-configured, production-ready environment that includes Django, web server (Nginx or Apache), and a database (PostgreSQL or MySQL).&lt;/p&gt;

&lt;p&gt;By the end of this tutorial, you’ll have your &lt;strong&gt;Django project from GitHub&lt;/strong&gt; up and running on AWS Lightsail with minimal configuration.&lt;/p&gt;




&lt;h3&gt;
  
  
  Why Choose AWS Lightsail for Django Deployment?
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;AWS Lightsail&lt;/strong&gt; is an easy-to-use and affordable cloud service, ideal for hosting Django apps. It provides virtual private servers (instances) with simple management features like static IPs, pre-configured stacks, and predictable pricing. Here's why it's a great choice for Django:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Affordable Pricing&lt;/strong&gt;: Low upfront costs with predictable pricing.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Simplified Setup&lt;/strong&gt;: Easy-to-use interface for quick deployment.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scalability&lt;/strong&gt;: Scales well for small to medium apps.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pre-configured Stacks&lt;/strong&gt;: Simplified environment setup, including Django. &lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  Step-by-Step Guide
&lt;/h3&gt;

&lt;h4&gt;
  
  
  1. &lt;strong&gt;Create a Lightsail Instance Using the Bitnami Django Stack&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;Log in to AWS Lightsail:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Go to the &lt;a href="https://lightsail.aws.amazon.com/" rel="noopener noreferrer"&gt;Amazon Lightsail Console&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Create a New Instance:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Click on &lt;strong&gt;Create instance&lt;/strong&gt; in the Lightsail dashboard.&lt;/li&gt;
&lt;li&gt;Under &lt;strong&gt;Applications&lt;/strong&gt;, choose &lt;strong&gt;Django&lt;/strong&gt; from the Bitnami stack options.&lt;/li&gt;
&lt;/ul&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%2Fw2qb4qjb91iwq5hz2zj6.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%2Fw2qb4qjb91iwq5hz2zj6.png" alt="Django Bitnami Image" width="800" height="545"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Select the &lt;strong&gt;Region&lt;/strong&gt; closest to your target audience to reduce latency.&lt;/li&gt;
&lt;li&gt;Choose an instance plan. The $5/month plan is suitable for small Django applications.&lt;/li&gt;
&lt;/ul&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%2Fw9x5wpizcrydllot1m5m.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%2Fw9x5wpizcrydllot1m5m.png" alt="Django Bitnami Plan" width="800" height="610"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Name your instance (e.g., &lt;code&gt;django-app-bitnami&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Download or use an existing &lt;strong&gt;SSH key&lt;/strong&gt; to connect to your instance.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Create instance&lt;/strong&gt; to launch your Django instance.&lt;/li&gt;
&lt;/ul&gt;




&lt;h4&gt;
  
  
  2. &lt;strong&gt;Access Your Lightsail Instance&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Once your Lightsail instance is running, you’ll need to SSH into it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Obtain the Static IP:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Go to the &lt;strong&gt;Networking&lt;/strong&gt; tab in the Lightsail console.&lt;/li&gt;
&lt;li&gt;Allocate and attach a &lt;strong&gt;Static IP&lt;/strong&gt; to your Lightsail instance. This static IP will be used to access your Django application.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;SSH into the Instance:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You can SSH directly from the Lightsail Console by clicking &lt;strong&gt;Connect&lt;/strong&gt;, or use a terminal command:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ssh &lt;span class="nt"&gt;-i&lt;/span&gt; /path/to/your/ssh-key.pem bitnami@&amp;lt;your_instance_ip&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&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%2Fkogpdivsqvh25un7pvbw.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%2Fkogpdivsqvh25un7pvbw.png" alt="Image description" width="800" height="356"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h4&gt;
  
  
  3. &lt;strong&gt;Clone Your Django Project from GitHub&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Now that you're connected to your Lightsail instance, you can clone your Django project from GitHub.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Install Git:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;First, ensure that Git is installed on your Lightsail instance:&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;sudo &lt;/span&gt;apt update
&lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install &lt;/span&gt;git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Clone Your GitHub Repository:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Now, navigate to the directory where you want to store your project (e.g., &lt;code&gt;/home/bitnami/&lt;/code&gt;) and clone your repository:&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;cd&lt;/span&gt; /home/bitnami
git clone https://github.com/yourusername/your-django-app.git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Replace &lt;code&gt;https://github.com/yourusername/your-django-app.git&lt;/code&gt; with the actual URL of your GitHub repository.&lt;/p&gt;




&lt;h4&gt;
  
  
  4. &lt;strong&gt;Configure Django Settings&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Once you’ve cloned your Django project, you need to configure the &lt;code&gt;settings.py&lt;/code&gt; file to ensure it works in the production environment.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Access the Django Application:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Navigate to the project directory. Bitnami installs Django in &lt;code&gt;/opt/bitnami/apps/django/django-project/&lt;/code&gt; by default, but your app will be in the folder you cloned from GitHub.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; /home/bitnami/your-django-app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Edit the &lt;code&gt;settings.py&lt;/code&gt; File:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Use a text editor like &lt;code&gt;nano&lt;/code&gt; or &lt;code&gt;vi&lt;/code&gt; to modify your &lt;code&gt;settings.py&lt;/code&gt;:&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;sudo &lt;/span&gt;nano your-django-app/yourproject/settings.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Change the following settings:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;ALLOWED_HOSTS:&lt;/strong&gt; Add your Lightsail static IP or domain (if you have one) to the &lt;code&gt;ALLOWED_HOSTS&lt;/code&gt; list:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;ALLOWED_HOSTS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;&amp;lt;your_instance_ip&amp;gt;&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;yourdomain.com&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Database Configuration:&lt;/strong&gt; The Bitnami stack uses PostgreSQL by default, so use the default database configuration if you're using PostgreSQL:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;DATABASES&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;default&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;ENGINE&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;django.db.backends.postgresql_psycopg2&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;NAME&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;bitnami_django&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;USER&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;bn_django&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;PASSWORD&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;yourpassword&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;HOST&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;localhost&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;PORT&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;5432&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Static Files Configuration:&lt;/strong&gt; Make sure the following static files settings are correct:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;STATIC_URL&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;/static/&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;
&lt;span class="n"&gt;STATIC_ROOT&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;/home/bitnami/your-django-app/static&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h4&gt;
  
  
  5. &lt;strong&gt;Run Migrations and Collect Static Files&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;After configuring your settings, run migrations and collect static files.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Run Django Migrations:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Apply any database migrations:&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;sudo &lt;/span&gt;python3 manage.py migrate
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Collect Static Files:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Run the following command to collect all static files into a central location:&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;sudo &lt;/span&gt;python3 manage.py collectstatic
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h4&gt;
  
  
  6. &lt;strong&gt;Access the Application in the Browser&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Once you’ve completed the above setup, your Django application should be accessible via your Lightsail instance’s static IP.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Open a browser and enter the static IP of your Lightsail instance:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;http://&amp;lt;your_instance_ip&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You should see the Django welcome page or your application if you already have code deployed.&lt;/p&gt;




&lt;h3&gt;
  
  
  Try it with My Simple To-Do List App
&lt;/h3&gt;

&lt;p&gt;Clone my &lt;strong&gt;&lt;a href="https://github.com/justmhie/to-do-django" rel="noopener noreferrer"&gt;Simple To-Do List Django App&lt;/a&gt;&lt;/strong&gt; and follow these steps to deploy it on AWS Lightsail.&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%2Fgynde35ff61jglzwjj0n.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%2Fgynde35ff61jglzwjj0n.png" alt="To-Do List" width="362" height="315"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;You’ve successfully deployed your &lt;strong&gt;Django application from GitHub&lt;/strong&gt; on AWS Lightsail using the &lt;strong&gt;Bitnami Django stack&lt;/strong&gt;. With this setup, you have:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A pre-configured, production-ready Django environment.&lt;/li&gt;
&lt;li&gt;A PostgreSQL database.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;AWS Lightsail with Bitnami provides a simple, cost-effective solution for hosting Django applications. Whether you're deploying a small personal project or a production application, this solution ensures that your Django application runs smoothly.&lt;/p&gt;




&lt;h3&gt;
  
  
  References
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/lightsail/" rel="noopener noreferrer"&gt;AWS Lightsail Official Documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://bitnami.com/stack/django" rel="noopener noreferrer"&gt;Bitnami Django Stack Documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.djangoproject.com/en/stable/" rel="noopener noreferrer"&gt;Django Official Documentation&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>aws</category>
      <category>django</category>
      <category>cloud</category>
      <category>python</category>
    </item>
    <item>
      <title>Building a Full-Stack Coffee Delivery App</title>
      <dc:creator>Alyssa Mhie Matila</dc:creator>
      <pubDate>Fri, 06 Dec 2024 09:18:18 +0000</pubDate>
      <link>https://forem.com/alyssa_mhie/building-a-full-stack-coffee-delivery-app-4ie4</link>
      <guid>https://forem.com/alyssa_mhie/building-a-full-stack-coffee-delivery-app-4ie4</guid>
      <description>&lt;p&gt;As part of our school project, we created a full-stack coffee delivery app for an existing business. The goal was to build a &lt;strong&gt;website&lt;/strong&gt; where customers can order food online, track their orders, and pay seamlessly. We used a &lt;strong&gt;React JS&lt;/strong&gt; frontend, &lt;strong&gt;MongoDB&lt;/strong&gt; for database management, &lt;strong&gt;Express&lt;/strong&gt; and &lt;strong&gt;Node JS&lt;/strong&gt; for the backend, and &lt;strong&gt;Stripe&lt;/strong&gt; for handling payments. Let’s walk through the main features of the app.&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Project Overview:&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The app is divided into four main subsystems:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Order Management&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Inventory Management&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sales Management&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;User Management&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;We developed the &lt;strong&gt;Frontend (React JS)&lt;/strong&gt;, &lt;strong&gt;Admin Panel&lt;/strong&gt;, and &lt;strong&gt;Backend server&lt;/strong&gt; using &lt;strong&gt;Node JS&lt;/strong&gt;, then deployed the entire application using &lt;strong&gt;Render&lt;/strong&gt;.&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Subsystem 1: Order Management&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;This subsystem allows customers to browse the menu, place orders, and track them in real-time. &lt;/p&gt;

&lt;h4&gt;
  
  
  Key Features:
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Manage Products&lt;/strong&gt; (Admin Panel): Admin can add new products and update the availability of items (e.g., a new smoothie or coffee). These changes reflect on the customer-facing menu instantly.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Order Placement&lt;/strong&gt;: Customers can add products to their cart, choose between delivery or pick-up, and proceed to checkout. They can log in before completing the order.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&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%2Fdmgsnurcrcjb0nws2qge.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%2Fdmgsnurcrcjb0nws2qge.png" alt="Menu Page" width="800" height="440"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Payment Integration&lt;/strong&gt; (via Stripe and GCash): Customers can pay via credit card through the &lt;strong&gt;Stripe API&lt;/strong&gt; or using &lt;strong&gt;GCash&lt;/strong&gt; by scanning a QR code. After payment, the order is processed.&lt;/li&gt;
&lt;/ol&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%2Fy5rvowv2uh3tmaury655.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%2Fy5rvowv2uh3tmaury655.png" alt="Delivery Page" width="800" height="389"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Order Tracking&lt;/strong&gt;: Customers can track their order status (e.g., "Brewing your coffee" or "Out for delivery"). They can cancel an order if it’s still in the early stages.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Order Status Update&lt;/strong&gt; (Admin/Employee Panel):&lt;br&gt;&lt;br&gt;
Admins and employees can update the order status—marking it as "brewing," "out for delivery," or "ready for pick-up."&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Subsystem 2: Inventory Management&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;This subsystem tracks stock levels and manages ingredient supplies to ensure smooth operations.&lt;/p&gt;

&lt;h4&gt;
  
  
  Key Features:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Manage Ingredients&lt;/strong&gt;:
Admins can add, edit, or delete ingredients and supplies used in products.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stock Management&lt;/strong&gt;:
Track stock in and out, and get alerts when the stock is low. This ensures that the kitchen never runs out of key ingredients.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&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%2F1f84oorfxpopqvjk7de3.jpg" alt="Stock-in Page" width="800" height="404"&gt;
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Subsystem 3: Sales Management&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;This subsystem helps monitor sales and track revenue.&lt;/p&gt;

&lt;h4&gt;
  
  
  Key Features:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Sales Reports&lt;/strong&gt;:
Admins can generate sales reports, choose a date range, and export the data to a PDF for financial analysis.
&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%2F11ddaxw3uk7g01k5bgos.jpg" alt="Sales Report Page" width="800" height="386"&gt;
---&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Subsystem 4: User Management&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;This subsystem handles customer registration, login, and employee role management.&lt;/p&gt;

&lt;h4&gt;
  
  
  Key Features:
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Customer Accounts&lt;/strong&gt;:&lt;br&gt;&lt;br&gt;
Customers can create an account, log in, and view their order history. They can also reset their password if they forget it.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Employee Accounts&lt;/strong&gt;:&lt;br&gt;&lt;br&gt;
Admins can create employee accounts with role-based access (e.g., rider, cashier, manager) to ensure the right people can access the necessary system features.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Technology Stack:&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Frontend&lt;/strong&gt;: React JS for a dynamic and responsive user interface.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Backend&lt;/strong&gt;: Node.js and Express to handle server-side logic and API requests.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Database&lt;/strong&gt;: MongoDB for storing user data, orders, and inventory.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Payment Gateway&lt;/strong&gt;: Stripe API for processing credit card payments and GCash integration for mobile wallet payments.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deployment&lt;/strong&gt;: Render for hosting the entire app.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Challenges &amp;amp; Learning Points:&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;State Management in React&lt;/strong&gt;: Using &lt;strong&gt;React Context&lt;/strong&gt; and &lt;strong&gt;useState&lt;/strong&gt; to manage the state across different components was essential, especially for handling cart details and order statuses.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Real-Time Updates&lt;/strong&gt;: Integrating &lt;strong&gt;WebSocket&lt;/strong&gt; or &lt;strong&gt;Socket.io&lt;/strong&gt; to provide real-time updates for order tracking was crucial.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Payment Integration&lt;/strong&gt;: The process of integrating &lt;strong&gt;Stripe&lt;/strong&gt; and &lt;strong&gt;GCash&lt;/strong&gt; required careful attention to security and handling payment flows correctly.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Conclusion:&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;This project helped us understand how to integrate different technologies into a full-stack application. It was an amazing learning experience, as we worked with everything from the frontend to the backend and managed the deployment process. Building a food delivery app also gave us insights into practical business workflows, such as order management, inventory tracking, and sales reporting.&lt;/p&gt;

&lt;p&gt;If you're interested in building a similar project or just want to learn more about full-stack development, feel free to ask any questions in the comments!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>react</category>
      <category>mongodb</category>
    </item>
  </channel>
</rss>
