/recipe-app-api

Django (Python) API for online recipe application.

Primary LanguagePythonMIT LicenseMIT

Recipe App API

Recipe App API

💡 Project's Idea

This project was developed to create an online recipe application.

🔍 Features

  • Register a new account and login to it;
  • Create, view, update and delete recipes;
  • Create, view, update and delete recipe tags;
  • Create, view, update and delete recipe ingredients;
  • Add images to the recipes;
  • Filtering by tags and ingredients;

🛠 Technologies

During the development of this project, the following techologies were used:

💻 Project Configuration

first, create a .env file based on the .env.sample template provided.

You should ensure that you have Docker installed on you computer. Once the verification is done, you can use the command below to create the docker image:

$ docker-compose build

⏯️ Running

To run the project in a development environment, execute the following command on the root directory.

$ docker-compose up

You can access Django Admin at: http://localhost:8000/admin

You can access the Swagger documentation at: http://localhost:8000/api/docs

Finally, a Makefile was created in order to help providing some of the commands listed above in a simple way.

🏗️ Infrastructure as Code (IaC) with Terraform

To make it easier to provision infrastructure on cloud providers, you can make use of the Terraform template provided.

First, you'll need to install Terraform on your machine; then, since we're using AWS for the specified resources, you'll need to install the AWS CLI as well.

After that, you must set up an IAM user with permissions to manage resources, create an access key for the new user and configure the AWS CLI with the following command (entering the access key ID, secret access key, default region and outout format):

$ aws configure

Once these steps are done, you can use the Terraform commands to create, update and delete resources.

$ terraform init # Downloads the necessary provider plugins and set up the working directory
$ terraform plan # Creates the execution plan for the resources
$ terraform apply # Executes the actions proposed in a Terraform plan
$ terraform destroy # Destroys all remote objects managed by a particular Terraform configuration

If you want to provide the required variables for Terraform automatically when executing the script, you can create a file called prod.auto.tfvars file on the root directory, with all needed variables, according to the sample provided (auto.tfvars).

Documentation:

📄 License

This project is under the MIT license. For more information, access LICENSE.