Skip to content

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.

License

Notifications You must be signed in to change notification settings

ahmedalycess/microblog

Repository files navigation

Microblog

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.

Installation instructions:

  • 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

Entity Relationship Diagram (ERD):

Main functionalities and Features:

Home page:

Feed that only shows posts of people you are following and your own posts

Explore:

Feed that shows posts from all people whether you follow them or not

Indexing and Searching posts using Elasticsearch:

Dynamic Translation (using Microsoft Azure translation api):

Website Languages:

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

German LeftToRight Bootstrap Vs Arabic RTL Bootstrap::

Profile:

Profile avatars are auto generated using Gravatar, the avatars are 'identicon avatar' generated uniquely for each user using the user's mail

Messages:

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

About

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.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages