Skip to content

Meal Planner back-end is a capstone project created during Ada Developers Academy, cohort 17.

Notifications You must be signed in to change notification settings

estherannorzie/meal-planner-back-end

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Meal Planner: Back-End

Python3 badge Pytest badge Flask badge SQLAlchemy badge PostgreSQL badge

Table of Contents
  1. Description
  2. Usage
  3. API Design
  4. Example Usage

Description

A text-based, meal planner web server that allows users to create meal plans for the current day or a future day. Development has come to a halt.

Features

  • Create an account
  • Delete an account
  • Update account password or email address
  • Create a meal plan
  • Delete a meal plan
  • Update a meal plan
  • View all meal plans

API Design

Images Entity relationship diagram
Endpoint chart

Requirements

Usage

  1. Clone the repository to a folder on your local machine.

  2. In your terminal, move into the root of your project directory and run the following commands to create your virtual environment.

    $ python3 -m venv venv
    $ source venv/bin/activate
    $ pip install -r requirements.txt
    $ touch .env
    
  3. Run PostgresSQL from your terminal and create a database for development and testing.

    $ CREATE DATABASE db_name;
    $ CREATE DATABASE db_test_name;
    
  4. Copy and paste the URIs below into your .env file.

    SQLALCHEMY_DATABASE_URI=postgresql+psycopg2://postgres:postgres@localhost:5432/db_name
    SQLALCHEMY_TEST_DATABASE_URI=postgresql+psycopg2://postgres:postgres@localhost:5432/db_test_name
    
  5. Use an API platform to make requests.

Example Usage

Creating an account

Request

{
  "username": "janeydoe53",
  "password": "df35f~4g*",
  "first_name": "Jane",
  "last_name": "Doe",
  "email": "[email protected]"
}

Response

"User janeydoe53 successfully created."


Creating a meal plan

Request

{
  "title": "Krispy Kreme Doughnuts Original Glazed Doughnut",
  "type": 4,
  "calories": 190,
  "date": "Wed, 15 Mar 2023"
}

Response

"Krispy Kreme Doughnuts Original Glazed Doughnut meal plan for user eggpioneer10 successfully created."

About

Meal Planner back-end is a capstone project created during Ada Developers Academy, cohort 17.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 98.6%
  • Mako 1.3%
  • Procfile 0.1%