Instaman is a simple Instagram account manager, with some automated tasks and a nice micro-service architecture. It was authored mostly for fun, and for showcasing how a multi-service, multi-platform repository should be structured and especially how it should be maintained. See, for instance:
- The list of pull requests
- The commit history
Note all commits messages are prepended with gitmoji.
Make sure you have installed
- Docker with Docker Compose
- [optional] Python 3 - only required by some tools like the linter and PyTest
- [optional] GNU Make (or Make on OSX) - only required if you want to leverage the existing Makefiles
- Create a new Telegram private group, following these instructions.
- Send a message to BotFather to create a new Telegram bot (it's super easy).
- Send another message to IDBot to retrieve your new bot's Token and the private group's ID, you will need these in the fifth step!
- Make a copy of docker-compose.override.example.yml and name it
docker-compose.override.yml
- Edit the new file and fill the placeholder environment variables.
- Run
docker compose up
and - voilà - your Instaman app is now running!
The backend application, written in Go. See its README file for more detailed information!
Note although it is not a very common practice, this folder also contains the go.mod
and go.sum
files. This decision was made in order to keep every service/component well separated from one another.
This serves HTTP requests using the application/json
format on via the following endpoints:
GET /instaman/instagram/me
GET /instaman/instagram/account/{name:str}
GET /instaman/instagram/account-id/{id:int}
GET /instaman/instagram/followers/{id:int}
GET /instaman/instagram/following/{id:int}
GET /instaman/instagram/picture
(this does not serve JSON)GET /instaman/jobs/copy
GET /instaman/jobs/all
GET /instaman/jobs/
POST /instaman/jobs/copy
A small webserver that acts as a proxy (with cache) for the Instagram GraphQL APIs. Written in Python and powered by FastAPI, it is completely asynchronous and does not require many dependencies (not even a database).
A simple SPA written with TypeScript, React, and components taken from the Ant Library. See its README file.
Data persisted from the application, that should never be committed. This directory is automatically created by docker compose
and contains at least:
/instagram/
: directory with data fetched by the instaproxy application, including the main user's sessions.