API and API‐doc examples - terrytaylorbonn/auxdrone GitHub Wiki

24.1228 (Gdrive)

This page describes a 3 examples, from minimal to complete:

  • 1 Django (frontend) / Flask (backend) (on localhost)
  • 2 Django (backend) on AWS EC2 (Terraform)
  • 3 Complete deployment (MERN/RENDER)

Each diagram shows the API and the API-doc ("Swagger").

image

1 Django (frontend) / Flask (backend) (on localhost)

This recent example (24.1211) ran on localhost (not deployed) and had the following

  • Frontend (see docx #240 for details)
    • Django running on localhost (original code created by Vercel and deployed in Vercel).
  • Backend (see docx #244 for details)
    • Swagger created manually.
    • Flask running on localhost (original code generated by Swagger codegen based on the Swagger file).

image

Open the URL on :8000 (Django) that displays data from an API endpoint on :8080 (Flask).

API

image image

Swagger URL

image image

2 Django (backend) on AWS EC2 (Terraform)

See docx #235 for details.

  • Dev PC (Win11)

    • Swagger auto-generated by Django.
  • Backend

    • Terraform setups the AWS infrastructure.
    • EC2
  • Frontend

    • PC browser (TODO: Frontend like React)

    image

    image

3 Complete deployment (MERN/RENDER)

The following diagram (WIP) is a generic depiction of a complete deployment.

image

I done a lot of demos, but the first "complete" (with 1,2,4 above) should be MERN on RENDER (details in doc #261). "Complete" but without Swagger.

image

I hope to complete this before end of 2024 (today is 24.1228). Its a big project. Complex.

image

Local deployment

Front end

image