Microblog is a web application that allows users to create profiles, write posts, send messages, follow each other, and many other social interactions. The platform supports English, Arabic, French, Spanish, and German. The website is implemented in flask (a python framework) and following Flask Mega-Tutorial.
- Clone the remote repositery
- Go to the directory of the local repositery to create and activate a python environment
python -m venv venv source venv/bin/activate #in Ubuntu, WSL, or even Bash Terminal
- After activating the environment install the required dependencies
pip install -r requirments.txt
- Create '.env' file in the directory and add these variables in it:
SECRET_KEY=an-example-of-a-strong-password # create a strong password and drop it here to be used later in resseting the user password MAIL_SERVER=localhost MAIL_PORT=25 MS_TRANSLATOR_KEY= *********************** #Your microsoft azure translation key CAFILE=http_ca.crt #this certificate is optained from ElasticSearch and copied to the directory of microblog ELASTICSEARCH_URL=https://localhost:9200 ELASTIC_NAME=elastic ELASTIC_PASSWORD=******************* #your ElasticSearch password optained from running ElasticSearch server for the first time
- Notes:
- Azure translation key could be optained for free, follow this Microsoft tutorial
- ElasticSearch service should be installed and running to be able to index and search the website posts, follow this installation guide and I highly recommend downloading and running it in docker following Elastic docker installation
Feed that only shows posts of people you are following and your own posts
Feed that shows posts from all people whether you follow them or not
The website supports 5 Languages ['en', 'ar', 'es', 'fr', 'de'], Microblog chooses the language based on the browser default language which could be changed:
ONLY DO ONE OF THESE TWO
- Open 'edge://settings/languages' or whats equivalent in your choosen browser, add a language, then move it up in priority.
- Force certain language by commenting 'return request.accept_languages.best_match(current_app.config['LANGUAGES'])' in get_locale() microblog/app/init.py line 15
Profile avatars are auto generated using Gravatar, the avatars are 'identicon avatar' generated uniquely for each user using the user's mail
Users can send private messages to each others
- Ahmed Sends TheCoolestUser a message
- TheCoolestUser Gets notified in the upper right corner that he has received a new message
- TheCoolestUser opens his inbox to check the message