Transit MicroService

image info

The Transit Chart microservice within the Falomen app is a dynamic feature that offers users personalized astrological forecasts based on the current movements of the planets and how they interact with their natal chart. This service calculates the positions of the planets in real-time and overlays them onto the user's birth chart, analyzing the aspects and alignments formed. Utilizing advanced AI algorithms, it interprets these transits to provide insights into how current and upcoming planetary movements could influence the user's life, emotions, opportunities, and challenges. The Transit Chart service focuses on short-term forecasts, highlighting daily, weekly, or monthly astrological trends that might affect the user's personal growth, relationships, career, and other life areas. It offers a unique blend of predictive astrology and personalized guidance, helping users navigate through life's ups and downs with more awareness and understanding. By providing detailed predictions and advice based on astrological transits, this microservice enhances the user experience by making astrology actionable and relevant to daily life. It bridges the gap between celestial events and personal experience, making the Falomen app a valuable tool for those who seek to use the wisdom of the stars to guide their life choices and understand the astrological influences at play in their lives.


1) Requirements:

  • grpcio==1.62.0
  • grpcio-tools==1.59.0
  • transformers==4.34.1
  • scikit_learn==1.2.2
  • matplotlib==3.7.1
  • kerykeion==3.4.2
  • pandas==2.0.1
  • numpy==1.23.5
  • openpyxl==3.1.2
  • prometheus_client==0.18.0
  • minio == 7.2.3
  • arabic-reshaper == 3.0.0
  • python-bidi == 0.4.2
  • python-dotenv == 1.0.0
  • grpcio-reflection==1.62.0

2) API Documentation:

3) Assets:

  • gRPC Proto Files:
    • Falomen.proto
    • Falomen_pb2.py
    • Falomen_pb2_grpc.py
  • JSON Files:
    • transit_chart_score.json : Transit Chart Scores File
    • Transit_Cats.json : Transit Chart Category Names Dictionery File
    • Natal_Cats.json : Transit Chart Category Names Dictionery File
    • multilingual_Cats.json : Transit Chart Multilingual Scoring Dictionery File
    • chart_config.json : Charts Config Parameters
  • Images:
    • Second_ar.png : Transit Radar Chart Background Image in Arabic Language
    • Second_en.png : Transit Radar Chart Background Image in English Language
    • Second_fa.png : Transit Radar Chart Background Image in Farsi Language
    • Second_tr.png : Transit Radar Chart Background Image in Turkish Language

4) Modules:

  • 4-1) Horoscope.py

    • Classes:

      horoscope
      A class to Calculate Transit Chart scores and planet aspects

      Attributes:
      • chart (function): kerykeion "MakeSvgInstance" functions output
      • cat_name (str): Main Category Name in each chart Type (ex. "Romance", "Financial", "Career", ...)
      • subcat_name(str): SubCategory Name in each Main Category
      • chart_type: Chart Type ("Natal", "Transit" or "Composite")
      • subcat_planets (list): Important Planets list in each SubCategory
      • subcat_houses (list): Important Houses list in each SubCategory
      • User_name_1 (str): Input User Name
      • background (int): Background image Number used for Radar Chart (1: for Transit Radar Chart Background , 2: for Natal Radar Chart Background)
      • label_height (int): Height of Labels in Radar Chart

      • Methods:

        • chart_score()
          Claculates Chart Score based on Planets Placement in each subCategory

          Attributes:

          • cat_name (str): Main Category Name in each chart Type (ex. "Romance", "Financial", "Career", ...)
          • subcat_name(str): SubCategory Name in each Main Category
          • chart (function): kerykeion "MakeSvgInstance" functions output
          • chart_type: Chart Type ("Natal", "Transit" or "Composite")
          • subcat_planets (list): Important Planets list in each SubCategory
          • subcat_houses (list): Important Houses list in each SubCategory

          • return (int): Chart Score based on Planets Placement in each subCategory

        • radar_plot_transit()
          Plots Radar Chart for input Chart Types

          Attributes:

          • User_name_1 (str): Input User Name from Profile
          • sub_category (list): SubCategory Name list in each Main Category
          • sub_category_score (list): Score list calculated for each SubCategory
          • background (int): Background image Number used for Radar Chart (1: for Transit Radar Chart Background , 2: for Natal Radar Chart Background)
          • label_height (int): Height of Labels in Radar Chart

          • return (url): URL of save Radar Chart

        • get_horoscope_transit()
          Main Function to Calculate Natal Chart Total Scores(placement_aspect) in each subCategory

          Attributes:

          • User_name_1 & 2 (str): Input Users Name (..._1 from User Profile)
          • Birthyear_1 & 2 (int): Input Users Birth Year (..._1 from User Profile)
          • BirthMonth_1 & 2 (int): Input Users Birth Month (..._1 from User Profile)
          • BirthDay_1 & 2 (int): Input Users Birth Day (..._1 from User Profile)
          • BirthHour_1 & 2 (int): Input Users Birth Houre (..._1 from User Profile)
          • BirthMin_1 & 2 (int): Input Users Birth Minute (..._1 from User Profile)
          • BirthCity_1 & 2 (int): Input Users City (..._1 from User Profile)
          • input_language (str): User prefered language ("fa": for Persian, "tr": for Turkish, "en": for english, "arb": for arabic,)

          • return (list): Returns Saved Radar Chart file URL and Brief Translated Report for Transit chart Analysis

  • 4-2) minio_client.py

    • Methods:

      • upload_file_to_minio()
        This method is used to upload files to minio Storage

        Attributes:
        • bucket_name (str): Bucket name on minio storage
        • object_name (str): Object name on minio storage
        • file_path (str): File Path on Local Storage
        • return (str): urn of uploaded file on minio storage

      • download_file_from_minio()
        This Methos is used to download files from minio Storage

        Attributes:
        • bucket_name (str): Bucket name on minio storage
        • object_name (str): Object name on minio storage
        • file_path (str): Path to save downloaded file on Local Storage
        • return (str): urn of downloaded file on minio storage