Composite MicroService

image info

The Composite Chart microservice within the Falomen app represents an advanced feature designed to analyze and interpret the combined astrological charts of two individuals to assess the nature and dynamics of their relationship. This service constructs a single composite chart from the natal charts of both individuals, representing the midpoint of their planetary positions. By leveraging sophisticated AI algorithms, it interprets this chart to provide insights into the relationship's strengths, weaknesses, challenges, and potential growth areas. This microservice draws on the principles of synastry and composite chart interpretations from astrology to offer users a unique perspective on how two individuals' energies merge and interact. It covers various aspects of the relationship, including emotional compatibility, communication styles, and potential conflicts or synergies. The analysis delves into how the combined energies can affect the relationship's evolution, offering advice for fostering harmony and understanding. By integrating traditional astrological techniques with modern AI technology, the Composite Chart microservice provides a detailed and nuanced view of relationships that is both insightful and accessible. Users seeking deeper understanding of their partnerships can benefit greatly from this feature, making the Falomen app a comprehensive tool for exploring interpersonal dynamics through the lens of astrology.


1) Requirements:

  • prometheus_client==0.18.0
  • grpcio-tools==1.59.0
  • kerykeion==3.4.2
  • matplotlib==3.7.1
  • numpy==1.23.5
  • pandas==2.0.1
  • scikit_learn==1.2.2
  • grpcio==1.62.0
  • openai==0.27.6
  • openpyxl==3.1.2
  • 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:
    • Natal_Brief_Traits.json : Brief Traints for Natal Chart
    • natal_chart_score.json : Natal Chart Scoring Dictionery File
    • Natal_Cats.json : Natal Chart Category Names Dictionery File
    • multilingual_Cats.json : Natal Chart Multilingual Scoring Dictionery File
    • chart_config.json : Charts Config Parameters
  • Images:
    • Second_ar.png : Composite Radar Chart Background Image in Arabic Language
    • Second_en.png : Composite Radar Chart Background Image in English Language
    • Second_fa.png : Composite Radar Chart Background Image in Farsi Language
    • Second_tr.png : Composite Radar Chart Background Image in Turkish Language

4) Modules:

  • 4-1) Horoscope.py

    • Classes:

      horoscope
      A class to Calculate composit 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_composite()
          Plots Radar Chart for input Chart Types

          Attributes:

          • User_name_1 (str): Input User Name from Profile
          • User_name_2 (str): Input Second User Name
          • sub_category (list): SubCategory Name list in each Main Category
          • sub_category_score_1 (list): Score list calculated for each SubCategory for User 1
          • sub_category_score_2 (list): Score list calculated for each SubCategory for User 2
          • 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_composite()
          Main Function to Calculate Natal Chart Total Scores(placement_aspect) in each subCategory

          Attributes:

          • User_name_1 (str): Input User Name
          • 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 Composite 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