DocumentationGetting StartedLocal Installation and Setup

Installing and running locally

Getting started

First, clone the git repository. Before running the web application, you’ll need to set up a few services and environment variables.

Environment Variables

Intentify’s frontend and backend both require environment variables that need to be set in a .env file.

Frontend (src)

Backend

  • SECRET_KEY: A randomly generated secret key for encryption
  • DATABASE_URL: The location of the database. In my presentation video, I set it my PostgreSQL database in AWS. However, for local development, set this to http://127.0.0.1:5432.

Scripts

Inside, there are four scripts that help you with this web application’s lifecycle. Note: Ensure you have Docker and Python’s venv module installed.

setup.sh

Sets up and activates the virtual environment “venv” to install the required dependencies for the backend.

setup_docker.sh

Removes any existing docker containers and volumes. Thereafter, the script installs the necessary frontend dependencies in the virtual environment and rebuilds the web application’s containers.

The web application depends on three services:

  • db - A PostgreSQL database that runs on port 5432
  • flaskapp - The Flask backend of the web application, running on port 4000
  • nextapp - The Next.JS frontend of the web application, running on port 3000

run.sh

Runs the web application, utilizing the virtual environment.

shutdown.sh

Stops all running docker containers.


In general, start Intentify by running (in order), setup.sh, setup_docker.sh, and run.sh. Once done, run shutdown.sh to stop all running services. You don’t have to set the application back up after you stop it; just run run.sh to start it back up.

Last updated on