GithubHelp home page GithubHelp logo

trexcheng / instaasnap Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sahilbashambu/instaasnap

0.0 1.0 0.0 28.43 MB

InstaaSnap is an open-source, privacy friendly IG post saver, easily deployable with minimal configuration and no database and available as a Web and Native app.

License: GNU General Public License v3.0

JavaScript 59.04% CSS 9.89% Starlark 4.40% Java 14.51% Ruby 1.83% Objective-C 10.33%

instaasnap's Introduction

InstaaSnap · License: GPL v3

1. InstaaSnap is a Open Source IG Post Saver API, WebApp, iOS and Andoid app.
2. I created it to save cat and travel videos from IG.
3. It's Privacy friendly, no database, no analytics, no logs, no cookies.
4. InstaaSnap is built with Node.js, Express.js, React.js, Next.js and React Native. 

Website

instaasnap.app

Screenshots

alt text

alt text

Copyright?

1. You can't download and use images you find on Instagram without the permission of the copyright owner. 
2. Do you always need a permission?
3. No, if the downloading and sharing comes under fair use and other exceptions to copyright.
4. No, if the image you're using is in the public domain.
5. No, if the copyright owner has clearly stated that you may freely use the image without obtaining permission.
6. No, if the image has a Creative Commons (CC) license.

Authors

  • Choudhary Abdullah - API, WebApp and NativeApp - LinkedIn

Built With

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

To-do list before deployment

1. Add your IG Login Cookie to webapi's and nativeapi's app.js
2. Change instaasnap.app to your domain everywhere.
2. For React Native App, open XCode and Android Studio to do suitable adjustments like App Icons, Splash Screen, and Production Build.

Deployment, API & Web

Install Nginx and NodeJ 17 on Ubuntu 20.04

sudo apt update
sudo apt install nginx -y

curl -sL https://deb.nodesource.com/setup_17.x | sudo bash -
cat /etc/apt/sources.list.d/nodesource.list
sudo apt  install nodejs -y
node  -v

Updating Nginx conf in etc/nginx/nginx.conf

user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;

events {
	worker_connections 768;
	multi_accept on;
}

http {

	# Basic Settings
	sendfile on;
	tcp_nopush on;
	tcp_nodelay on;
	keepalive_timeout 65;
	types_hash_max_size 2048;
        client_max_body_size 20M;

	include /etc/nginx/mime.types;
	default_type application/octet-stream;


	# SSL Settings
	ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;
	ssl_prefer_server_ciphers on;


	# Logging Settings
	access_log /var/log/nginx/access.log;
	error_log /var/log/nginx/error.log;


	# Gzip Settings
	gzip on; 
	gzip_disable "msie6";
	gzip_vary on;
	gzip_proxied any;
	gzip_comp_level 6;
	gzip_buffers 16 8k;
	gzip_http_version 1.1;
        gzip_types 
	application/javascript application/rss+xml application/vnd.ms-fontobject application/x-font 
	application/x-font-opentype application/x-font-otf application/x-font-truetype application/x-font-ttf 
	application/x-javascript application/xhtml+xml application/xml font/opentype font/otf font/ttf 
	image/svg+xml image/x-icon text/css text/html text/javascript text/plain text/xml;

	include /etc/nginx/conf.d/*.conf;
	include /etc/nginx/sites-enabled/*;
}

Creating API Directory

sudo mkdir -p /var/www/instaasnap.app/nativeapi
sudo mkdir -p /var/www/instaasnap.app/webapi
sudo mkdir -p /var/www/instaasnap.app/webapp

sudo chown -R www-data:www-data /var/www/instaasnap.app
sudo chmod -R 755 /var/www/instaasnap.app

Creating Virtual Host

sudo nano /etc/nginx/sites-available/instaasnap.app
server {
    server_name instaasnap.app;
   
    # NativeAPI
    location /nativeapi {
        proxy_pass http://localhost:3004;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';
        proxy_set_header Host $host;
        proxy_cache_bypass $http_upgrade;
        proxy_read_timeout 30s;
    }
    
    # WebAPI
    location /webapi {
        proxy_pass http://localhost:3003;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';
        proxy_set_header Host $host;
        proxy_cache_bypass $http_upgrade;
        proxy_read_timeout 30s;
    }
    
    # WebApp
    location / {
        proxy_pass http://localhost:3002;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';
        proxy_set_header Host $host;
        proxy_cache_bypass $http_upgrade;
        proxy_read_timeout 30s;
    }

    # Output Folder
    location /output {
        root /var/www/instaasnap.app/webapi;
    }

}
sudo ln -s /etc/nginx/sites-available/instaasnap.app /etc/nginx/sites-enabled/
sudo unlink /etc/nginx/sites-enabled/default
sudo rm -rf /var/www/html
sudo systemctl restart nginx

Installing SSL

sudo apt install certbot python3-certbot-nginx -y
sudo certbot --nginx -d instaasnap.app
sudo systemctl status certbot.timer
sudo certbot renew --dry-run
sudo systemctl restart nginx

Copy respective folder files to..

/var/www/instaasnap.app/nativeapi/*
/var/www/instaasnap.app/webapi/*
/var/www/instaasnap.app/webapp/*

cd /var/www/instaasnap.app/nativeapi
npm install
npm install pm2 -g
pm2 start app.js -n NativeAPI

cd /var/www/instaasnap.app/webapi
npm install
pm2 start app.js -n WebAPI

cd /var/www/instaasnap.app/webapp
npm install
npm run build
pm2 start npm -n WebApp -- start

React Native

cd nativeapp
npm i
cd ios && pod install 
npx react-native link
npx react-native run-ios 

instaasnap's People

Contributors

chrismessina avatar naamhaiabdullah avatar sahilbashambu avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.