Skip to content

petelah/insta-sign

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Forks Stargazers Issues MIT License LinkedIn


Insta-Sign

A covid sign in extension for instagram.
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents

  1. About The Project
  2. Getting Started
  3. Usage
  4. Features
  5. Wireframes & Workflow
  6. Deployment
  7. Cloud Architecture
  8. Reports
  9. License
  10. Contact
  11. Acknowledgements

About The Project

Main Screenshot

Insta-sign integrates directly with instagram so you do not need to sign up to any covid sign in services anymore. You can just offer a qr code to sign in where you can capture emails and follows to your profile. Or sign in directly from your profile link. If you have a menu available online you can redirect to it as well.

Integration is as easy as enabling it if you hold a business account and your business is verified.

This has been designed to run both the front end and back end API on the same server.

Users are authenticated on the front end using sessions via flask-login and the API will server users with JWT's so it is easily integrable with any mobile app framework as well.

To the dudes marking this - I had a great time creating this little guy, please find the answers to the report questions in docs/ =).

Built With

  • Python - Coding language
  • Flask - The framework that allows interaction with data through http
  • Jinja - Templating language for interacting with the framework
  • WTForms - Form creating framework which interacts directly with the ORM and adds CSRF protection
  • SQLAlchemy - The ORM that interacts with python and the database
  • SQLite - A lightweight filesystem based db used for prototyping
  • Postgres - An open source production level database, this is used on our EC2 instance

Getting Started

As this is done as a proof of concept and an assignment for Coder Academy. This can be run locally but has no official integration with instagram at all.

Prerequisites

Prerequisites is to have python 3.7+, pip and pip-env installed

Installation

git clone https://github.com/petelah/insta-sign.git
cd insta-sign
python -m venv venv
source venv/bin/activate
pip3 install -r requirements.txt
export FLASK_APP=run.py

Rename the .env.example file to .env and fill in your environment variables.

Usage

As this is done as a proof of concept and an assignment for Coder Academy. This can be run locally but has no official integration with instagram at all.

Setup the db:

flask db-custom create

If you wish to have test users run:

flask db-custom seed
flask run

Open your browser to http://127.0.0.1:5000/

or you can test the rest API endpoints with the swagger file provided in docs/ folder.

Features

  • Sign in with instagram or facebook account
  • Auto generate qr codes - coming soon
  • Gain followers when people sign into your venue or business
  • Capture emails for future marketing
  • Admin panel for approving businesses and dumping the db

Wireframes & Workflow

Wireframes

Login:

login_wf

Feed:

feed_wf

Profile:

profile_wf

Sign In:

sign_in_wf

Entity relationship Diagram:

ERD

Constraints

User constraints:

  • Constraints placed on the user by restricting access to the admin panel and routes.
  • Access is granted and revoked via front end using sessions and API via JWT.
  • Users cannot edit other users profiles, and a user cannot verify their own business or another users business, only an admin can do that.
  • A user can have only one business account only.
  • A user can like another users post
  • A user can follow and unfollow another user
  • A user can create and delete their own posts
  • A user can comment on another users post

Business constraints:

  • A Business cannot accept any sign in's unless the business is approved by an admin. Once approved they can only access user data that have the user has opted to give them.

Anonymous users:

  • Anonymous or unregistered users have the ability to view profiles and sign in, they have no other access to endpoints.

Deployment

CI/CD is handled with GitHub actions.

The initial push to dev branch will execute tests and syntax linting. Once it is built and tests are passed in the docker environment the code is them merged via pull request from dev to main.

Upon a successful merge the code will then be deployed to Amazon AWS on an EC2 instance, if a previous instance is running it will be torn down, rebuilt and started as a system service.

Cloud Architecture

Cloud architecture would be extremely simple for this add on. The following diagram has the example running in it's own aws region for proof of concept purposes. However in the real world this would integrate straight into Instagram's existing architecture.

ERD

## Reports

You can find detailed reports on both professional obligations and security concerns here: Reports

## License

Distributed under the MIT License. See LICENSE for more information.

Contact

Peter Seabrook - @PeterSeabrook - [email protected]

Project Link: https://github.com/petelah/insta-sign

Acknowledgements

About

Covid sign in for integration for instagram

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published