WebAppTemplate FARM

screenshot of WebAppTemplate FARM

A full stack web application template that uses a Python backend and a JavaScript frontend.

Overview

The Full Stack Web App Template - FARM Stack is a full stack web application template that runs on the FARM solution stack. The FARM stack stands for Flask, Amazon Web Services (AWS), React, and MySQL. This template provides developers with a starting point for building web applications using these technologies.

Features

  • Flask: Used for writing web APIs and middleware to communicate between the web UI and the web backend/database.
  • Amazon Web Services (AWS): Can host the entire software stack, including applications on AWS Lambda, the database on AWS RDS, and store objects on AWS S3.
  • React: The framework for the web UI, allowing for responsive and dynamic user interfaces.
  • MySQL: The relational database management system used by the web backend.

Database Setup

To setup the MySQL instance:

  1. Create and connect to a MySQL database instance using a tool like MySQL Workbench or the Linux command line interface.
  2. Run the sample.sql script within the instance to create a schema called SampleInventory and initialize a table called Inventory.

API Setup

To setup the Flask API:

  1. Navigate to the api/ directory.
  2. Create a Python virtual environment: virtualenv farm-stack.
  3. Activate the virtual environment: source farm-stack/bin/activate.
  4. Install the necessary Python modules: pip3 install -r requirements.txt.
  5. Edit the database credentials in dbcreds.py as needed.

Running the API

To run the Flask API:

  1. Activate the virtual environment: source farm-stack/bin/activate.
  2. Navigate to the api/ directory.
  3. Run the API: python app.py.

Running the UI

To run the React UI:

  1. Navigate to the ui/ directory.
  2. Install the necessary dependencies: npm install.
  3. Start the UI: npm start.

Summary

The Full Stack Web App Template - FARM Stack is a full stack web application template that utilizes Flask, AWS, React, and MySQL. It provides developers with a starting point for building web applications with these technologies. The installation process includes setting up a local MySQL instance, installing modules for the API and UI, and running the API and UI locally. Overall, this template offers a comprehensive solution for developing and deploying full stack web applications.