Skip to content

michaelpappas/pixly-backend

Repository files navigation

Pixly Backend

RESTful Flask/Postgres API for for image processing and uploading to AWS S3

The accompanying frontend repo can be seen here.

A deployed version can be found here.

Table of Contents

Manual Installation

Clone the repo:

git clone https://github.com/michaelpappas/pixly-backend
cd pixly-backend

Set the environment variables:

touch .env
# open .env and modify the environment variables

or

cp .env.example .env
# open .env and modify the environment variables

Development Environment

You'll need Python3 and PostgreSQL

  python3 -m venv venv
  source venv/bin/activate
  pip3 install -r requirements.txt
  # create a virtual environment and install the dependencies

Create pixly database in psql with

CREATE DATABASE pixly;

To run the backend run "flask run -p 5002". The frontend will by default look for the backend at 5002 or a specified url in your .env file

Project Structure

\                       # Root folder
 |--.env.example        # example environment variables
 |--app.py              # main routes scripts
 |--image_processing.py # scripts for image processing
 |--models.py           # database models and methods
 |--pixly_aws.py        # scripts for aws
 |--readme.md           # project readme
 |--requirements.txt    # dependencies

API Endpoints

List of available routes:

Images routes:
GET api/images - get images (optional filtering)
GET api/images/:id - get image by id
POST api/images - post image
PATCH api/images:id - patch image to increment views

Further Improvements

  • Write Unittest
  • Build out tags functionality
  • Enable filtering by exif data like manufacturer and device
  • Modify image processing to allow for HEIC image upload and exif processing

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages