API
Project

6. Project

To retrieve single project with all the details you have to execute following graphql query:

query Project($projectId: ID, $locale: I18NLocaleCode) {
  project(id: $projectId, locale: $locale) {
    data {
      attributes {
        flags
        title
 
        video {
          data {
            attributes {
              url
            }
          }
        }
        status
        shortDescription
        sale {
          annualValueAdded
          distributed
          maxInvestment
          minInvestment
          tokenPrice
          totalShares
        }
        property {
          agencyFee
          comission
          other
          price
          pricePerMeter
          rennovation
          reserve
          surface
          transferTax
        }
        monthlyRent {
          communityFee
          homeInsurance
          propertyManagement
          propertyTax
          totalRent
          utility
        }
        links {
          title
          url
        }
        gallery {
          title
          image {
            data {
              attributes {
                url
              }
            }
          }
        }
        cover {
          data {
            attributes {
              url
            }
          }
        }
        roadmap {
          description
          date
          title
          tooltip
        }
        sections {
          content
          title
        }
        documents {
          title
          document {
            data {
              attributes {
                url
              }
            }
          }
        }
      }
    }
  }
}

OR

To retrieve project with number of unique investors:

query Project($projectId: String!, $locale: String!) {
  projectById(projectId: $projectId, locale: $locale) {
    numberOfInvestors
    project {
      data {
        attributes {
          flags
          title
          video {
            data {
              attributes {
                url
              }
            }
          }
          status
          shortDescription
          sale {
            annualValueAdded
            distributed
            maxInvestment
            minInvestment
            tokenPrice
            totalShares
          }
          property {
            agencyFee
            comission
            other
            price
            pricePerMeter
            rennovation
            reserve
            surface
            transferTax
          }
          monthlyRent {
            communityFee
            homeInsurance
            propertyManagement
            propertyTax
            totalRent
            utility
          }
          links {
            title
            url
          }
          gallery {
            title
            image {
              data {
                attributes {
                  url
                }
              }
            }
          }
          cover {
            data {
              attributes {
                url
              }
            }
          }
          roadmap {
            description
            date
            title
            tooltip
          }
          sections {
            content
            title
          }
          documents {
            title
            document {
              data {
                attributes {
                  url
                }
              }
            }
          }
        }
      }
    }
  }
}

with following variables:

{
  "projectId": <PROJECT_ID>,
  "locale": <USER_LANGUAGE> // 'en' or 'pl' or others in the future
}

Authorization: Bearer <ACCESS_TOKEN>

Response for only project query:

{
  "data": {
    "project": {
      "data": {
        "attributes": {
          "flags": null,
          "title": "Majestic Manor Kraków",
          "video": {
            "data": null
          },
          "status": "DRAFT",
          "shortDescription": "This property is a charming, early 20th-century building that features classic Polish architecture with modern potential.",
          "sale": {
            "annualValueAdded": 3,
            "distributed": 5,
            "maxInvestment": 1000,
            "minInvestment": 100,
            "tokenPrice": 10,
            "totalShares": 115000
          },
          "property": {
            "agencyFee": 54000,
            "comission": 150000,
            "other": 38000,
            "price": 22500000,
            "pricePerMeter": 15000,
            "rennovation": 1200000,
            "reserve": 100000,
            "surface": 1500,
            "transferTax": 100000
          },
          "monthlyRent": {
            "communityFee": 2300,
            "homeInsurance": 1500,
            "propertyManagement": 2500,
            "propertyTax": 7000,
            "totalRent": 30000,
            "utility": 3000
          },
          "links": [
            {
              "title": "FACEBOOK",
              "url": "https://fb.com"
            },
            {
              "title": "INSTAGRAM",
              "url": "https://i.me"
            }
          ],
          "gallery": [
            {
              "title": "view",
              "image": {
                "data": {
                  "attributes": {
                    "url": "https://strentinvestocmsdev.blob.core.windows.net/cms/assets/images_ff08223596.jpeg"
                  }
                }
              }
            },
            {
              "title": "view2",
              "image": {
                "data": {
                  "attributes": {
                    "url": "https://strentinvestocmsdev.blob.core.windows.net/cms/assets/447681361_419b6cfeb6.jpg"
                  }
                }
              }
            },
            {
              "title": "view3",
              "image": {
                "data": {
                  "attributes": {
                    "url": "https://strentinvestocmsdev.blob.core.windows.net/cms/assets/4_fb3e00a266.jpeg"
                  }
                }
              }
            }
          ],
          "cover": {
            "data": {
              "attributes": {
                "url": "https://strentinvestocmsdev.blob.core.windows.net/cms/assets/images_ff08223596.jpeg"
              }
            }
          },
          "roadmap": [
            {
              "description": "Formal announcement and marketing of the investment opportunity. Online presentations and investor meetings to generate interest and gather funds.",
              "date": "2024-05-01",
              "title": "Q1: Launch of Crowdfunding Campaign",
              "tooltip": null
            },
            {
              "description": "End of crowdfunding window and finalization of investment sums.\nAcquisition of the property, legal due diligence, and property transfer.",
              "date": "2024-06-25",
              "title": "Q2: Closure of Crowdfunding and Property Acquisition",
              "tooltip": null
            }
          ],
          "sections": [
            {
              "content": "{\"time\":1713853226623,\"blocks\":[{\"id\":\"Jka9g-X_HL\",\"type\":\"header\",\"data\":{\"text\":\"Intro\",\"level\":2}},{\"id\":\"gjohnaNrWz\",\"type\":\"paragraph\",\"data\":{\"text\":\"This property is a charming, early 20th-century building that features classic Polish architecture with modern potential. The building consists of 20 units spread over five floors, with potential for commercial space on the ground floor. Each apartment offers high ceilings and large windows, ideal for modern city living. The location is perfect for professionals and tourists alike, making it a highly desirable rental property.\"}},{\"id\":\"i_LbKqqdBT\",\"type\":\"paragraph\",\"data\":{\"text\":\"<b>Property Type</b>: Residential Apartment Building<br><br><b>Building Features:</b>\"}},{\"id\":\"T6NNnghvvG\",\"type\":\"list\",\"data\":{\"style\":\"unordered\",\"items\":[\"Architectural Style: Traditional Polish façade with ornate stonework and modern interior upgrades planned.\",\"Units: 20 apartments varying in size from 50 sqm to 100 sqm. Types include studio, one-bedroom, and two-bedroom configurations.\",\"Amenities: A planned rooftop terrace for residents, offering panoramic views of the city skyline, and a private gym.\",\"Safety and Security: Equipped with a state-of-the-art security system including surveillance cameras and controlled building access.\"]}},{\"id\":\"6CDDgI9q_J\",\"type\":\"paragraph\",\"data\":{\"text\":\"Condition: The building requires significant renovation to transform its interiors to luxury standards while maintaining the charming historical exterior. Structural assessments have confirmed the building's integrity, allowing for a seamless modernization process.\"}},{\"id\":\"wzOxB-9OLR\",\"type\":\"header\",\"data\":{\"text\":\"Investment and Financial Details\",\"level\":3}},{\"id\":\"Wlc7mBuSnT\",\"type\":\"paragraph\",\"data\":{\"text\":\"Total Area: 1,500 sqm, optimally used to enhance living spaces and communal areas.Crowdfunding Goal: PLN 9,000,000, which encompasses purchase and full renovation costs.Fund Usage Breakdown:\"}},{\"id\":\"wHqOuE5mwc\",\"type\":\"list\",\"data\":{\"style\":\"unordered\",\"items\":[\"60% renovation and restoration\",\"20% property acquisition\",\"10% fees and legal\",\"10% contingency and miscellaneous\"]}},{\"id\":\"aTkAZrAwsl\",\"type\":\"header\",\"data\":{\"text\":\"Investor Returns:\",\"level\":2}},{\"id\":\"IElPlxcaoq\",\"type\":\"list\",\"data\":{\"style\":\"unordered\",\"items\":[\"Distribution Percentage: 70% of net rental income is distributed to investors quarterly.\",\"Projected Rental Income: After renovations, the projected monthly rental income for the entire property is approximately PLN 150,000, based on current market rates and the premium location.\",\"ROI Details: Based on the renovation improvements and market trends, investors are expected to receive an annual return of approximately 5%, with potential for property value appreciation.\"]}},{\"id\":\"3pgMpj2CXy\",\"type\":\"paragraph\",\"data\":{\"text\":\"Utility and Operational Costs: Estimated monthly utilities (water, heating, electricity) and taxes amount to PLN 20,000. This includes all maintenance of communal areas and amenities, ensuring a turn-key investment for participants.\"}},{\"id\":\"Q15izfmqWE\",\"type\":\"warning\",\"data\":{\"title\":\"Investment is at risk\",\"message\":\"Investing in the property is strictly up to you.\"}}],\"version\":\"2.23.2\"}",
              "title": "about"
            },
            {
              "content": "{\"time\":1713853451109,\"blocks\":[{\"id\":\"yqRH4cS0kJ\",\"type\":\"header\",\"data\":{\"text\":\"1. Project Lead: Anna Kowalska\",\"level\":4}},{\"id\":\"F7tjNIFMt3\",\"type\":\"list\",\"data\":{\"style\":\"unordered\",\"items\":[\"Background: With over 15 years of experience in real estate development, Anna has successfully led numerous residential and commercial projects across Poland. Her expertise lies in project management and strategic planning.\",\"Role: Anna oversees the entire project, ensuring all phases are executed on time and within budget, and serves as the main point of contact for investors.\"]}},{\"id\":\"0_dVKJBOQG\",\"type\":\"header\",\"data\":{\"text\":\"2. Chief Architect: Marek Nowak\",\"level\":4}},{\"id\":\"VoG3Lg6dIy\",\"type\":\"list\",\"data\":{\"style\":\"unordered\",\"items\":[\"Background: Marek is a renowned architect in Poland, known for blending modern design with historical elements. His portfolio includes award-winning restorations in historic districts throughout Europe.\",\"Role: Marek is responsible for the overall architectural design and renovation plans, focusing on preserving the building's historic charm while incorporating modern living standards.\"]}},{\"id\":\"vjM3RD_els\",\"type\":\"header\",\"data\":{\"text\":\"3. Financial Analyst: Ewa Baran\",\"level\":4}},{\"id\":\"IwSo6Pqeds\",\"type\":\"list\",\"data\":{\"style\":\"unordered\",\"items\":[\"Background: Ewa brings a decade of experience in financial analysis and investment strategy, particularly in real estate and infrastructure projects.\",\"Role: She manages the financial structuring of the project, including the crowdfunding campaign, investment allocations, and returns distributions.\"]}},{\"id\":\"mwrCaY0Nif\",\"type\":\"header\",\"data\":{\"text\":\"4. Construction Manager: Jakub Wojcik\",\"level\":4}},{\"id\":\"rgYELuGPWW\",\"type\":\"list\",\"data\":{\"style\":\"unordered\",\"items\":[\"Background: With extensive experience in managing large-scale construction sites, Jakub ensures that all construction activities are completed safely, on time, and in compliance with regulatory standards.\",\"Role: He coordinates with contractors and suppliers, oversees the daily operations on site, and ensures the quality and progress of the construction work.\"]}},{\"id\":\"3Pn6BvnqSe\",\"type\":\"header\",\"data\":{\"text\":\"5. Marketing Director: Agnieszka Lewandowska\",\"level\":4}},{\"id\":\"T50MsAmA2Y\",\"type\":\"list\",\"data\":{\"style\":\"unordered\",\"items\":[\"Background: Specializing in real estate marketing, Agnieszka has a strong track record of successful property launches and tenant acquisition strategies.\",\"Role: She leads the marketing and leasing efforts, developing strategies to attract and retain tenants, and managing the property’s public relations and advertising.\"]}},{\"id\":\"zDpSq1wWte\",\"type\":\"header\",\"data\":{\"text\":\"6. Legal Advisor: Tomasz Zalewski\",\"level\":4}},{\"id\":\"gZcbdaXs5M\",\"type\":\"list\",\"data\":{\"style\":\"unordered\",\"items\":[\"Background: Tomasz is an expert in real estate law, with significant experience advising on property acquisitions, leases, and compliance issues.\",\"Role: He provides legal guidance throughout the acquisition, renovation, and operational phases, ensuring all activities are legally compliant.\"]}},{\"id\":\"HnEs4twjZg\",\"type\":\"header\",\"data\":{\"text\":\"7. Property Manager: Natalia Szymańska\",\"level\":4}},{\"id\":\"ksMRiNEAzd\",\"type\":\"list\",\"data\":{\"style\":\"unordered\",\"items\":[\"Background: Natalia has over a decade of experience in managing multifamily properties, focusing on tenant satisfaction and operational efficiency.\",\"Role: Post-renovation, Natalia will manage the day-to-day operations of Majestic Manor, from tenant relations to maintenance and service provision.\"]}}],\"version\":\"2.23.2\"}",
              "title": "team"
            }
          ],
          "documents": [
            {
              "title": "Contract Template",
              "document": {
                "data": {
                  "attributes": {
                    "url": "https://strentinvestocmsdev.blob.core.windows.net/cms/assets/contract1_f46866c876.pdf"
                  }
                }
              }
            },
            {
              "title": "Regulamin",
              "document": {
                "data": {
                  "attributes": {
                    "url": "https://strentinvestocmsdev.blob.core.windows.net/cms/assets/regulamin_844e2c64e8.pdf"
                  }
                }
              }
            }
          ]
        }
      }
    }
  }
}

Response for project with number of investors:

{
  "data": {
    "projectById": {
      "numberOfInvestors": 2,
      "project": {
        "data": {
          // Same as above
        }
      }
    }
  }
}

Response if Project with given id and locale does not exist:

{
  "errors": [
    {
      "message": "PROJECT_NOT_FOUND",
      "extensions": {
        "error": {
          "name": "NotFoundError",
          "message": "PROJECT_NOT_FOUND",
          "details": {}
        },
        "code": "STRAPI_NOT_FOUND_ERROR"
      }
    }
  ],
  "data": null
}

Implementation:

Sections

In order to render content within section, you should utilize editor.js (opens in a new tab) in Read-Only mode.

Monthly Results

  • In order to display Monthly Results section, simply display values from field monthlyRent:
"monthlyRent": {
    "communityFee": 2300, // Monthly community fees
    "homeInsurance": 1500, // Monthly home insurance
    "propertyManagement": 2500, // property management
    "propertyTax": 7000, // Monthly property tax
    "totalRent": 30000, // Monthly Rent
    "utility": 3000 // Electricity, water, wifi
}

calculate total monthly charges as:

const totalMonthlyCharges = communityFee + homeInsurance + propertyManagement + propertyTax + utility;

And net monthly rent as:

const netMonthlyRent = totalRent - totalMonthlyCharges;

Make sure to hide values with null or 0 values. If all values are 0 or null, then hide section completely.

Yearly Results

To display yearly results, take monthly results values and multiple by 12.

Profitability

Values shown in profitability table are taken from the field sale:

"sale": {
    "annualValueAdded": 3,
    "distributed": 5,
    "maxInvestment": 1000,
    "minInvestment": 100,
    "tokenPrice": 10,
    "totalShares": 115000
}
  • Total Profitability - distributed + annualValueAdded
  • Rent Distributed - distributed

If distributed is null or 0 then we hide section completely.

Investment Analysis

To show Investment Analysis table, you should operate with property field:

"property": {
    "agencyFee": 54000, // Agency Fees
    "comission": 150000, // RI App Comission
    "other": 38000, // Other (notary...)
    "price": 22500000, // Property Price
    "pricePerMeter": 15000, // Price m2
    "rennovation": 1200000, // Furniture and renovations
    "reserve": 100000, // Maintenance reserve
    "surface": 1500, // useful surface
    "transferTax": 100000 // Transfer tax
},

Calculate Total Investment as sum of all those fields. If any of fields is 0 or null, then ignore and do not show them on UI.

Simulator

The slider is affecting Amount Invested value. The range is taken from sale property:

"sale": {
    ...
    "maxInvestment": 1000,
    "minInvestment": 100,
    ...
}

so let's say the investingAmount is in range [100, 1000]; Then calculate following properties of the calculator as following:

const rentAnnual = (investingAmount * distributed) / 100;
const rentMonth = rentAnnual / 12;
const addedAnnualValue = (investingAmount * (distributed + annualValueAdded)) / 100 - rentAnnual;
const totalAnnualROI = rentAnnual + addedAnnualValue;