Month: March 2025

  • Pakistan: Geopolitics, Conflict, and the American Establishment by Orya Maqbool Jan

    Pakistan: Geopolitics, Conflict, and the American Establishment by Orya Maqbool Jan

    This source explores Pakistan’s complex geopolitical position, particularly its relationship with the United States. The speaker suggests America has used Pakistan for its own gains, leading to internal conflict and instability. They express concern that the U.S. establishment, along with figures like Donald Trump, could instigate further conflict between Pakistan and Afghanistan. Additionally, the speaker highlights the historical context of wars fought on Pakistani soil and the sacrifices made. They fear a future where Pakistan becomes a battleground again, urging a more peaceful path.

    Pakistan: Geopolitics, Conflict, and the American Establishment – Study Guide

    I. Quiz

    Answer each question in 2-3 sentences.

    1. According to the source, what role did Pakistan play in Afghanistan during the Soviet-Afghan War?
    2. What is the “Jamia Hafsa incident,” and how is it relevant to the discussion of Pakistan-U.S. relations?
    3. What are some of the motivations that drove America’s engagement in the region, according to the speaker?
    4. What does the speaker mean when they refer to Pakistan as being in a “Prison of Geography”?
    5. How does the speaker contrast the situations of Ukraine and Pakistan with regard to U.S. support?
    6. What significance does the speaker attribute to Donald Trump’s foreign policy decisions in the region?
    7. How does the speaker describe the relationship between Pakistan’s ISI and the American CIA?
    8. What is the speaker’s view of the China-Pakistan Economic Corridor (CPEC)?
    9. According to the speaker, how have Balochistan’s borders been used during times of war?
    10. In the speech, the speaker suggests that Pakistan is a pawn in a larger game. Who are the players, according to the speaker?

    II. Quiz – Answer Key

    1. The source indicates that Pakistan, at the behest of America, prolonged the war in Afghanistan and supported the Afghan Mujahideen. It suggests that Pakistan’s actions were motivated by financial gain, but this ultimately ruined the country.
    2. The Jamia Hafsa incident is presented as a significant event where Pakistan acted at the behest of America. The speaker argues it contributed to the instability and conflict within Pakistan and ultimately hurt Pakistan.
    3. The speaker suggests that America was motivated by the desire to take back its technology, but the speaker also suggested they were interested in a much more complicated set of circumstances. The speaker seemed to believe that, at times, the American’s actions were short-sighted.
    4. Being in a “Prison of Geography” means that Pakistan’s location makes it a perpetual battleground, subject to invasion and exploitation by foreign powers. It is trapped by its geographical realities, where external forces exploit it and the people suffer.
    5. The speaker highlights that Ukraine was humiliated by the U.S., but received far more support. The situation in Ukraine is contrasted with the one in Pakistan, which was not given the aid it needed.
    6. The speaker seems to believe that Trump is a property dealer, but that he, and the American establishment, may trigger a war between Pakistan and Afghanistan.
    7. The speaker suggests that the ISI and CIA historically worked together, coordinated, and were on the same line regarding actions in the region. This cooperation is portrayed as being directed by the American establishment.
    8. The speaker believes that CPEC is no longer the economic destiny of the world because the United States controls the sea. According to the speaker, China is now seeking a better route.
    9. According to the speaker, Balochistan served as a crucial support region and base of operations for American forces during times of war. Despite harboring Taliban elements, Balochistan’s borders facilitated the movement of American personnel and resources.
    10. The speaker suggests that the players are the “American establishment,” Donald Trump, and the “military industrial complex and deep state.” Pakistan is portrayed as the “frogs” crying under their feet.

    III. Essay Questions

    1. Analyze the speaker’s portrayal of Pakistan’s relationship with the United States. How does the speaker characterize the nature of this relationship, and what are the key turning points or events that have shaped it?
    2. Discuss the concept of “Prison of Geography” as it applies to Pakistan, according to the speaker. In what ways does Pakistan’s geographical location influence its geopolitical realities and internal conflicts?
    3. Evaluate the speaker’s critique of American foreign policy in the region. What are the speaker’s main criticisms of American actions, and how do these actions impact Pakistan?
    4. Examine the speaker’s concerns about the potential for a new war between Pakistan and Afghanistan. What factors contribute to this concern, and what role does the speaker attribute to external actors like the American establishment or Donald Trump?
    5. Assess the speaker’s view of China’s changing strategy in the region, particularly with regard to the China-Pakistan Economic Corridor (CPEC). What implications does this shift have for Pakistan’s future?

    IV. Glossary of Key Terms

    • American Establishment: Refers to the network of influential individuals and institutions within the U.S. government, military, and intelligence agencies that shape foreign policy.
    • Deep State: A clandestine network of unelected government officials who are believed to influence state policy, although it is not always clear who is included within the definition.
    • Prison of Geography: A concept describing how a country’s geographical location can determine its destiny, often trapping it in cycles of conflict or exploitation.
    • Military-Industrial Complex: The close relationship between the military, government, and defense contractors that promotes increased military spending and intervention.
    • Taliban: A fundamentalist Islamic movement that governed Afghanistan from 1996 to 2001 and has since waged an insurgency against the Afghan government and international forces.
    • Afghan Mujahideen: Guerrilla fighters who fought against the Soviet Union in Afghanistan during the Soviet-Afghan War (1979-1989), with support from the United States and other countries.
    • China-Pakistan Economic Corridor (CPEC): A major infrastructure project aimed at connecting China and Pakistan through a network of roads, railways, and pipelines.
    • ISI (Inter-Services Intelligence): Pakistan’s primary intelligence agency, responsible for gathering information and conducting covert operations.
    • CIA (Central Intelligence Agency): The U.S. government agency responsible for foreign intelligence gathering and covert action.
    • Jamia Hafsa Incident: A 2007 siege of a radical Islamic school in Islamabad, Pakistan, that resulted in a military crackdown and significant casualties.
    • CPEC: The China-Pakistan Economic Corridor is a large infrastructural endeavor in Pakistan

    Pakistan: Geopolitics, Conflict, and the American Establishment

    Okay, here’s a briefing document summarizing the main themes and ideas from the provided excerpts of “Pakistan: Geopolitics, Conflict, and the American Establishment.” This document includes quotes from the original source to illustrate key points.

    Briefing Document: Analysis of “Pakistan: Geopolitics, Conflict, and the American Establishment” (Excerpts)

    Overall Theme: The speaker in these excerpts expresses a deep concern about Pakistan’s geopolitical situation, particularly its historical and ongoing relationship with the United States, and the potential for renewed conflict and instability within the region. The speaker argues that Pakistan has been manipulated and exploited by foreign powers, particularly the US, and that this has led to internal strife, violence, and ultimately a compromised future for the nation. There’s a strong sense of disillusionment with the current trajectory, coupled with a fear of being caught in the crossfire of larger geopolitical power struggles.

    Key Ideas and Arguments:

    1. Pakistan as a Pawn in Geopolitical Games: The speaker repeatedly emphasizes the idea that Pakistan is treated as a battleground by larger powers, particularly the US and, potentially, a resurgent rivalry involving the US, Russia, and China. He paints a picture of Pakistan being used for proxy wars and strategic advantage, with devastating consequences for the Pakistani people.
    • “This issue of Taliban, the Sawat issue, we broke it at the behest of America.” This quote suggests a direct intervention or manipulation by the US in Pakistan’s internal affairs.
    • “Naf is Naf, our case is that we are on that land where the big Torians of the world think that this land will always be a battlefield…” This statement encapsulates the sense of fatalism and inevitability regarding Pakistan’s role as a conflict zone.
    • The speaker invokes Tom Marshall’s books, “Power of Geography” and “Prisoner of Geography,” to illustrate the concept of Pakistan being geographically predisposed to invasion and exploitation. “It is a book in which the prisoners are always kept in Geography. The invaders always come and loot them and move ahead after looting.”
    1. The US-Pakistan Relationship: A History of Manipulation and Broken Promises: The speaker highlights a history of US involvement in Pakistan, dating back to the Soviet-Afghan War, characterized by the use of Pakistan as a staging ground for US objectives, followed by neglect and abandonment.
    • “…we wanted to prolong that war further on the orders of America and did not want peace to prevail in Afghanistan…” This accuses Pakistan of deliberately prolonging the Soviet-Afghan War at the behest of the US.
    • “American planes have flown from here 57,000 times and they have flown in favour of Afghan brothers.” This acknowledges Pakistan’s support in US operations but implies it was at a high cost.
    • “We were not even allowed to see a single shot of the Stinger missile, rather when the war was over, the Stinger missiles were returned one by one and counted.” This illustrates a sense of being controlled and not trusted by the US, despite their alliance.
    • “He even went on to say that we broke the Taliban’s Mound of Sawat at the behest of America.” The speaker describes the aftermath of the Jamia Hafsa incident as a point where Pakistan’s actions led to extreme oppression at the request of America.
    1. Internal Consequences of External Interference: The speaker laments the internal consequences of these foreign interventions, including the rise of extremism, the loss of life, and the destabilization of Pakistani society.
    • “Those people who have reached the age of 70 like me have seen the fire boiling on the land of Pakistan, have seen bodies flying off the body parts and have seen people screaming and crying out in extreme pain…” This evokes the visceral impact of conflict and violence on the Pakistani population.
    • “Explosions were going on and people were sitting in the trench. He said, ‘It is not in your hands to launch the squad. Why don’t you stop them?’ How does he know that it is probably not even in the hands of those elders who, after entering this war, forgot that they were only making money. But the entire condition of this country was ruined.” This expresses a sense of powerlessness and a belief that the pursuit of financial gain has led to the ruin of Pakistan.
    • “…after fighting the war, the sacrifice of 75,000 people was done.” This points to the heavy human cost of the “War on Terror” in Pakistan.
    1. The Threat of a New Conflict: The speaker fears that the current geopolitical landscape, with Donald Trump and the “American establishment” at odds, could lead to a new conflict between Pakistan and Afghanistan.
    • “…they can start a new war between Pakistan and Afghanistan…we can create another situation after Jamia Afsa in this country…” This expresses a specific fear of renewed conflict orchestrated by external forces.
    • “…we will gift such a battlefield to America in which Trump will be forced to agree to the words of the Military Industrial Complex and the Deep State, then it is possible that Trump will be forced, but my land will burn, fire will rain here, people will be killed here…” This highlights the speaker’s fear of being used as a pawn in a power struggle between Trump and the military-industrial complex.
    1. China’s Evolving Strategy: The speaker suggests China is reassessing its economic strategy in the region, possibly reducing its reliance on CPEC (China-Pakistan Economic Corridor) due to perceived American control over sea routes.
    • “China no longer wants to do trade through the sea routes through Gwadar because it has realized that America has control over the sea and no matter how much CPEC it builds, it cannot move forward in any way.” This suggests a shift in China’s economic priorities and potentially reduced investment in Pakistan.

    Conclusion:

    The excerpts paint a grim picture of Pakistan’s geopolitical predicament. The speaker expresses a strong sense of being trapped in a cycle of conflict and manipulation, fueled by external powers. The future is viewed with anxiety, with the potential for renewed conflict and further destabilization. There is a plea for a more independent and peaceful path for Pakistan, free from the dictates of foreign powers.

    Pakistan: Geopolitics, Conflict, and the American Establishment

    Pakistan: Geopolitics, Conflict, and the American Establishment – FAQ

    1. What is the main argument presented regarding Pakistan’s relationship with the United States?

    The main argument is that Pakistan has historically acted at the behest of the American establishment, often to its own detriment. This includes prolonging conflicts in Afghanistan, suppressing domestic issues like the Taliban in Swat, and serving as a staging ground for US operations. The speaker suggests that while this collaboration might have provided financial benefits, it has destabilized the country and created a cycle of violence. The implication is that Pakistan needs to prioritize its own interests over those dictated by foreign powers.

    2. How does the speaker describe the current geopolitical situation involving the US, Afghanistan, and Pakistan?

    The speaker describes a precarious situation where a new conflict between Pakistan and Afghanistan could be instigated by the American establishment, possibly even by Donald Trump, for their own strategic purposes. This is seen as a continuation of a historical pattern where Pakistan is used as a pawn in larger geopolitical games, resulting in suffering and instability for the region.

    3. What is the significance of the “Prisoner of Geography” concept in the context of Pakistan?

    The “Prisoner of Geography” concept, drawn from Tom Marshall’s book, refers to the idea that a country’s geographical location can trap it in cycles of conflict and exploitation. Pakistan, like Ukraine, is seen as geographically vulnerable due to its location as a land bridge and its lack of natural defenses, making it a target for invasions and a battlefield for competing powers.

    4. What historical examples are given to illustrate Pakistan’s role in regional conflicts?

    The speaker cites several historical examples:

    • Pakistan’s involvement in the Afghan-Soviet War, where it prolonged the conflict on the orders of the US.
    • The suppression of the Taliban in Swat at the behest of America.
    • Pakistan’s support for the Afghan Mujahideen.
    • The use of Pakistani airfields for American operations in Afghanistan after 9/11.

    5. What are the speaker’s concerns regarding Donald Trump and the American “Deep State”?

    The speaker expresses concern that both Donald Trump and the American “deep state” (or establishment) could trigger a new conflict in the region for their own purposes. Trump is portrayed as a pragmatic actor focused on deals and geopolitical leverage, while the “deep state” is seen as having its own strategic agenda. Pakistan is portrayed as being caught between these competing forces.

    6. How does the speaker characterize the sacrifices made by Pakistan in the “War on Terror”?

    The speaker acknowledges the sacrifices made by Pakistan, including the loss of 75,000 lives and the support provided to American operations in Afghanistan. However, they also suggest that this involvement was ultimately detrimental to Pakistan, leading to internal instability and the destruction of its social fabric.

    7. What is the speaker’s perspective on the China-Pakistan Economic Corridor (CPEC)?

    The speaker suggests that the CPEC may not be as strategically significant as it once seemed because China is realizing that the United States has control over the sea routes it would need to traverse. China may now look to alternative trade routes through Turkmenistan, Iran, and Azerbaijan instead. This implies a shift in geopolitical dynamics that could impact Pakistan’s strategic importance.

    8. What is the speaker’s plea at the end of the excerpt?

    The speaker makes a heartfelt plea for mercy on Pakistan. He urges those in power to prioritize the country’s well-being and avoid being used as a battlefield for foreign powers. He expresses fear that continuing down the current path will lead to further destruction and suffering for the Pakistani people.

    American Establishment Geopolitics: Pakistan and Afghanistan

    The American establishment’s role in geopolitics, particularly in relation to Pakistan and Afghanistan, is a complex issue, according to the source.

    Key points regarding the American establishment:

    • The source suggests that the American establishment, along with Donald Trump and the “American deep state,” could potentially instigate a new war between Pakistan and Afghanistan.
    • The American establishment seemingly dictates actions, and in the past, the U.S. White House would instruct Pakistan on what to do. Coordination between the CIA and ISI (Pakistan’s intelligence agency) was also a part of this dynamic.
    • The source implies that past U.S. administrations (George W. Bush, Ronald Reagan, Obama, and Bill Clinton) followed the directives of the American establishment.
    • There is a concern that if Pakistan continues on its current path, it might offer the American military-industrial complex and the “Deep State” a battlefield, potentially forcing Trump to comply with their agenda.
    • The American establishment may be influencing Saudi Arabia and the UAE, possibly in coordination with Trump’s instructions.
    • There is a suggestion that the American establishment wants economic and financial relations with China through Russia.
    • The source mentions a fear that the American establishment might pressure Donald Trump to stay in Pakistan and continue fighting, rather than withdrawing completely from Afghanistan, Iran, China, and India.
    • During the “war of terror,” Balochistan supported the American bases, and movements were unchecked.
    • According to the source, the U.S. military flew from Pakistani airports 57,000 times in support of Afghan “brothers”.
    • The U.S. sought the return of its technology, such as Stinger missiles, after the war in Afghanistan.
    • The U.S. is perceived to have humiliated Ukraine, despite providing aid.
    • The U.S. is seen as controlling the sea routes, which affects China’s trade through Gwadar.

    Pakistan’s Geopolitics: Relationships, Conflicts, and China’s Strategy

    Pakistan’s geopolitical situation involves complex relationships with America, Afghanistan, and China, as well as internal conflicts and historical context.

    Key aspects of Pakistan’s geopolitics:

    • Relationship with America: The source suggests that Pakistan has been significantly influenced by the American establishment, sometimes against its own interests. The U.S. has used Pakistani airports extensively. There are fears that the American establishment, possibly alongside Donald Trump, might want to use Pakistan as a battleground, potentially leading to further instability.
    • Conflict and Instability: Pakistan has experienced significant internal conflict, including the “Taliban issue” and the “Sawat issue”. The text mentions the potential for a new war between Pakistan and Afghanistan being instigated. Balochistan, a province of Pakistan, has been particularly affected by regional conflicts.
    • China’s evolving strategy: Due to perceived American control over sea routes, China is reconsidering its trade routes through Pakistan’s Gwadar port. Instead, China may prefer a route through Turkmenistan, Iran, and Azerbaijan to reach Europe. The China-Pakistan Economic Corridor (CPEC) may no longer be China’s primary destination.
    • Historical Context: The excerpt references historical events such as the Soviet-Afghan War and the subsequent rise of the Mujahideen. Pakistan’s involvement in these events, sometimes at the behest of America, has had lasting consequences.
    • Internal strife and violence: The text alludes to a history of violence and suffering within Pakistan, with references to bomb blasts and loss of life. There is concern that further conflict could lead to more destruction and casualties.
    • Prisoner of Geography: The source refers to the book “Prisoner of Geography,” suggesting that Pakistan’s geographical location makes it vulnerable to being a battlefield for larger powers.
    • Past support for American operations: During the “war on terror,” Pakistan, particularly Balochistan, provided support for American operations, including the use of bases.

    Afghanistan Conflict: External Influence and Internal Strife

    The source provides insight into the conflict in Afghanistan, particularly its connection to Pakistan and the involvement of external actors like the United States and Russia.

    Key points regarding the conflict in Afghanistan:

    • External Influence: The source indicates that the conflict in Afghanistan has been influenced by external powers, particularly the United States and Russia. The Soviet-Afghan War is mentioned, with the detail that the U.S. prolonged the war.
    • Pakistani involvement: Pakistan has been significantly involved in the Afghan conflict, sometimes at the behest of America. According to the source, American planes flew from Pakistan 57,000 times in support of Afghan “brothers”. There are concerns that Pakistan could be used as a battleground in a new war involving Afghanistan.
    • Internal Conflict: Afghanistan has been a site of ongoing conflict, with groups such as the Taliban. The source alludes to the presence of different groups within Afghanistan.
    • Consequences of Conflict: The conflict has led to significant suffering and destruction. The text references bomb blasts and loss of life.
    • Mujahideen: The role of Afghan Mujahideen is mentioned in the context of the Soviet-Afghan War.
    • Geopolitical significance: Afghanistan’s location makes it a strategically important region, with the source referencing the book “Prisoner of Geography” to highlight how the country is vulnerable to being a battlefield for larger powers.
    • Potential for renewed conflict: There is concern that a new war could be instigated between Pakistan and Afghanistan.
    • American strategic interests: The U.S. sought the return of its technology, such as Stinger missiles, after the war in Afghanistan.
    • Support for Afghan “brothers”: According to the source, American planes flew from Pakistani airports 57,000 times in support of Afghan “brothers”.
    • Past support for American operations: During the “war on terror,” Pakistan provided support for American operations that supported efforts in Afghanistan.

    Donald Trump: Global Impact and Geopolitical Strategy

    Based on the source, here’s a discussion of Donald Trump:

    • Potential instigator: Donald Trump, along with the “American deep state” and the “American establishment,” is viewed as a potential instigator of a new war between Pakistan and Afghanistan.
    • Humiliation of Ukraine: Donald Trump called the head of Ukraine and humiliated and disgraced him.
    • Relationship with the American establishment: At this time Donald Trump and the American deep state and the American establishment are standing like this and in the middle of the fight between the elephants, the frogs cry at their feet.
    • Trump’s plans: Donald Trump has an immortal plan about Israel, that strange kind of property dealer and as he thinks that in Dubai, he has built Trump Tower and the area between Block One and Block Two.
    • Impact on Pakistan: There is a concern that if Pakistan continues on its current path, it might offer the American military-industrial complex and the “Deep State” a battlefield, potentially forcing Trump to comply with their agenda.
    • Influence on other nations: The American establishment may be influencing Saudi Arabia and the UAE, possibly in coordination with Trump’s instructions.
    • Economic strategy: Trump has put India on the line of what is called its status, don’t try to buy oil, I will give you oil, now don’t try to move like this.
    • Possible pressure to remain in the region: There is a suggestion that the American establishment might pressure Donald Trump to stay in Pakistan and continue fighting, rather than withdrawing completely from Afghanistan, Iran, China, and India.
    • Trump’s immortal plan: You can think that the military-industrial complex is our fun and quest for it, but Inshallah, I will make a video in the future and tell you that this is the immortal plan of Donald Trump about Israel, that strange kind of property dealer and as he thinks that in Dubai, he has built Trump Tower and the area between Block One and Block Two.

    Pakistan and Afghanistan: Regional Instability

    Regional instability is a recurring theme throughout the source, particularly concerning Pakistan, Afghanistan, and the broader geopolitical landscape.

    Key points regarding regional instability:

    • Potential for conflict: The source expresses concern about the possibility of a new war erupting between Pakistan and Afghanistan, potentially instigated by the American establishment and Donald Trump.
    • Pakistan as a battleground: There are fears that Pakistan could become a battleground for larger powers, leading to further internal strife and violence.
    • Balochistan’s vulnerability: The province of Balochistan in Pakistan has historically been affected by regional conflicts and served as a base for American operations.
    • Impact of external actors: The involvement of external actors like the United States and Russia has contributed to regional instability, with the Soviet-Afghan War and the “war on terror” being cited as examples.
    • China’s changing trade routes: China’s decision to reconsider its trade routes through Pakistan’s Gwadar port, due to perceived American control over sea routes, reflects the shifting dynamics and potential for instability in the region.
    • Historical context of violence: The source alludes to a history of violence and suffering within Pakistan and Afghanistan, with references to bomb blasts, loss of life, and the displacement of people.
    • Geopolitical factors: The source references the book “Prisoner of Geography,” suggesting that the geographical location of countries like Pakistan and Afghanistan makes them vulnerable to being battlefields for larger powers.
    • Internal conflicts: Pakistan has experienced significant internal conflict, including the “Taliban issue” and the “Sawat issue”.
    • Past support for American operations: During the “war on terror,” Pakistan, particularly Balochistan, provided support for American operations, including the use of bases.
    • The Jamia Hafsa incident: There is a concern that a situation similar to the Jamia Hafsa incident could reoccur, potentially leading to further instability.
    • Risk of further destruction and casualties: There is concern that further conflict could lead to more destruction and casualties.
    Fight Between American Establishment & Donald Trump | Orya Maqbool Jan

    The Original Text

    امریکہ اپنی فتح کے جھنڈے گاڑ دیتا ہے لیکن۔۔۔ یہاں کی زمین گرم ہے، یہاں کے لوگ یہاں سے 57 ہزار بار امریکی طیارے اڑ چکے ہیں۔ اس نے اپنے افغان بھائیوں کے پروں کو لے لیا۔ اب یہ آپ کے ہاتھ میں ہے۔ نہیں تم رک کیوں نہیں جاتے تم بھول گئے ہو سوچا کہ ہم صرف پیسہ کما رہے ہیں لیکن اس میں یہ پورے ملک کی مکمل حالت ہے۔ یہ طالبان کا اسے برباد کرنے کا نکتہ تھا۔ ہم نے یہ کام امریکہ کی ہدایت پر کیا۔ ہم ٹوٹ گئے تھے ہم کہانیاں لکھتے ہیں لیکن اب صورتحال اور ڈونلڈ ٹرمپ اور امریکی گہری ریاست اور امریکی اسٹیبلشمنٹ یہ ہے۔ اس وقت، یہ وقت تکمیل کا ہے۔ پاکستان اور افغانستان کے درمیان نئی جنگ چھیڑ سکتا ہے۔ [موسیقی] ارے راس کریم بسم اللہ الرحمن الرحیم رصداری لیا امالی میں اپنے گھر والوں سے ایسی دو تین باتیں کہتا ہوں۔ یہ 1015 دنوں کے اندر ہوا ہے۔ اس کے بعد میرے اندر خوف کا احساس ہے۔ اور ایسا لگتا ہے کہ ہم دوبارہ مل سکتے ہیں۔ ایسی حالت میں گرفتار وہ ہے جس سے ہمیں سکون ملے گا۔ بہت مشکل ہو وہ لوگ جو میری طرح 70 سال کے ہیں۔ وہ تقریباً اس تک پہنچ چکا ہے۔ پاکستان کی سرزمین پر آگ جل رہی ہے اور تھک رہی ہے۔ میں نے لاشوں کے اطراف کو اڑتے دیکھا ہے۔ اور یہاں کے لوگ انتہا کی طرف دھکیل رہے ہیں۔ میں نے دنیا میں لوگوں کو چیختے اور پکارتے دیکھا ہے۔ لیکن اکثر ہم اسے یہ سمجھتے ہیں کہ ہم نے یہ حاصل کر لیا ہے۔ ہم جو بھی کام کرتے ہیں اللہ ہی کرتا ہے۔ تبرک تلہ سر اٹھانے کی خاطر کرتے رہیں اور کبھی ہم پاکستان فرسٹ کی وکالت کرتے ہیں۔ ان تینوں کاموں کو بنیاد پر کرتے رہیں ایسے ہیں جو دنیا کے منظر نامے پر ہیں کے لیے ایک خوفناک صورتحال پیش کر رہا ہے۔ اور میں سمجھ نہیں پا رہا کہ میں کیسے میں تھیلی کی درخواست کرتا ہوں تاکہ شاید لوگ سمجھ جائیں۔ وہ جو اس وقت عرب ہے، جس نے فیصلہ کیا۔ کرنا پارا چرار کا یہ چرچا کافی عرصے سے جاری ہے۔ اور لوگ اس کی جدوجہد کے بارے میں جانتے ہیں۔ یہ مخمصے کی جگہ کیوں ہے کیونکہ یہ واحد ایک گوشہ ہے جو افغانستان کا حصہ ہے۔ یہ اندر اور وہاں کی گہرائیوں میں چلا گیا ہے۔ ایسے دو گرو ہیں جو ہیں۔ کسی قسم کے مسالے سے تعلق رکھتے ہیں لیکن اب یہ معاملہ مسالے سے بھی آگے نکل گیا ہے۔ اور سننے کی کوئی صورت نہیں۔ جولائی 2007 کے بعد ایک بار جامعہ دوبارہ مولانا عبدالعزیز کی حفص کے سامنے جھڑپ اور اردگرد کے لوگ جو ساتھ کھڑے ہیں۔ انہوں نے مولانا کو گھیر لیا ہے۔ مجھے سمیع الحق کے بیٹے اجمل حق صاحب پسند ہیں۔ میں اسے اور اس کے چھوٹے بھائی کو یاد کرتا ہوں۔ وہ اپنے والد کی وفات کے بعد آیا تھا۔ انہوں نے کہا کہ اب ہم اس سرزمین پر ہیں۔ مجید آگ نہیں دیکھنا چاہتے اور ہم امن سے رہنا چاہتے ہیں۔ اور سکون سے رہنا چاہیے اور وہ بھی شہید ہو کر دیا اس کے ساتھ چلا گیا پاکستان کی سرحد کے اوپر کے پی کے پورے بلوچستان کے اندر جو ہماری سرحد افغانستان کے ساتھ ہے۔ وہاں کی صورتحال ایسی نہیں ہے کہ ہم اس سے آگے جا سکیں حالیہ قسم کی صورتحال ایک چھوٹا سا شخص مکمل طور پر باقی سب کا مخالف تھا۔ ایک ویڈیو ہے جو آپ نے دیکھی ہو گی۔ کہ گڑیا ٹرمپ جو یہ ہے اس نے یوکرین کے ساتھ یہ کیا ہے۔ جسکی بلا کر کس طرح صدر کی توہین اور تذلیل کی گئی۔ اس کی حالت اور ریاست بھی رسوا ہو چکی ہے۔ ہم سے مختلف نہیں بلکہ مدد کے لیے تھا۔ کے حوالے سے اس کی زیادہ حمایت کی جا رہی ہے۔ ہم نے شاید اسٹنگ میزائل کے پھٹنے کو بھی محسوس کیا ہوگا۔ نہیں اسے دیکھنے کی اجازت نہیں تھی لیکن اس وقت اسٹنگر میزائل ہی جنگ کو ختم کرنے والے تھے۔ اگر ایسا ہوتا تو ایک ایک کرکے ہر ایک مِجّا اِل کو گنیں۔ اور ملا رکات والا سارا معاملہ وہ ہے جس میں ہمارے دوست ڈی سی زیارت جو کیپٹن کو اغوا کرکے لے گئے۔ ساری بات یہ تھی کہ امریکہ نے اس کا ٹیکنالوجی کو واپس لینا چاہتا تھا لیکن یہ اسے 5000 روپے دیے گئے اور پھر اسے اربوں ڈالر دیے گئے، پھر یورپ نے اس کا کنٹرول سنبھال لیا۔ اس نے تقریباً 6 لاکھ لوگوں کی مدد کی۔ وہ تمام قومیتیں جو انہوں نے وہاں دی تھیں۔ اس کے باوجود اسے ذلیل و خوار کیا گیا کہ اب ہم یہ جنگ نہیں چاہتے ہمارا مسئلہ یہ ہے کہ ہم اس زمین پر رہتے ہیں۔ ایک ایسا واقعہ ہے جس میں دنیا کی… بڑے توریان سمجھتے ہیں کہ یہ زمین میدان جنگ ہمیشہ میرے ساتھ رہے گا۔ ٹام مارشل کی کتاب پاور آف دی جیوگرافی ہے۔ یہ ان کی کتاب ہے اور ایک اور کتاب قیدی ہے۔ جغرافیہ کا جو ہمیشہ موجود ہوتا ہے۔ جس پر جغرافیہ کے قیدی ہیں۔ جہاں بھی حملہ آور آتے ہیں انہیں لوٹ لیتے ہیں۔ اور لوٹ مار کے بعد آگے بڑھتے ہیں۔ خیط وہ ہیں جو خاص طور پر ہیں۔ ان میں سے ایک وہ ہے جو پنجاب میں اٹک سے نیچے ہے۔ اور ایک علاقہ سندھ کا ہے اور دوسرا یوکرین کا ہے۔ یہ علاقہ یوکرین کے علاقے سے ملتا جلتا ہے۔ جیسے ہمارے یہاں کوئی پہاڑ نہیں ہے۔ بڑے میدان ہیں اور پھر یورپ اور روس اور اس کے میدانی علاقے شروع ہوتے ہیں۔ گندم اگائیں اور فصلیں کاشت کریں۔ یہی وجہ ہے کہ جب بھی جنگ ہوتی ہے۔ فتح کا جشن منانے کے لیے بڑے بڑے جھنڈے لہرائے گئے ہیں۔ آپ کو یاد ہوگا کہ کریمین ایک مشہور جنگ ہے جو کئی صدیاں پہلے ہوئی تھی۔ وہ کون سی انگلش ہے جو nazm mu Byron’s there وجہ یہ نہیں ہے کہ وہاں کیوں ہے بلکہ مرنا ہے۔ کہ کوئی وجہ نہیں ہے کہ ہم نے یہاں ایسا کیا۔ ہمیں لڑنا ہے اور مستقبل میں پاکستان کی حالت بھی بہتر ہو گی۔ بالکل اسی طرح جیسے اس میں 12 ہیں۔ میں آپ کو بتا چکا ہوں، میں کسی طویل وضاحت میں نہیں جانا چاہتا لیکن میرا ملک 12 ڈویژنوں میں ہے۔ یہ ساری صورتحال گجرات میں تقریباً 60 سال سے ہے۔ اگر اس میں 50 سال لگتے ہیں۔ 1979 میں وہ دن جب سب کچھ پہلے تھا۔ روسی فوجی جوہا جو افغانستان میں تھا۔ ہم داخل ہوئے تو پھر جنگ شروع ہو گئی۔ جو بھی ہے، وہ جنگ شروع ہو چکی ہے۔ افغان اپنے طور پر لڑ رہے تھے اور یہ جنگ 1988 تک جاری رہی اور روس کا آخری سپاہی میں فروری 1988 میں چلا گیا لیکن آپ شاید ہمیں یہ احساس نہیں تھا کہ ہم وہ جنگ امریکہ کے خلاف لڑ رہے ہیں۔ مجید کی بنیاد پر اسے آگے بڑھانا چاہتا تھا۔ اور افغانستان میں امن قائم نہ ہونے دیں۔ وہاں چاہتا تھا میں مچھلی چاہتا تھا اور پھر میں اس کے پاس گیا۔ نواز شریف کہانیوں کو ظاہر نہیں کرنا چاہتے شریف صاحب نے اس وقت جاالحق کی موت کی خبر سنی تھی۔ بعد میں، آپ نے وہاں اپنی حکمرانی کیسے قائم کی اور برباد کیا؟ اور پھر اس افغان کے اندر کیا ہوا؟ وہ بھی ایک مجاہد کا کردار ہے اور پھر ہم کتابیں لکھیں جیسے ہم کرتے ہیں۔ یورپ چارلی ولسن بھی لکھتا ہے اور وہ بھائی کیا بات ہے ہم یہ اور وہ کر رہے تھے۔ امریکہ اپنے ہی جھنڈے کاٹ رہا ہے۔ لیکن یہاں کی زمین گرم ہے، یہاں کے لوگ استعمال کیا جاتا ہے میں اُس دور میں، کوئٹا شہر میں تھا۔ اور گارڈن کے اندر اور پسینے کے اندر پوسٹ کیا۔ آپ اندازہ لگا سکتے ہیں کہ اس وقت کھاد بیچنے والے وہ بنیادی طور پر بم دھماکے کرتا تھا۔ ان کی ایجنسی کا تعلق افغانستان اور کے جی بے سے ہے۔ KGB روس سے تھا، اور ایک طرف ہم اس دھماکے سے جسم کے ٹکڑے اٹھاتے تھے۔ وائرلیس سگنل نے اشارہ کیا کہ ایک اور جگہ پر دھماکہ ہوا ہے۔ یہ ہوا اور ہم وہاں گئے اور ایک لاش ملی ایک طویل وقت کافی نہیں تھا کم از کم چار ماہ وہاں بارڈر چمن پر مجھے یہاں سے ایک طرف پوسٹ کیا گیا تھا۔ بوگرہ کی دوڑ کے اندر مجاہدین ہوا کرتے تھے۔ اور دوسرا اسپن بلدک، افغانستان میں روس کے اسپانسر نجیب اللہ کے ہجے وہ مسلمان تھا اور رات کو یہاں سے فائرنگ ہوتی تھی۔ بڑی گیندیں شروع ہوتی تھیں اور وہیں سے فائرنگ شروع ہو جائے گی اور لوگ اسے چمن سمجھیں گے۔ شاید اسسٹنٹ کمشنر ایک دن اور رات میں بہت بڑی طاقت ہے۔ مجھے ایک پٹھان پشتون بھائی کا فون آیا اس نے فون اٹھایا اور دھماکے ہو رہے تھے۔ انہوں نے کہا کہ خندق میں لوگ بیٹھے ہوئے تھے۔ آپ اس دستک کو دھکیل سکتے ہیں جو آپ کے ہاتھ میں ہے۔ نہیں تم اسے روکتے کیوں نہیں میں جانتا ہوں کہ یہ ان بزرگوں کے ہاتھ میں بھی ہو سکتا ہے۔ ایسا نہیں ہے کہ جو لوگ اس وار میں داخل ہوئے ہیں۔ بزنس مین بننے کے بعد ہم بھول گئے کہ ہم صرف پیسہ کما رہے ہیں۔ لیکن یہ پورا ملک بنا رہا ہے۔ اس کی ساری شکل ہی برباد ہو گئی اور پھر اس کے بعد امن کا دور بھی آیا رات ایک بجے خانی بازار کے اندر لوگ جمع ہو گئے۔ اس وقت تک کویٹا شہر جرسی پیٹیز کھاتا تھا۔ جو فلورا کارنر ہے۔ جنگ کے ذریعے شکار کیا گیا تھا اور یہ جنگ تھی دہشت کی 11 ستمبر کو جنگ ہوئی، ہم نے ان تمام لوگوں کو بچایا جن کی پرورش ہماری گود میں ہوئی۔ ہم نے ان کی پرورش کی، جہاز پر ان کی پرورش کی۔ جنہیں روڈن ڈریگن نے گانے گانے کے لیے بلایا تھا۔ کہا گیا کہ یہ مجاہدین نہیں، یہ سات ہیں۔ امریکہ کے باپ وہی ہیں جسے امریکہ کہا جاتا ہے۔ کہ سات لوگ ہیں جن کے پاس ہے۔ یہ اس کے برابر ہیں جس نے ہمیں آزاد کیا۔ یہ حلال ہے، یہ حکمت ہے میرے دوست، یہ احمد ہے۔ شاہ مسعود واشنگٹن میں اور اس کے بعد بہت کچھ جتنا ان کا جارج واشنگٹن اور وہ دوسرے تیسرے صدر بھی ان کے تھے۔ کیا عزت اور برابری برابر ہے؟ میں نے تاریخ دی تھی اور پھر ہم سب اسے اترن لے گئے اور پھر اس دوران جن 75000 لوگوں کو ہم نے جنگ لڑنے کے بعد بچایا مشرف صاحب نے لائن میں لگ کر قربانی دی۔ آگ کے بارے میں لکھا اور کہا کہ ہم نے یہ اور وہ کیا۔ میں ان کہانیوں میں نہیں جانا چاہتا میں نے 400 لوگوں کی خاطر اپنے آپ کو قربان کر دیا۔ جو کانگریس سے تھے انہیں نمبر بے پر بھیج دیا گیا۔ پاکستان سے اطلاعات ہیں اور امریکہ کارپوریشن کی وہ کہتی ہیں۔ ہمارے پاس تین ہوائی اڈے 57,000 بار تھے۔ امریکی طیاروں نے یہاں سے اڑان بھری۔ افغان بھائیوں کے حق میں اڑ گئے۔ ہمارے ہاں دہشت گردی اور سب کچھ بیک وقت ہے۔ جو کچھ بھی ہوا، 2007 تک ہمارے پاس کم از کم کچھ تھا۔ ورنہ یہ جنگ افغان بارڈر پر تھی لیکن۔۔۔ پاکستان کی سرزمین پر ایک واقعہ پیش آتا ہے۔ لیکن وہ واقعہ جام حفاظ کا واقعہ ہے۔ اس وقت میں ایران اور ایران میں تعینات تھا۔ کیونکہ میں ایک بین الاقوامی پوسٹ پر تھا۔ او کے اندر ڈائریکٹر کلچر انسٹی ٹیوٹ تو اس نے مجھے اجازت دے دی۔ آپ اسے ٹی وی پر دیکھ سکتے ہیں اور اس کے ساتھ آ سکتے ہیں۔ 7 یا 8 جولائی کو جب یہ واقعہ ہو رہا تھا۔ چنانچہ ایران کا پریس ٹی وی پہلی بار تھا۔ انہوں نے مجھے بتایا تو وہ بند کر دیا گیا تھا فون کیا کیونکہ اس پریس ٹی وی میں مسئلہ تھا۔ ٹام ہافا کے ہونے میں میرا بھی بہت دخل تھا۔ یہ آخری دن تھا اور جب میں نے انہیں بتایا اس راستے پر مت چلیں یہ آپ کے لیے پریشانی کا باعث بن سکتا ہے۔ میرے لیے راستہ نہ ملا تو رات ہو جائے گی۔ 15 تاریخ کو تقریباً 11-12 بجے مشرف مجھے سفیر کا فون آیا اور مجھے وہاں لے جایا گیا۔ سے جلاوطن کر کے واپس بلایا گیا۔ یہ الگ بات ہے کہ اس لڑائی میں کچھ عرصہ لیکن میں نے واپس آکر دوبارہ دریافت کیا۔ میں بھگتتا رہا لیکن اس ساری جنگ کا ایک اور نتیجہ ایک کردار تھا اور پھر روتے ہوئے آنسو تھے۔ میں اسے کہانی سناتا تھا کہ ہمارے پاس یہ ہے۔ جنرل شاہد عاجز نے ان کے ساتھ کیا سلوک کیا؟ اس خاموشی کو بک کرو یہ کتاب کس حد تک خوفناک ہے۔ وہ مجھے بتاتی ہے کہ اس نے مجھے آخری بار دیکھا تھا۔ اسلام آباد کے ایک ہوٹل کے اندر اکٹھے بیٹھے سیمینار میں کہا گیا کہ ہم نے امریکہ کے مسائل پر بات کی ہے۔ بولنے والے شخص کی طرف سے انتہائی ظلم اور جبر کا ثبوت اس نے وہاں سیاہی کا برش بھی دیا ہے۔ کہ یہ شخص جو طالبان کا سربراہ تھا سوات تھا۔ ہم نے اسے امریکہ کی ہدایت پر توڑا۔ تلبہ نے صوفی محمد سے کہا کہ اسے گھر توڑنا پڑے گا۔ نہیں چاہتا تھا اور یہ واقعی ایسا ہی تھا کہ اس نے نہیں کیا۔ پھر ہم نے 4 لاکھ لوگوں کو ان سے ہٹا کر کارروائی کی۔ اور پھر ہم نے دنیا کو اس کے بارے میں بتایا نتیجہ یہ سب ہے لیکن یہ کہاں سے ہے؟ بوسہ شروع کریں۔ 2007 میں جامعہ ہفتہ سے پہلے خودکشی بمباری ہم اس چارلی ولسن کے دولہا اور دلہن ہیں۔ ہم دہشت کے نقاب پوش تھے اس لیے سب کچھ ہوا۔ ہم کہانیاں لکھتے تھے لیکن اب صورتحال یہ ہے۔ اور کیا جارج ڈبلیو بش سے پہلے کوئی کردار ہے؟ رے اوباما تھے یا بل کلنٹن سے پہلے یہ اور امریکی اسٹیبلشمنٹ ایک تھے۔ ابانی کی اسٹیبلشمنٹ نے اسے کیا بتایا وہ کرتا تھا اور ہم بھی اسی لائن پر تھے۔ وائٹ ہاؤس میں ہمارا استقبال کیا جاتا تھا۔ ہمیں بٹھایا گیا تھا ہم نے آپ کو بتایا تھا۔ یہی کرنے کی ضرورت ہے، وائٹ ہاؤس کے لوگ یہاں آتے ہیں۔ اور ہمیں بتایا کہ کیا کرنا ہے۔ سی آئی اے اور آئی ایس آئی ایک دوسرے سے رابطہ کریں گے۔ ہم آہنگی تھی، سب کچھ یہ چیز 20 فروری 2025 کے بعد ہوگی۔ لیکن آپ کو اس کے بارے میں تھوڑا سا کرنا چاہئے۔ ڈونلڈ ٹرمپ اور امریکی ڈیپ اسٹیٹ اور ابھی امریکی زور اس طرح ہے۔ کھڑی اور ہاتھی ہاتھیوں سے لڑتے ہیں۔ جو درمیان میں ہے۔ وہ مینڈک ہے اور ہم اس کے قدموں پر روتے ہیں۔ جغرافیہ کی طاقت کی جیل ہے۔ اس وقت یورپ میں مینڈک اور ہاتھی ہیں۔ اس وقت یہ ہاتھی ہے، امریکہ کو افسوس ہے، یہ روس نہیں ہے۔ اس وقت ہاتھی امریکی اسٹیبلشمنٹ ہے۔ اور ہاتھی ابھی ڈونلڈ ٹرمپ ہے، آپ سوچ سکتے ہیں۔ کہ فوجی صنعتی کر سکتے ہیں؟ رنگت ہمارے مزے کی تلاش ہے، یہ تازہ اور گیلی ہے۔ میں اس پر مزید ویڈیوز بناؤں گا، انشاء اللہ میں آپ کو بتاؤں گا کہ اسرائیل کے بارے میں یہی کچھ ہو رہا ہے۔ ڈونلڈ ٹرمپ کا ایک لافانی منصوبہ ہے۔ پراپرٹی ڈیلر کی ایک عجیب قسم والا اور جیسے وہ سمجھتا ہے کہ دبئی میں اس نے ٹرمپ ٹاور اور برین سٹارم ون اور برین سٹورم ٹو بنایا اس دوران اس نے علاقے پر قبضہ کرکے جو کچھ کیا۔ نہیں ہو سکتا لیکن یورپ کے لیے یہ ایک ہے۔ کیا اب ہم روس کو سبق سکھانا چاہتے ہیں؟ ہم اس معاملے کا فیصلہ کریں گے اور اسے بھی ساتھ رکھیں گے۔ اس نے بھارت کو وہ درجہ دیا ہے جسے وہ اپنی حیثیت کہتے ہیں۔ مجھے مت دیکھو اور مجھے خرید لو دیکھو تم مجھے تیل دو، میں تمہیں تیل دوں گا۔ اب اس طرح حرکت کرنے کی کوشش نہ کریں لیکن شاید ہم سوچتے ہیں کہ اس وقت ہم پاکستان اسٹیبلشمنٹ کے کہنے پر اور افغانستان میں نئی ​​جنگ شروع کر سکتے ہیں۔ ہم جامعہ ہیں، افسا کے بعد ایک اور شرط ہے۔ اس ملک کے اندر پیدا کیا جا سکتا ہے جس کی امریکہ کے اندر اسٹیبلشمنٹ ڈونلڈ ہے۔ ٹرمپ کو یہاں سے جانے پر مجبور کریں۔ اگر آپ چلے گئے تو آپ مکمل طور پر لوپ سے باہر ہو جائیں گے۔ آپ کی کوئی حیثیت نہیں، آپ کی کوئی حیثیت نہیں ہے۔ آپ افغانستان میں نہیں ہوں گے، ٹھیک ہے؟ آپ ایران میں ہیں، آپ چین میں ہیں، آپ ہیں۔ اگر آپ ہندوستان میں ہیں تو پاکستان کے ساتھ رہیں۔ یہاں سے لڑو اگر یہ ہمارا فیصلہ ہے تو یہ ایک ہینڈ بیگ سے کہیں زیادہ ہے۔ ایسا ہوا ہے کہ ہم زیادہ بالغ نہیں ہو سکتے اور یاد رکھو، اپنی حالت دیکھو جب دونوں جنگیں بلوچستان میں لڑی گئیں۔ پہلا بھی 1980 سے 1988 تک اور اس سے بھی آگے، پورم کھاتہ بلوچستان سے زیادہ اہم ہوگا۔ کوئٹہ میں افغان مجاہدین کا دفاع کرنے والا کوئی نہیں تھا۔ شہر میں سرانہ میں باغ میں لامان میں اس کے کیمپ محمد خیل کا کیمپ وہاں سے شروع ہوا۔ یہ دال بندھن کے بعد اور اس کے بعد ہوتا تھا۔ سرخاب میں پشین کے کیمپ سے اوپر تک تھا۔ اور وہ لوگ جنہوں نے ان کے ساتھ کاروبار کیا۔ اس کے رشتہ دار اس کے ساتھ باقی سب کچھ کرتے تھے۔ وہ وقت جب اس کے اندر دہشت گردی کی جنگ تھی۔ بلوچستان وہ سرزمین تھی جس نے آپ کو دیا۔ اس کے باوجود طالبان کی حمایت کی۔ اثر و رسوخ بھی تھا لیکن اس کے باوجود تینوں تینوں اڈے جو آپ کے امریکی اڈے تھے۔ اور شمسی کا ٹھکانہ بلوچستان کے اندر تھا۔ اس کے بعد بلوچستان کا زباد کڑا بالکل بارڈر پر جا کر ان لوگوں کی بات کرو اور آپ کی تمام حرکات و سکنات کو کسی نہ کسی طریقے سے مانیٹر کیا جا سکتا ہے۔ لیکن جب لوگ آتے جاتے تھے تب بھی اسے چیک نہیں کیا جاتا تھا۔ مجھے وہ دن اچھی طرح یاد ہے جو 911 ہوا تھا۔ سرینا، کویٹا کے اندر ہوٹل کے کمرے ملاقات نہیں ہوئی اور اس نے حال ہی میں کیا تھا۔ اندر بستر بچھا دیے اور دنیا کا صحافی وہیں بیٹھا تھا اور وہ میں دیکھ رہا تھا کہ کیا ہو رہا ہے اور مناسب طریقے سے اس Var En Terror سے اس تماشے کا آغاز سامنے سے دیکھا جا رہا ہے۔ اور پھر اس کے بعد جب بھی آپ جاتے رہے۔ اگر آپ نے اسے کہیں پایا ہم سمجھتے ہیں کہ ہم ایک اور مشروب پینے جا رہے ہیں، ہافا۔ کا احساس پیدا کر سکتے ہیں۔ تو یہ واقعی خوفناک ہو سکتا ہے، مجھے نہیں معلوم کہ سعودی عرب اور مجھے نہیں معلوم کہ متحدہ عرب امارات دوسرے لوگ اس وقت کیا تلاش کر رہے ہیں اور کیا وہ ٹرمپ کی ہدایت کے مطابق اس طرح آگے بڑھے گا؟ بی کرما ہے یا اسٹیبلشمنٹ امریکی ہے۔ میں اس سے پیار کرتا ہوں لیکن ایک بات واضح ہے۔ اس کی وجہ یہ ہے کہ چین نے اپنا راستہ بدل لیا ہے۔ چین اب گوادر نہیں چاہتا جس کے ذریعے وہ سمندری راستوں سے تجارت کرتے ہیں۔ کیونکہ اسے اس بات کا احساس ہو چکا ہے۔ سمندر پر امریکہ کا کنٹرول ہے اور اگر اس سے کوئی فرق نہیں پڑتا ہے کہ CPAC کتنا اور کس طریقے سے بنایا گیا ہے۔ وہ آگے نہیں بڑھ سکتا، وہ اسے کسی دن روکیں گے۔ ہم بھی جا کر اسے چومیں گے۔ لیکن اگر وہاں سے جائیں تو ترکمانستان ایران سے اور وہاں سے ایران یہ آذربائیجان میں ہوا اور وہاں سے آگے ہم آگے بڑھیں گے تو اس کے لیے اور پھر یورپ کا راستہ بنائیں گے۔ اگر وہ چلا جائے تو اس کا راستہ بہتر ہو سکتا ہے۔ اور یورپ بھی چین کے اندر یہی چاہتا ہے۔ انہوں نے ریلوے میں جو ترقی کی ہے۔ چین کی ترقی میں چین سے فائدہ اٹھائیں۔ اور دوسرا انگلستان، جرمنی یا فرانس ہے۔ تمام فیکٹریاں چین میں سستی لیبر استعمال کر رہی ہیں۔ کیونکہ یہ وہاں موجود ہے اور ان کی تجارت ایک مسئلہ ہے اور امریکہ کی نلی بھی موجود ہے۔ اور امریکہ روس کے ذریعے چین کے ساتھ اگر آپ معاشی اور سماجی تعلقات چاہتے ہیں۔ انہوں نے یہ راستہ بدل دیا ہے، CPAC اب تیری منزل نہیں رہی اور بار بار کئی بار کہا جاتا ہے کہ ایک سڑک بنا کر سب سے بوڑھا اب اپنی قسمت نہیں بدلتا ایک راستہ یہ بھی ہے، وہ 1956 میں نریندر مودی کا ہے۔ یا 53 میں سے 4 میرے خیال میں مجھے یہ صحیح یاد ہے۔ نہیں میں نے اسے جمال عبدالناصر سے کہا اسے قومیا لیا گیا اور اس کی آمدنی شروع ہو گئی۔ تین سے چھ اور چھ سے آٹھ ارب ڈالر سالانہ وہ پیسہ کماتا ہے، مصر کی غربت کو ٹھیک نہیں کرتا پانامہ کی جھیل جو نیویارک ہے اور یہ وہ اسے مکس کرتی ہے، وہ ایل کو ملاتی ہے، یہ بہت ضروری تھا۔ گریناڈا کے اندر پانامہ ایک الگ ملک تھا۔ یہ ہمارے طریقے سے ہوا لیکن پاناما میں ملیریا کے مچھروں کا آج تک خاتمہ نہیں ہوسکا۔ حالانکہ وہ دو ارب ڈالر بھی کماتی ہے۔ نہ صرف سڑکیں پانی کو گیلا کرتی ہیں۔ صرف موٹر گاڑیاں بنانا کافی نہیں ہے۔ یہاں ابھی بھی کوئی زیر زمین ہے۔ اوور ہیڈ بنا رہا ہے کچھ بنا رہا ہے۔ لیکن میرا درد، میرا دکھ اور میرا مسئلہ یہ ہے کہ اگر ہم مزید کچھ دن اسی حالت میں رہیں ہم نے اسے اس طرح جانے دیا اور ہم نے سوچا کہ ہم ایک ہیں۔ امریکہ کو ایسا میدان جنگ کا تحفہ دیں۔ وہ دیں گے جس نے ٹرمپ کو مجبور کیا۔ اسے فوجی صنعت کے طور پر استعمال کیا جائے گا۔ پیچیدہ اور گہری حالت کو قبول کرنا اگر ایسا ہوا تو ٹرمپ کو مجبور کیا جا سکتا ہے۔ لیکن میری زمین جلے گی اور یہاں آگ برسے گی۔ لوگ یہاں مر گئے ہم اللہ کے پاس جائیں گے۔ بہت ہوگیا اس ملک کے ساتھ معاملہ، رحم کرو اپنا کام کرو [موسیقی]

    By Amjad Izhar
    Contact: amjad.izhar@gmail.com
    https://amjadizhar.blog

  • YouTube Channel Growth: Niche Selection, SEO, and Video Strategies

    YouTube Channel Growth: Niche Selection, SEO, and Video Strategies

    “A Journey Through Grief” is a transcription of a video discussing strategies for success on YouTube, particularly for faceless channels. The speaker covers a range of topics, including niche selection, keyword research, script writing, voice-over techniques, video editing, thumbnail design, and search engine optimization. The information targets Pakistani creators, and is intended to help creators generate income. Investment strategies, tool recommendations, and common mistakes to avoid are also addressed. The overarching aim is to provide a comprehensive guide for building a successful YouTube presence without showing one’s face.

    Mastering Faceless YouTube: A Comprehensive Study Guide

    I. Quiz

    Answer the following questions in 2-3 sentences each.

    1. What is a sub-niche and why is targeting one important for YouTube success?
    2. Explain the concept of “value addition” when using copyright-free resources for video editing.
    3. What is the primary difference in content consumption mindset between viewers of short-form and long-form YouTube videos?
    4. According to the source material, what is the approximate cost range for high-quality faceless video editing?
    5. What are the two types of keyword research mentioned in the source material, and how do they differ?
    6. Why is it important to start with an outline for your video before scripting?
    7. What are time stamps and how are they used to maximize views on YouTube videos?
    8. Briefly describe how AI tools can be used to generate thumbnails and boost views?
    9. How does the RPM differ between short form and long form YouTube videos?
    10. According to the source material, what are some tools to use for audio voice overs?

    II. Quiz Answer Key

    1. A sub-niche is a highly specific segment within a broader niche. Targeting a sub-niche is crucial because it allows for greater focus, reduces competition, and increases the likelihood of attracting a dedicated audience.
    2. “Value addition” refers to making changes to copyright-free content, like background sounds or transitional video effects. This turns the content into something unique.
    3. Viewers of short-form videos typically seek quick entertainment and easily digestible content, while those of long-form videos prefer in-depth information and engagement.
    4. The approximate cost range for high-quality faceless video editing, as suggested in the source material, is between ₹800-₹8,000 per minute, depending on the specific project and editor.
    5. The two types of keyword research are:
    • Searchable keywords are the terms people type into the YouTube search bar to find content.
    • Browsable keywords are related to trending topics and rely on users being served the video through their home feeds.
    1. Creating an outline for your video before scripting allows you to structure your thoughts, ensure a logical flow of information, and create a more engaging and coherent presentation.
    2. Timestamps are clickable links in the description of a YouTube video that allow viewers to jump to specific sections. They improve user experience, engagement, and can help search engines understand and index the video content.
    3. AI tools are useful for producing thumbnails and boosting views by creating eye-catching graphics without needing a degree in design. Using AI tools increases efficiency.
    4. According to the source material, the RPM for a long form YouTube video is ten times the RPM for a short form video.
    5. According to the source material, 11Labs is a tool that creates effective audio voice overs.

    III. Essay Questions

    Consider the following essay questions, drawing from the provided source material.

    1. Analyze the trade-offs between using AI-generated content and human-created content on YouTube, specifically addressing issues of authenticity, originality, and viewer engagement.
    2. Discuss the strategic importance of niche selection for faceless YouTube channels.
    3. Evaluate the potential impact of short-form content on the long-term growth and monetization of a YouTube channel.
    4. Assess the ethical considerations involved in using copyright-free resources and AI tools to generate YouTube content, with specific attention to issues of plagiarism and transparency.
    5. Outline a comprehensive business plan for launching and scaling a successful faceless YouTube channel, incorporating key strategies related to niche selection, content creation, SEO, and audience engagement.

    IV. Glossary of Key Terms

    • AI (Artificial Intelligence): The simulation of human intelligence processes by computer systems, including learning, reasoning, and self-correction.
    • Algorithm: A set of rules or a step-by-step procedure that a computer follows to solve a problem or complete a task.
    • Average View Duration: The average amount of time viewers spend watching a particular video.
    • Browsable Keywords: Keywords related to trending topics and rely on users being served the video through their home feeds.
    • CTR (Click-Through Rate): The percentage of viewers who click on a video after seeing its thumbnail and title.
    • Engagement: The level of interaction and involvement viewers have with a video, including likes, comments, shares, and watch time.
    • Faceless Channel: A YouTube channel where the content creator does not show their face on camera, often using stock footage, animations, or voiceovers.
    • Hook: The initial part of a video or script designed to grab the viewer’s attention and encourage them to keep watching.
    • Keyword Research: The process of identifying and analyzing the terms people use to search for information online, with the goal of optimizing content to rank higher in search results.
    • Niche: A specific segment of a larger market, defined by particular interests, needs, or demographics.
    • RPM (Revenue Per Mille): The amount of money earned for every 1,000 views on a YouTube video after YouTube’s cut of the ad revenue.
    • SEO (Search Engine Optimization): The process of optimizing online content to rank higher in search engine results pages (SERPs), thereby increasing its visibility and traffic.
    • Sub-Niche: A smaller, more specialized segment within a niche, targeting a specific audience with tailored content.
    • Thumbnail: A small, clickable image that serves as a preview for a video and is designed to attract viewers.
    • Timestamps: Clickable links in the description of a YouTube video that allow viewers to jump to specific sections.
    • Value Addition: Enhancements or unique elements added to copyright-free resources to make them original and distinguishable, ensuring content stands out and avoids copyright issues.

    YouTube Faceless Channel Course: Strategy and Monetization

    Briefing Document: “A Journey Through Grief”

    Overview:

    This document provides a summary of key themes and ideas presented in the provided text, which is an excerpt from a YouTube video or course titled “A Journey Through Grief.” The speaker, Ale Milli Millionaire youtube4, discusses strategies for earning money on YouTube, focusing on faceless channels, niche selection, keyword research, scriptwriting, video editing, thumbnail design, and SEO. The speaker positions this course as a valuable, free resource based on their personal experience and success on YouTube, emphasizing the importance of utilizing readily available knowledge to achieve financial success.

    Main Themes and Important Ideas:

    • Accessibility of YouTube as an Income Source: The speaker emphasizes that becoming a millionaire through YouTube is achievable, even without paid courses or advanced equipment.
    • “I did not use any paid course. It was made for free and there was no course. In our times, we had to learn by doing. So if we are giving you convenience today, right? By collecting all the knowledge and gathering it in one place So please take advantage of it and become something inshallah all the best”
    • Focus on Free Content and Pakistani YouTube: The speaker targets a Pakistani audience, highlighting the opportunity for online earning and positioning this course as a free alternative to paid resources.
    • “Your earning from Pakistani Youtube is less than This free offer is going to be 10x more today”
    • Beginner to Advanced Course Coverage: The course aims to cover a wide range of subjects, from beginner-level understanding to advanced earning strategies.
    • “In the course we cover subjects from beginner level to Covering Intermediate level and Advanced We will go to the level and understand in detail that These faces are channels or youtube0 plus this course is for Everyone who earns money online somewhere”
    • The Importance of Taking Action Now: The speaker stresses the urgency of starting a YouTube channel, arguing that the market will become saturated soon.
    • “If not, then if you start it now so in the coming 2 years, after one year when Everybody must be jumping into it when you arrive it’s of no use you should start it Now”
    • Niche Selection is Crucial: The video emphasizes finding a specific niche or sub-niche. This includes focusing on a specific demographic, geography, or topic within a broader category.
    • “If you start a channel on health then maybe You may not grow but you are healthy Even if you are targeting only 65 plus to the people and if inside that too you Targeting only diet conscious 65 Plus give people definitely your channel If it can grow then this is what we call technically It is said that there is one sub-niche i.e. one niche And there are some secrets inside it too”
    • Faceless Channels: The course focuses heavily on creating faceless channels, where the creator’s face and voice are not required. Several examples of successful faceless channels are provided.
    • “Now I’m going to show you some case studies. In which I will give you a small comparison I’ll give you one thing friend, one guy with a face The guy is doing the same thing with his face How can you do it without example? My How is youtube2 doing while being faceless One I have uploaded 4 videos on youtube and There are almost 1.5 million subscribers what is he doing how i make it viral Talking Eaters”
    • Keyword Research for Searchable Topics: The speaker details using tools like Vid IQ to identify low-competition, high-search-volume keywords to optimize video titles and descriptions.
    • “If you want to do good SEO for them, then you want to rank your videos Now for example I am content travel I want to make it related and as an example basically i want to make them from lets should you stay in xyz i have seen this If it is finalized then I will write here wear should you stay in and I clicked enter from here when I clicked it is telling me that Its search volume is so much and so is the competition It is very high”
    • Keyword Research for Browsable Topics: The speaker also outlines methods for selecting video titles and topics that are likely to be promoted through YouTube’s recommendation algorithm, emphasizing identifying winning ideas through analyzing successful videos.
    • “The very first step is this that you go once and get some title You have to search and see what is related to it Can 100 get in ok now this is something in front of me If there are suggestions then I can search anything I take for example this one my video I haven’t finalised the title yet But once I randomly went to that niche Entered some related keyword Now after entering this, first of all you You have to open the filter.”
    • Importance of a Compelling Script: The speaker highlights the need for engaging scripts and provides tips on crafting them using AI tools like Chat GPT, emphasizing adding a human touch to the AI-generated content.
    • Utilizing Copyright-Free Resources with Value Addition: The video emphasizes the importance of utilizing copyright-free resources for faceless videos. It stresses adding unique value to such content through editing, effects, transitions, graphics, etc.
    • “The transition you use in it is You can make it unique inside It could be the effects you are using you make it unique because of that if it The video looks like this if you flip it Maybe I may also give you a video It becomes unique if you make motion inside it I will add graphics, maybe then your The video becomes unique if you If you add text then definitely it will be yours”
    • Thumbnail Design is Critical: Thumbnail design is highlighted as a very important skill and should be given importance. AI-based tools can be used for this.
    • SEO is not as important for browseable videos: Browsable videos are dependent on thumbnail design.
    • YouTube Shorts Strategy: The video touches upon strategies for succeeding with YouTube Shorts, highlighting the importance of engagement, average view duration, and consistency.
    • Investment and Tools Cost Discussion: The speaker discusses the costs associated with creating a faceless channel, providing tips on minimizing expenses and identifying essential tools.
    • Mistakes to Avoid: The video concludes by highlighting common mistakes that can hinder YouTube channel growth, such as switching between long-form and short-form content, sharing the channel inappropriately, and reusing content without adding value.

    Quotes:

    • “2+ hours of video content every minute youtube1 and just consuming content But the people who earn money from here They got 500 views on youtube in 1 minute hours of content is being uploaded and we what is the maximum people can consume it” – Highlights the vast amount of content and the potential for earning.
    • “Addiction has set in youtube0 There used to be many games but today Just for the kids I still want to watch it after youtube0 even after 10 years” – This notes the significant children’s audience.
    • “Think about yourself and your profit Is your money being made or not? Whether your revenue is coming or not He has to think about it first and then Definitely he has included the other three parties Advertise Content Creators and Content Consumers also think about them and something like this I want to make sure that everyone is happy and I make money be good now youtube1 will run as many ads as will run More youtube4 youtube4 5 but he will keep that himself” – This shows the speaker understands the various stakeholders.
    • “So there is no scope for improvement in this come down and keep scrolling you will read two-three times You can also mix and match by holding the You can pick up a theme from someone, just from someone else can pick up the text for sure yours Thumbnail can be the best” – This demonstrates how to copy and iterate.

    Target Audience:

    This course is likely targeted towards Pakistani individuals interested in creating a YouTube channel to generate income, particularly those seeking a low-cost and beginner-friendly approach.

    Overall Impression:

    The excerpt provides a valuable, free resource for aspiring YouTubers. It acknowledges the common challenges faced by beginners and offers a practical, step-by-step guide to creating a successful faceless YouTube channel. The course is tailored toward a Pakistani audience, further increasing its relevance and appeal.

    Faceless YouTube Channel Strategy: Niche, SEO, and Content Creation

    YouTube Faceless Channel FAQ

    1. What is a faceless YouTube channel, and who is this strategy best suited for?

    A faceless YouTube channel involves creating content without showing your face or revealing your identity. This can be achieved through animation, stock footage, screen recordings, AI avatars, or other creative methods. This approach suits individuals who are camera-shy, want to maintain privacy, lack resources for high-quality video production initially, or prefer to focus on content creation rather than personal branding. It is useful for creators who want to generate income without being known or recognized.

    2. How can I find a profitable niche for a faceless YouTube channel?

    To identify a niche, consider your interests and expertise. Then, research potential niches using tools like VidIQ to analyze search volume, competition, and related keywords. Look for sub-niches with lower competition and specific target audiences. Examples include “make money online for teens,” “diet conscious 65+,” or “technology news covering SpaceX.” Additionally, explore trending topics and competitor channels to identify potential content ideas. Consider a niche you can create a high volume of content in over time.

    3. How important is SEO for faceless YouTube channels, and how do I optimize my videos for search?

    While SEO isn’t as crucial for browsable videos as it is for searchable ones, it still plays a significant role. Use tools like VidIQ to find relevant keywords with reasonable search volume and low competition. Incorporate these keywords naturally into your video title, description, and tags. Start with a keyword and explore where it is naturally included in other videos and where videos are ranked. Use the exact keywords in your title and write a compelling description using a small paragraph. Include the original keyword plus related keywords that will boost video rank. Finally, you should be careful to include time stamps in the description with links for each topic, especially if your video is in the long-form format.

    4. What are the key elements of a good video script for a faceless YouTube channel?

    A good video script should be engaging, concise, and well-structured. Start with a strong hook to grab the viewer’s attention. Develop a clear outline with distinct sections and ensure a smooth flow between them. Use simple language and a conversational tone. Consider incorporating humor, storytelling, or thought-provoking questions to keep viewers interested. Utilize AI tools like ChatGPT to generate script ideas, but always add your own human touch and unique value. In other words, don’t paste it directly in your video, be sure to read it and give it a human character that is both personable and engaging.

    5. Is it better to use AI-generated voiceovers or human voiceovers for faceless YouTube channels?

    Both AI and human voiceovers have their pros and cons. Human voiceovers provide a more natural and engaging listening experience but can be more expensive. AI voiceovers are cost-effective and readily available, but may sound robotic or lack emotion. Human-sounding AI voiceovers offer a middle ground, providing a more realistic and engaging sound compared to basic AI voices. Experiment with different options and choose the one that best suits your budget and content style.

    6. How can I make copyright-free content unique and add value to my faceless YouTube videos?

    To make copyright-free content unique, focus on value addition through creative video editing. This includes adding unique transitions, effects, motion graphics, text overlays, background music, sound effects, and filters. Tell a unique story with the story blogs you are using. It is important to download video footage, then download and change the effects. Be sure to change transitions, graphics, sounds, and filters to tell a unique story with a creative license.

    7. What are some common mistakes to avoid when creating a faceless YouTube channel?

    Avoid these common mistakes:

    • Switching between different types of content like shorts and long videos.
    • Sharing your channel with friends and family, which can skew audience data.
    • Reusing content without adding value or making it unique.
    • Using VPNs or RDPs to upload content, which can affect targeting.
    • Not analyzing competitor channels to identify successful strategies.

    8. How does the monetization and audience retention work for short-form videos?

    Algorithm for youtube shorts is about engagement and avg. view duration. Hook game has to be strong with no uselessness in your content (even a second). An average video duration is 30-45 seconds. Maintain consistency to have viewers see short videos, they should be uploaded daily. Pre-monetized channels perform well, agent channels work even better. Target audiences for youtube shorts include children under 11 and adults 45+.

    YouTube Automation: Content Creation and Monetization Strategies

    YouTube automation involves strategies to streamline content creation and audience engagement. Here’s a breakdown of key aspects:

    • Earning potential: Many individuals aim to generate income through YouTube. The focus is on understanding how to monetize content effectively.
    • Content creation:Creating videos without showing your face is possible across various niches like politics, health, technology, and travel.
    • Finding a niche is a crucial first step. Some popular niches include Make Money Online, Technology, Health, Travel, Geopolitics, Personal Finance, Stories, Plants & Gardening, ASMR, AI updates, and more.
    • Sub-niching can help target a specific audience within a broader niche, increasing chances of growth.
    • Using AI tools for script writing and voice overs can save time and resources.
    • Key elements for success:Keyword research is essential. Using tools like VidIQ can help find searchable keywords with high search volume and low competition.
    • Compelling thumbnails and titles are crucial for attracting viewers. Click-through rate (CTR) is a key parameter for YouTube’s algorithm.
    • Audience retention is vital. Average view duration and watch time are important factors in video promotion.
    • Technical aspects:Basic settings for faceless channels involve selecting the country of residence and video language in YouTube settings.
    • Content strategyDifferent frameworks exist for YouTube videos, including browse features, search, and shorts. Each has different strategies for niche selection, title optimization, SEO, editing, and thumbnail design.
    • Traditional YouTube content relies on high-quality videos and attention-grabbing thumbnails.
    • YouTube Shorts require a different approach, with less emphasis on thumbnails and titles.
    • MonetizationUsing human-sounding AI voiceovers can help with monetization.
    • Cost considerations:Outsourcing video editing and thumbnail design can be costly. Training a family member or using freelance platforms can reduce expenses.
    • Tools like VidIQ, Canva, and Eleven Labs may require subscriptions.
    • Common Mistakes:Switching to short videos in confusion.
    • Sharing a channel with friends or relatives.
    • Reusing Content. Content must be unique.

    Faceless YouTube Channels: Strategy, Content Creation, and Monetization

    Faceless YouTube channels involve creating content without showing your face, and here’s a detailed explanation based on the sources:

    • Niche Selection:
    • Faceless channels can cover a wide range of topics such as politics, health, technology, food, nutrition, and travel.
    • Identifying a specific niche is the first step. 50 niches are identified including Make Money Online, Technology, Health, and Travel. It is possible to create content in any language.
    • Sub-niching is a strategy to target a more defined audience within a broader category. For example, within the health niche, one could focus on nutrition specifically for athletes, kids, or pregnant women. By focusing on a sub-niche, there is opportunity to grow your channel.
    • Creating Content:
    • AI-generated characters can be used.
    • Content can include quizzes, truck modifications, and other topics.
    • Technical channel settings:
    • Creating a faceless channel doesn’t require special measures like registering a company in specific countries, needing an RDP or VPN.
    • Basic settings involve setting the country of residence and video language to target the desired audience.
    • Content Strategy and Frameworks:
    • There are different content frameworks including browse features, search, and shorts, each requiring a unique strategy for niche selection, titles, SEO, editing, and thumbnails.
    • Traditional YouTube emphasizes high-quality videos and attention-grabbing thumbnails.
    • YouTube Shorts uses less emphasis on thumbnails and titles.
    • Essential elements for success:
    • Keyword research is critical and tools such as VidIQ can help identify keywords that have high search volume.
    • Creating compelling thumbnails and titles is essential for attracting viewers.
    • Audience retention is important and watch time is a key parameter for YouTube’s algorithm.
    • Monetization:
    • Using human-sounding AI voiceovers can aid in the monetization of videos.
    • Tools and cost considerations:
    • Video editing and thumbnail design can be costly to outsource.
    • Subscribing to tools such as VidIQ, Canva, and Eleven Labs, may be needed.
    • Mistakes to avoid:Switching to short videos.
    • Sharing the channel.
    • Reusing content.

    YouTube Keyword Research and Optimization Strategies

    Keyword research is a critical process for optimizing content and improving visibility. It involves identifying the terms and phrases that people use when searching for information related to a specific topic. Here’s a detailed discussion of keyword research for YouTube, based on the sources:

    • Importance of Keyword Research:
    • Essential for channel growth: Proper keyword research can help avoid stagnation and increase views.
    • Targeted content: Understanding relevant keywords ensures content aligns with audience interests.
    • SEO: Knowing the keywords to include in titles, descriptions, and tags helps videos rank higher in search results.
    • Types of Keywords:
    • Searchable keywords are those that users type into the search bar.
    • Browsable keywords are related to topics that attract viewers through browse features.
    • A video may get views by searching for them or they may not come up, but the majority of views are going to come from here.
    • Tools for Keyword Research:
    • VidIQ is a tool that can identify keywords with high search volume and low competition. VidIQ is useful to find good titles.
    • TubeBuddy is another tool that can be used for keyword research and SEO.
    • Google Trends may also be helpful.
    • Strategies for Finding Keywords:
    • Initial exploration: Start by entering a broad term related to the chosen niche in a keyword research tool.
    • Analyze matching terms: Identify related keywords and phrases that align with the content.
    • Filter by competition: Focus on keywords with low to medium competition to increase the chances of ranking.
    • Evaluate search volume: Ensure that the keywords have a reasonable search volume, indicating audience interest.
    • Competitive analysis: Examine the titles and descriptions of top-ranking videos in the niche to identify commonly used keywords.
    • Long-tail keywords: Incorporate long-tail keywords (longer, more specific phrases) to target niche audiences and reduce competition.
    • Steps for Keyword Research:
    1. Start with a broad term: Enter a general keyword related to the video topic in VidIQ.
    2. Explore related keywords: Examine the matching terms and identify potential keywords.
    3. Filter by competition: Apply filters to find keywords with low or medium competition.
    4. Assess search volume: Check the search volume to ensure there is sufficient interest in the keyword.
    5. Check keyword usage: Search for the keyword on YouTube to see how many videos use it. Fewer results indicate less competition.
    6. Analyze ranking videos: Examine top-ranking videos to understand their content and identify potential improvements.
    • Optimizing Titles, Descriptions and Tags:
    • Titles:
    • Include the exact keyword in the video title to improve search visibility.
    • Create a compelling title that is clear and engaging, using the keyword naturally.
    • Descriptions:
    • Include the video title at the beginning of the description.
    • Write a paragraph that incorporates relevant keywords naturally.
    • Add timestamps to the description, using keywords to describe each section of the video.
    • Tags:
    • Use a website like rapidtags.io to generate relevant tags based on the video title.
    • Analyzing Competitors:
    • Identify competitors: Find channels that create similar content.
    • Examine successful videos: Analyze the titles, thumbnails, and keywords of their most popular videos.
    • Identify gaps: Look for areas where competitors are lacking and create content to fill those gaps.
    • VidIQ Extension
    • Shows tags, description, and titles.
    • Shows the subscriber which saves you the time to check each channel.
    • Identifies videos that are performing better than average.
    • “Trending videos” can be filtered.

    By following these strategies, content creators can effectively research and implement keywords to enhance their YouTube videos’ visibility and engagement.

    Video Editing for Faceless YouTube Channels: A Comprehensive Guide

    Video editing is a crucial skill for creating engaging content, especially for faceless YouTube channels. Here’s a breakdown of video editing, according to the sources:

    • Importance of video editing:
    • Video editing and thumbnail design are important skills.
    • It is a skill that many people sell as a service.
    • Video editing constitutes approximately 5-10% of what it takes to run a successful faceless channel.
    • Tools for video editing:
    • CapCut is recommended as a tool that covers 99% of your needs.
    • Other tools include Filmora, Premier Pro, Pictory, and InVideo.
    • Copyright-free resources:
    • Story blocks is a platform for niche content.
    • YouTube is a source of copyright-free content.
    • Other resources include InVideo Elements, Motion Array, Pexels, Pixabay, and Unsplash.
    • Value addition techniques: To make the content unique and avoid copyright issues:
    • Add unique elements to the video, including background sounds and transitions.
    • Incorporate unique effects, motion graphics, and text.
    • Include voiceovers or background music.
    • Add PNG images and popup sounds.
    • Incorporate filters.
    • Learning video editing:
    • Azad Chaiwala offers free video editing courses on YouTube.
    • Cost considerations and strategies:
    • Outsourcing: Hiring video editors can be expensive.
    • Training: Instead, you can train a teenager in your family.
    • Freelancers: Utilizing platforms from free communities can connect you with service providers.
    • Fixed salary: Discuss and fix things on a fixed salary, for example, 50,000.
    • Teenagers: Find video editors who are teenagers who are happy to serve you and provide content.
    • Mistakes to avoid:
    • Do not simply download videos from websites and upload as is.
    • Content must be unique.

    Faceless YouTube: Niche Selection Strategies

    Niche selection is a critical first step in creating a successful faceless YouTube channel. It involves identifying a specific area of focus for your content.

    Here’s a detailed discussion of niche selection, according to the sources:

    • Importance of Niche Selection:
    • Channel Growth: Starting a channel on a broad topic like health might not lead to growth, while targeting a sub-niche, such as diet-conscious individuals aged 65 and above, can be more effective.
    • Targeted Content: Choosing the right niche ensures that the content aligns with the audience’s interests, increasing the chances of attracting and retaining viewers.
    • How to Identify a Niche:
    • Explore Interests: Identify topics that you are passionate about and knowledgeable in.
    • Look at Trends: Analyze current trends and identify gaps in the market.
    • Keyword Research: Use tools like VidIQ to explore keywords related to potential niches. Look for keywords with high search volume and low competition.
    • Competitor Analysis: Analyze what niches other YouTubers are using.
    • Sub-Niching: Identify sub-niches within broader niches to target a more specific audience.
    • Niche Categories
    • Make Money Online: Includes sub-niches like channels for females, teenagers, or those interested in investing.
    • Technology: Includes technology news, advancements, and gadgets.
    • Health: Encompasses health remedies, nutrition, and exercise.
    • Travel: Includes top destinations, travel scams, and reasons not to visit certain places.
    • Facts: Can be related to history, travel, animals, or religion.
    • Quotes: Can focus on athletes, entrepreneurs, or celebrities.
    • Celebrities: Can cover lifestyles, scandals, or achievements.
    • Movie Recaps: Focus on specific movie industries like Hollywood or Bollywood.
    • Geopolitics and World Affairs: Can target specific regions or countries.
    • Personal Finance: Can focus on different age groups or investment strategies.
    • Stories: Includes business, scary, crime, moral, and kid stories.
    • Plants and Gardening: Focus on specific types of plants or gardening techniques.
    • ASMR: Create videos with sounds that trigger a sensory response.
    • AI Updates: Cover advancements, updates, and new apps in artificial intelligence.
    • Crypto/Stock Market/Forex: Focus on trading or investment strategies within a specific market.
    • Pronunciation: Teach correct pronunciation of words.
    • Futuristic Concepts: Cover future trends in cars, technology, and politics.
    • App/Software Tutorials: Provide tutorials on using specific apps or software.
    • Personalities: Focus on news and updates related to a specific public figure.
    • Investment Tips: Offer advice on investing in mutual funds, stocks, or government bonds.
    • Cartoons and Rhymes: Create animated content.
    • Beauty and Makeup: Provide tutorials, product reviews, and beauty tips.
    • Nutrition: Focus on nutrition for specific groups like athletes, kids, or pregnant women.
    • Cars/Airplanes/Helicopters: Cover topics related to vehicles and travel.
    • Animals: Provide information about various animals.
    • Pets: Focus on pet care, training, and behavior.
    • Home Decor/Interior Design: Share tips and ideas for home decoration.
    • Motivation: Offer motivational content related to fitness, breakups, or business.
    • Drawing: Provide drawing tutorials.
    • Book Reviews: Review books from various categories.
    • Religion: Create content related to religious teachings.
    • Formal Education Subjects: Explain concepts related to subjects like chemistry, physics, or mathematics.
    • Skill-Based: Teach skills like sales or digital marketing.
    • Language-Based: Teach new languages.
    • Sports-Based: Focus on a specific sport like cricket, badminton, or basketball.
    • Gaming: Make videos of PC or gaming laptops.
    • Street Food: Make videos showing street food from different cultures.
    • Magic Tricks and Illusions: Make videos to show techniques for magic and illusions.
    • “What If” Scenarios: Explore hypothetical scenarios related to science.
    • Sub-Niching Criteria:
    • Targeted Audience: Instead of targeting everyone interested in health, focus on pregnant females or individuals with specific health issues.
    • Specific Focus: Instead of covering all celebrity news, concentrate on a particular industry or type of celebrity.
    • Monetization Potential
    • Some niches, like personal finance and investment tips, tend to have higher RPM (revenue per thousand views) rates.
    • Keyword Research
    • After selecting a niche, you can research keywords and apply filters.

    By carefully considering these factors, content creators can select a niche that aligns with their interests, has growth potential, and offers opportunities for monetization.

    COMPLETE YouTube Automation Course For Beginners | Make Money On YouTube Without Making Videos 2025

    The Original Text

    Ale Milli Millionaire youtube4 was very beneficial this again We have created approximately 20-22-23 new videos. There are many changes in this strategy There has been a slight change, don’t think that it is free I paid the money okay so my Minimizing the Money and the Other the thing is that this is probably you youtube.apk is one of our needs where our All Urdu courses are available for free My University of Free Taleem Cheez Takri it happens to you that you have learned no we all don’t if i say that friend i am 21 He became a millionaire at the age of I did not use any paid course It was made for free and there was no course In our times, we had to learn by doing So if we are giving you convenience today, right? By collecting all the knowledge and gathering it in one place So please take advantage of it and become something inshallah all the best so hello everyone welcome to free youtube1 At some point in your life you I was thinking about starting a channel It will happen but most of you are like this There must be those who would be saying that friend, no my face Neither should my voice go to the front nor should it be and still something happens that I Your earning from Pakistani Youtube is less than This free offer is going to be 10x more today In the course we cover subjects from beginner level to Covering Intermediate level and Advanced We will go to the level and understand in detail that These faces are channels or youtube0 plus this course is for Everyone who earns money online somewhere Want to earn through youtube1’s 2.5 years and many of my videos are in this Time Collaborate with youtube1 in 2023 as well I did it and I took that free course You can get an idea that this is my From the content to my tawassul Millions of people have learned this skill and There are hundreds or thousands of people who By working in actuality, Alhamdulillah you can earn good money so let’s get started with ourselves laptop screen and do things let’s discuss one by one so this is the youtube1 is how to earn money right from it First, you must understand one thing that you youtube1 letter why am I saying this There are some solid facts behind this, see youtube0 in this world which is number one that on google2 youtube 2+ hours of video content every minute youtube1 and just consuming content But the people who earn money from here They got 500 views on youtube in 1 minute hours of content is being uploaded and we what is the maximum people can consume it There are around 1.8 billion user visits youtube.be is the automation space They’ve been into this long before us If you are learning this thing then I will tell you this I would say that as a Pakistani I have seen many This opportunity has been grabbed too late that level is reached very soon If it is high then I will tell you that We as a Pakistani start it now have to do it after that In youtube2 we hear from every person’s mouth amazononline.in What came in 2020 Did not earn as much profit as compared to the One which came in 2018, so today you should understand that There is no youtube0 that has this many people If not, then if you start it now so in the coming 2 years, after one year when Everybody must be jumping into it when you arrive it’s of no use you should start it Now Politician Brands Organizations institutes actors athletes are already Shifting Towards not going anywhere youtube4 people are already youtube1 uz of people are making money full time Income From youtube has 1 billion user base in this world has a population more than Do you know kids how much Addiction has set in youtube0 There used to be many games but today Just for the kids I still want to watch it after youtube0 even after 10 years If you want to see then I have a big idea in this An opportunity is visible, so today What are deliverables, what are we talking about today I want to talk to you today, I am 15 I am going to talk about the chapters and you There are as many questions in your mind as When I did the last course with Azad Chaiwala All the questions were recorded there have come to me over the time As many frequencies as I get confused with you, today I saw that everything has to be cleared and this course is Going to be the best free online We might have read it here on youtube.be I want to talk about Nishas what Nishas what happens to them all There is a big question about how to find it I want to talk about it in detail, I have written here Tell you about script writing Keyword research is most important I have to tell you the frameworks of So many people are confused about youtube1 I want to tell you guys what happens I want to tell you about thumbnails tell me about video editing I will answer all the questions here today I will make it clear what the hack is and grow it How to avoid mistakes as much as possible Most people do these things today if you can understand it in this video then Make sure you don’t skip time take it out and watch it with peace of mind ok so first of all that come Whether you talk about politics or Whether you talk about health or technology Whether you talk about food and nutrition whether you are talking about traveling are you any kind of thing in the world If while remaining faceless, in any tongue Do you think that for example reality TV Many of you might know the truth What does TV do? It talks about news. Jio talks about current affairs Politics talks about what is going on in the world I keep talking about that beyond but have I ever He has come forward himself, otherwise what about his Did it make any difference to his income? Did you penalize me or not brother you are in front If you don’t come, we won’t give you that much money So and so gets more money I will give you no youtube1 guy is coming 10 guys are coming or 50 people are coming but who cares about it which content is getting views and which The content is not getting views which are not coming He will sideline him, He will not bring it in front on which he is getting views there will be something in it until endless youtube0 I will keep it niched right now You have to go into these in detail and understand things Which niche to go to and which not to Also know what are its parameters You have to understand but right now I am going to give you 50 Nishas is like that Ginwala brought forward for example make Money Online You Related to Make Money Online There are hundreds of topics on which you can create content There is technology inside technology Technology news also comes technology Advancements also come with technology Gadgets also come under technology A lot of small things come inside which you can discuss and beyond that You can cut the channel, it comes on number three Now health is inside health, health remedies Health is a separate niche within health Nutrition is a different thing within health Exercise is a different thing within health too I will give you at least 1015 sub niches ginwala we can count 10 sub niches for Example Scams in XYG City Best Restaurants in XYG City Tourist Destinations in XYG City So a small and different kind of thing on all of these Similarly these 50 can also become a channel it’s in front of you for a second Stop, read and understand, once your mind is open It would be like yes friend, one or two things from these These are the ones I think about I can create content and yes i can create my own faces channel Now I’m going to show you some case studies. In which I will give you a small comparison I’ll give you one thing friend, one guy with a face The guy is doing the same thing with his face How can you do it without example? My How is youtube2 doing while being faceless One I have uploaded 4 videos on youtube and There are almost 1.5 million subscribers what is he doing how i make it viral Talking Eaters For youtube0 Made His First $379 Online Vid youtube2 This is an AI character that it It has been used similarly I will tell you another one I show a channel by the name of Quiz Bloods Now what is this, this is a quiz related channel And it has around 6 lakh subscribers. is present and what is it doing guess the Guess the Flag Guess the Car Logo Guess the Sport Guess the XYG means what has it done basic This video editing is very difficult I will not let you know in the letter on video I will tell you now how to do this and you wood see that friend you can do this too okay then there’s a third channel now this It belongs to Pakistani and is based in Pakistan Now what is this Pakistani trucks people loves to watch people from outside Truck breaks down how to fix it The truck is running on the road, such and such truck How did you transform it into a truck? see 10 million views 10 million views 88.9 million views These people are also doing this And they are making a lot of money from it, so I’ve shown you some case studies. just to open up your mind that good yes Friend, work of this level is being done and at this level the work is being done now we come to our Chapter two where we will discuss Some basics of how do you go now the first thing that comes What settings should I do for the faceless channel? so many people ask what is this friend is it rocket science i need to go to uk usa I need someone, I need a relative You must be needing some uncle only then I can go can i create the channel again do you know I want to register a company UK USA In Canada or Australia the answer is no No RDB is required, no VPN is required only then If the content can go to USA then the answer is no which kind of a basic one A channel is created in the same way Face Edge there is no youtube0 i will tell you quickly I’ll take you to the screen and show you these three Let me show you four settings so you can get a Be satisfied now, for example this is your one This is a faceless channel, here you first came click on settings click on settings By clicking here you can click on the channel and you can enter your Country of Residence here You will select United States from Like this after that you uploaded in defaults You have to go to advanced settings and You can see the video by scrolling here select the language as english is next hum title and description We will also select the language as English Your three settings are now complete. Now from here you have to click on save. For now, I am cancelling it on fourth For setting when ever you are uploading any video like for example this one You are uploading the video from here I want to upload a video and while uploading You have to scroll down and here But you have to change two-three things in the video For example you will read the video from here convert language to english You will have to like this and the video location is here You also have to make the right to the United States So these are basically four to five settings. which you want to do in your video and you Are good to go, there is nothing more than this So these were the basic settings that you had in your Apart from this, there is no rocket to be shot in the channel Science is not something in the air or the sky it’s not something you can pick up and drag me to Only then can your face channel be created Now the next question will come and very very important question and the question is How to get views from USA audience now This is a very important question that you You have to understand it from now on, see if you are like this follow any youtuber who He who is not in Pakistan lives somewhere else but you can download its content in Urdu and Hindi Let’s watch, someone might be coming to my mind For example Sham Idris Sham Idris remains is in Canada but you can see it in front of you Content in Pakistan Urdu Hindi Those who reach the right in the language They must be sitting in India too Its content would have reached Idra which I must be sitting in Bangladesh It is possible that the content may reach even that its content is from someone sitting in America Desi Pakistani should reach there too, right Now you come to the second scenario here If you upload content from Pakistan If you do then if any friend of yours knows USA UK Canada Australia South Korea Poland Ireland If you have a friend anywhere in the UK and He subscribed to your channel and hit the bell icon is pressed or not So he has seen some of your videos When you sit here from Pakistan and your I will upload the video in Pakistani Urdu I am talking about Hindi content if you What do you think if I upload this video? is this video your friend from USA my friend from Canada will be able to see it I will definitely be able to see you guys too I will give you all a small exercise Wherever you are sitting and watching this video You must comment below if you are from India you are from pakistan right now where are you from You are sitting and watching this video from Kenya You are sitting and watching from the USA yes you guys will see that I have uploaded this Azad Chaiwala is from Pakistan has uploaded this from Pakistan But if you read the comments below, you will You will see that someone is saying that I am from Kenya I’m from Ireland I’m from Poland I’m from Denmark I’m from You can find here from every country in Europe, Germany People will be seen in the comment section below if So you can see people in the comment section below. If you are staying here then you must understand this thing It should be known that Azad Chahwala had defeated Pakistan I have uploaded the video sitting there but You can see the queens of the world in the comments If they are coming then why is it like this from Pakistan While sitting we were thinking that friend this is outside I can’t go but there are so many comments If people are from Pakistan then they are sitting in Pakistan The video should go like this If it is of youtube1 type then you are from Pakistan Upload it sitting here or sitting from India By uploading it, he has got his right audience You have to reach me tell me Sitting in Pakistan, you will never see Russian why is there no video on youtube Sitting in Pakistan you will get the job of an Egyptian Why didn’t the youtube video come though? going from pakistan to egypt but Why is this virus not coming to Pakistan from Egypt? The reason I am not coming is because Egypt’s The language in which YouTube will be available You must have uploaded the content, you will understand it don’t come, it is not relevant for you As youtube2 he posted videos from youtube she has been consumed and then she is in Pakistan if he comes and stays with you then he should go to Egypt Recommend all types of Youtube videos there are chances of it happening because he The tongue comes and the topics for it he is extremely relevant i hope so It might have become a little clear to you that if Your topic is relevant and so is your language It is relevant wherever you sit Upload content youtube0 brother you tell me that youtube0 are the things that I have told you three primary things from here which youtube3 has parameters but three Before explaining the parameters I would like to tell you a Let me explain the fundamental concept see it is from youtube0 You have to think about yourself and your profit Is your money being made or not? Whether your revenue is coming or not He has to think about it first and then Definitely he has included the other three parties Advertise Content Creators and Content Consumers also think about them and something like this I want to make sure that everyone is happy and I make money be good now youtube1 will run as many ads as will run More youtube4 youtube4 5 but he will keep that himself means that She has newly There is a youtube4 video in which he does something sometimes he is doing something, sometimes he is doing his is telling about sometimes saying look I’m going there look I’m going there Do you and I see anything in his video? I have no interest in those videos The kind of thing that is coming before us that we Neither do we know nor do we recognize that He is interested in some topic I am not interested in the quality of his videos it’s very bad the audio is very bad so what You and I will not get bored watching it and The videos are coming in front of us like that I will keep leaving and say friend what is this futile I have started recommending videos youtube shows 3 videos that we like We will see more and more of the whole We will see beyond that, we will obviously click on our Mostly in front youtube3 compromise in parameters This is the situation which I am going to give you the parameters for now. I am going to tell you then youtube1 which is the first parameter that is CTR stands for Click Through Rate If you are making a video that you I have kept the thumbnail, I have kept the title and that youtube visible to 1 person or 100 people and the whistle coming on it is below 10 coming on below 8 coming on below 5 If it is coming then youtube1 is showing it to people hmm five people are clicking on this or Four people are clicking or three people He will say that you are clicking this video friend It’s not good, people are clicking less That means that people are getting bored somewhere If you are getting started then watch this video remove it then When I show this title to youtube0 when i show or this topic basically When I show it, people will click on it So from there the video went viral The chances are higher because So this is how CTR increases on your videos If this happens then your video will go viral There are more chances but this is just one factor now comes the second factor What is Pay and Second Factor Average View Duration if average views on your video The duration is less, which means people will come to your video So we go and click but They see that friend is good click betting has it been done in the beginning or the topic is that It is not as per what is mentioned in the thumbnail If it happens, they will shut down your video. For example, there is a 10 minute video on Average people are watching it for 1 minute what does that mean youtube 1 minute video 2 minutes or 1 the minute people are ticking that means your The video will never be promoted and The third factor is the watch time now watch how is the time different watch time like this The difference is that you have made a 10 second video I just posted it and people should wait for 5 seconds on it If you are there then wait for 5 seconds on youtube2 There is an hour long video and if someone spends 20 rupees on it even the minute is ticking youtube2 it’s lasting for at least 2 minutes right it’s over Average view duration at Just 33 but youtube is lasting for 2 minutes friend what does it mean It’s good if you promote this video then this will happen Our third factor is if your video I have good CTR and good average The duration is good, if the watch time is yours The video has to be promoted, this is the basics of The chapter on basics ends here Now let’s move on to chapter three tarif which is frameworks of youtube.com pixabay.com and some from there I picked up the videos, compiled them and uploaded them. After putting on voice over this gentleman is my The faceless video is complete in this, friend You have to follow a strategy have to go with the frameworks It depends on what type of audience I’m targeting I am going to target and accordingly After making the whole strategy, you have designed the content you have to do it sometime see your youtube0 check your history if you If you have heard the songs then the songs start appearing in front of you. If you have content on any topic then you will go consumed similar topic related Videos will appear if you have subscribed to Arva News If it happens then the videos that are coming out That’s basically through the browse feature to your It is coming in front of you, okay, you should understand this that it is coming through the browse feature well there are some videos which never It is not possible that you open your app You are coming in front of me for example For example this is like a remote, how to change it sales in a remote of a light have you ever gone You must have searched if you want lights etc. use or in front for example an i it is on how to turn on death mode This never came to your attention right? When does it appear when we click on the search bar above? let’s type it and press enter then these videos would have been coming in front of you now this is the second framework, this is that There are videos which get views through search which was the first one that had the browse feature which one takes the views through which takes views through search Now both of them have different strategies We have to play different games between the two then What is the third category or third framework what if you work on youtube4 Now shorts are neither coming in search Shorts are neither available through direct browse nor You would have seen it in a short section You have to go there and you can scroll down there is no thumbnail there neither The title matters so much that one It is a different game which we are making a different we will discuss in the video ok right You got a little idea from here that yaar yes there are some videos which are just There are some that come through search comes through browse there are some which Shorts are good now that there is a browse feature we want to promote videos through that is called traditional youtube’s content has to be promoted that is through youtube’s youtube.be shorts automation now these three Its frameworks are Majeed and three others there are frameworks through which Which framework to do youtube.be automation There are different pros and cons of each framework Cons are for example which age is very short problem They are so high end oriented Editing is not required for example You have to search how to turn on dark mode on instagram2 is fit or not, its all the same You can hear the sound clearly in front of you You are getting clear screen recording are you done with it, do you need anything more than this There is no need to do SEO of these videos It is important, we will do SEO and we will rank Only then will your videos like this get views You can upload 10-10 posts six times a day You can also upload such channels as well I can show you which is 25 25 30-30 I am also uploading videos right because It is short and problem oriented On the other hand if you come across browsable videos or come to traditional youtube0 what is there You will get a very quick result Your video will go viral instantly The quality of the video is very high end Your thumbnail should be big and high end Your topic should be like a big click daughter Only then you need more through browse Views will come here, SO doesn’t matter here only the title matters If it happens then the niche of every framework is different Niche selection criteria for each framework The title selection of each framework is different The SEO criteria of each framework is different The method of doing this is different for each framework The editing style is different for each framework Thumbnail designing concept is different then you Make sure that you do this first We have to decide which one we go to in the framework and in what way have we now we have to design things here Basically, what will work is traditional I have made a total difference to youtube’s I made a chapter and the remaining three Frameworks are a little bit exclusive We are going to talk about that in this video We will not talk, so this was our chapter number three frameworks of what is about niche selection on youtube4 Now many worlds are coming here again and again You will see it again and again, listen to it, and understand it because this is the most important thing that Brother Nisha which one should I select Nisha who If you want to select C then I will explain it to you today What are the criteria for niche selection How to find out your niche what is niches what are all niches How to catch one niche and remove all its niches I find out all these things Now let me explain it to you in this chapter, ok here I will tell you about the 14 niches same but at the same time i kissed you all the way I also need to explain it a little bit that if someone is a Nisha then all the Nishas are inside him Which one is it then at the top is Nisha’s name and inside the bottom bracket I’ll write it You will also know a little about all niches. I will take you while touching it because it is actual The channel that we want to create is for any I don’t want to do anything on the target, I have destroyed all his targets We have to target because in today’s time Competition has increased a lot, I would tell you that If you start a channel on health then maybe You may not grow but you are healthy Even if you are targeting only 65 plus to the people and if inside that too you Targeting only diet conscious 65 Plus give people definitely your channel If it can grow then this is what we call technically It is said that there is one sub-niche i.e. one niche And there are some secrets inside it too, so Let’s start with your first niche And That is the Very Famous One Make Money Online Make Money Online Trend Since 2020 It has increased a lot since Covid arrived Every child knows that he can earn money online Now people become this, how do they become this Targeting youtube2 and any of its sub-niches I have to do it for example what is its sub nisch Maybe you can just create a female channel You just create a channel oriented app like this Related which lets you earn money online You just create a channel which is just targets teenagers in a way You can make money online just like this Create a channel that targets that without How to make money investing online You just create a channel that targets If you have $1000 then you can invest online How to make money, this is how you can earn money We will choose a sub niche and inside it we will create our own channel then whatever we have The second niche is that it is about technology now All niches related to technology are also wildly Are you covering technology news? You can take advantage of technological advancements You can cover as much technology as you want Big projects are underway for example SpaceX is running Tesla is running you You can cover any one project You can cover any app with blogs can cover atus atus then the third one Nisha hai that is health I told you about health I told you that people who are 65 plus You should target the children You target pregnant females It may be possible in you that only the one who People are sitting here with the issue of hurt Just cover them, you are only diabetic If you cover the patients then this like there are lot of niches inside it then The next niche after that is travel. You can also choose to travel. You can create content inside Top 10 Places To Visit In Falana City Falana city ​​so and so city you can cover top 10 Reasons Why You Should Not Visit Falana city ​​so and so city so and so city you can cover There are 10 tourist scams in this world city ​​so and so city so and so city then after that Your channel idea could be next About Facts You can create facts Are you related to any thing? You can create history related to Traveling can create facts Related You can create facts You can create facts related to health These may be animal related facts can create it maybe someone If religion related is correct then in this way your I have a lot of ideas related to facts but then after that the next niche that is Quotes Now some athletes say something Somewhere in the book people say something Politicians say some things, some old things The great leaders in history have been Sometimes they say something, sometimes someone else Entrepreneurs sometimes call it Jeff Bajus When people like Elon Musk say this, you Do not do it in such a way that you cover everybody. You want to target a domain for For example, on my channel only sports I will show you the codes of these people Shall I tell you on this channel or on my channel? Only those who are Bollywood stars I will tell you the codes or I will give you on my channel Only those Hollywood stars I will tell you the codes alright then the next niche Celebrities are at number seven now You can also target celebrities You can also target the lifestyle of celebrities Where can the celebrities say You can target those who have done scandals You can cover news of celebrities Are you covering the achievements of celebrities You can do this right now while sitting in my presence Ideas are coming, okay then celebrities Also do not do this because you have to catch a domain you are covering the news Celebrity news and you can know it all over the world Covering all the celebrities of You are no longer just from one country catch the celebrities or you are a Catch the sports based celebrities or You are an industry based celebrity grab it then the next niche is that is Movie R Caps now movies are also from Hollywood Are you from Lollywood or Bollywood? Are you among these Grab hold of any one industry Only action movies are considered important for the industry Catch me as I recap these movies for you now I will give you the next Nisha that is Geopolitics and World Affairs Now In this also you can be that in any one country You can target a region Take any two countries which are always at loggerheads with each other You can only cover those who have disputes. but you may be like pakistan And China is a great friendship between you and these two Please cover it and also tell me their history You can also know about their current relations Tell me, this is how you can create any channel then the next Nisha that is Personal Finance Now Inside Personal Finance There are many other prohibitions too, you can tell me this that people who are just 20, how can they invest money you can tell that How can people who are only 40 years old make money? invest you can tell that they people who want to retire at 60 and Never work after retirement You can tell me what I want to do People want to retire at 30, what are they do it then the next niche is stories now There are many types of stories, you can do business You can make stories, scary stories You can make horror stories yes you can make crime stories You can make moral stories and kid stories You can create any one category Choose and start his/her story channel give then the next thing that is Plants and Gardening You can also do it inside There are many types of fruits available at this time plants are like flowers and you are theirs start giving explanation here Your channel is very good on search can rank then the next channel is ASMR ASMR is such videos in which no one’s voice is coming out and you are doing a job for example you are playing with something If you are unboxing something then its This is a great listening experience by recording from youtube1 is a niche AI ​​updates these days It is becoming a big hit, again I am saying It is becoming very hit these days You know there’s a lot of A.I. What advancements are coming? Advancement is coming, what updates are coming Which new apps are available? What new softwares have arrived? What new things are going to come with all these you cover it here you will find it very good The next one that will give you a return We have a niche that is crypto stock Market Forex market means any one Capture the market and within that market go to any sub niche or you can go there teach me how to trade or you can go there teach me how to invest or you can go there on the fundamentals of those markets which These are the bases, let them teach you people, it is correct So this is how you can catch any market I can get good returns here Let me tell you that this is a very high RPM niche here You get good returns then The next niche is pronunciation based now like this There are channels, I might show you one or two videos It was shown earlier also which was just pronunciation Someone here is teaching you how to do everything Nich does not exist here you You have to play within quantity 2000 You can also make videos as many as 3000 There are words inside the dictionary, all those words that if you record the pronunciation Then maybe your two-three years of hard work will help you It will give returns throughout your life, right? The next one is futuristic Concepts now futuristic concepts What will cars be like in 2050? How will trucks look in 2060 In 2030, you will get laptops which are What will be the size in 2040? How much of these AI software are you? All these things must have become advanced for you If you want then you can cover this news It could be political news as well In this we also provide technology news We can also bring this in the news Also bring news of any project can mean that inside this also you have any one Now I want to start a category channel from that The next niche is that is app or software Tutorials Now you have seen I Bet many times youtube0 how do I work for example you that are stuck how do i delete history so you You must have gone and searched how to delete history of Google’s on Word document, this is all of us Sometimes you can go and use some app or If you search for software related things then You can also create content like this and again Within this also the matter of quantity will come up 1000, 2000, 3000 videos can be made easily Then the next niche is personality Now there are many personalities or personal brands There are those in the world at this time who are loved by the whole world Do you know, for example Elon Musk? Example Andrew Tate for Example Bill Gets for example Donald Trump you in On any one of the personalities Start your own channel and its news The one who is tweeting is coming, He is giving new reactions which are new He is giving statements, you cover them Started a whole channel related to that then do the next one which is below us that Is Investment Tips Now Investing It is such an amazing niche that you will find it here The RPM gets pretty crazy high You can also watch RPM here for $20 RPM say it can be found at 1000 The views you get can go upto youtube2 although the average This is the faceless channel for US audience it’s $5$6 you can teach this to people how to invest in mutual funds can you teach people that stocks How to invest in the markets can teach people that How do the Government bonds work in them? If you want to invest then your If you have related knowledge then this is good for you may prove to be a challenge then whatever our next nish hai that is cartoons and rhyme now yes ye It is a bit expensive but If you have a budget or you are an investor If yes then I would say invest in this niche do it because youtube0 niche can be quite good for this Inside you can take a very fit variety of views can right then the next niche is That is beauty and makeup now you can do makeup Can give makeup tutorials You can tell about the products of makeup You can affiliate products Can give tips related to beauty If you can give tips related to grooming then This niche is also very good then the next one Now nutrition is the niche of health is also a kind of sub niche but this it Self is a very big niche, there is a lot inside it too These all niches come for nutrition Athletes Nutrition for Kids Nutrition Nutrition for Grandparents Pregnant ladies can do any one of these Identify a niche and related content Let’s start and then the next one which is ours nisha hai that is cars airplanes or helicopters basically whatever There are things that you travel beyond you can cover them, people watch them a lot There are whole channels related to airplanes They are sitting with their heads open and the side of the airplane Seeing is also airplane related knowledge It also happens to those who are related to the technical If there is knowledge, people tell it like this We can make cars, we can make helicopters yes we can make trains as well as airplanes you can also make it right then the next one nash hai that is animals now from animals You can also create a related channel Tell people about elephants Tell us about lions and such animals Tell us about something that we don’t give much of Let’s see, let’s hear about them now The next one is Nisha that is about pets Now there is a slight difference between these two animals inside we are generalizing and pets Inside we only touch pets Now what is the routine of the pets how do pets think what do pets think You have to train in a way related to these You can create content and it is better You can see the pay returns here Then the next niche is that which is home decor or interior design now if you guys are females you must know that interior design and There are hundreds of topics covered under home decor. there are hundreds of things you can explain to people There are hundreds of things you can share with people on your channel if you can teach from then this is a niche for which There is a good amount of RPM inside, you will see it again can get it then the next niche is Motivation Now whatever niche is there in motivation They come that if you are fit You want motivation related to your Please give breakup related news on the channel If you want motivation, give it on this channel Give people business related motivation If you post it on your channel then next below is the drawing you can tell in the drawing can you tell me how to draw this how to draw that Now there will be no niche for it here You will have to pay within the quantity, whatever You know how to make it, just make it good searchable If you find out titles then we will cover this as well You can create your own channel and then the next one That’s for sure, that’s about book reviews now There are many categories of books in the world Not thousands, not lakhs, but crores of kinds books so you can read content related to those books You can create a channel from the next phase It may be religion based but it cannot be that you create content that Teachings of Islam in Easy Words Explain that I don’t want to do Islam, I want to do something else Religion: Do you belong to any religion? If it is then you can make it related to it, right There are many channels like this, many of us people have already seen it then from that The next channel should be an interesting idea It could be a formal education subject Your channel should be based, that is, if you Are you good at chemistry and physics? I am good at biology If you are good at mathematics then do something related to it We can create each channel individually and explain the concept to people Now there will be no end to this either If we are talking about physics then physics Small details on all the concepts of Create videos and rank them on search Let him get it done and then whatever is next is ours It is possible that it is skill based By grasping the youtube1 skill, people will Let us teach, for example, a sales related Create a channel related to digital marketing Make a channel, this is my own channel It is a skill based channel in which I teach people youtube1 niche can be language based Now there are many people in the world who are Pakistanis want to learn new languages indian bangladeshi we want us People who know good English should know English They probably wish they knew better Spanish may be that the spanish people go He wishes he knew German well. Let the German people wish maybe if they learn portugese then like this If you know any language then you can You can then create a channel related to it The next idea that we have is Sports based channel you can watch cricket related news You should create a badminton related channel You should make a tennis related channel Make many such basketball related You must have already seen the channels in which People are just talking about one sport Talk about the matches that are happening there The techniques that are used in Let’s talk about that, its analysis is You are talking about that, if it is right then you should do it then you can amazonbusiness.in making video of pc are you making a video of a gaming laptop There are a lot of gaming related The products are good and you are related to them you can make things then you can create such a channel On which you can get street food They are showing people the Pakistan Street food is like seeing the outside world The food streets of Pakistan which she wants what kind of indigenous way are they inside them Food is made and prepared This world wants to see you related to this You can create content by hiring someone can you go to Japan street Food will record the video for you I will record it and send it to you, you can edit it You will give him everything, he has his own idea It will be of and you will upload it on your channel And we can see very good growth on that too If you can get it then this is how you can eat street food You can also cover it then select the next niche We have Magic Tricks and Illusions Now you can see its clips online. If you come to know this yourself then you will go yourself You can also create content on this and this There are videos that have audience retention There are a lot of people watching the videos, that means people Start from the beginning and watch it all the way to the end Because of which your videos become very viral and last but not the least who Our Fort niche is that is what if scenario i.e. what if the size of our sun is what if our meaning becomes 2x what if the water in it runs out The mountain that is above what we mean This whole script should end You can find it online in Science If you have a little interest then you can do this You can create channels here as well Videos can go viral very quickly. Till here we have heard everything about Nishas and Nishas We have discussed it above but now In the next part of the video, we We will discuss all niches technically How to find out which one is which Those are the strategies that we can use to These parts help to find out the niches It might be a bit long but I wood suggest you watch it in full We have to look at things in detail and understand them so that You should understand this strategy here But the difference between one niche and all niches We will go to all the 13, 14, 15 nights will explore but it’s not like that This is related only to this particular niche All the information is there but if you Find out all niches of any niche other than If you want to do it then I will tell you two methods Here I will tell you the same two methods that will be used ok so now let’s go to the next video In the part where we all know Nishas Strategy to find out technically Now we will discuss first of all what we have The work that needs to be done will be done by keywords Understanding whatever niche you go into it has some keywords unless You may not know his keywords, we all I am unable to find niches, what are keywords that the people related to that niche who go Let’s search, let’s take an example A little deep dive into travelling niche today Let’s go and explore that traveling niche What basically is going on and What can we potentially do now? If you feel like traveling I I will create content on niche or traveling niche If I start my channel inside then you Like this without any research on any topic You should not start making a video You have to do this research, the research I am going to tell you about now I am going to show you so that you can become a big You can avoid competition and grow your channel A little early as possible now for example I talk about traveling traveling After listening to this I can assure that yes People sometimes relate these things to traveling You must be searching for example places in Put any city ahead, it’s ok places in karachi places in japan places in I would have used Pakistan as an example. hmm istanbul okay it’s a big tourist this is the city amy i just wrote this I did not keep in mind that on this Will there be competition or not or is this good the keyword is bad the keyword is it is just a The keyword is ok, I have entered it now. what should i do after searching this Some initial channels will appear before me There will be small ones as well as big channels. So it doesn’t matter, just start with these Open the channels in one of your external links I will keep it okay you have opened this also You came below this, you also opened this channel Now you have put the first filter in this I want to put that for example I have six You have opened channels, right? Out of these, those four channels Channels which should be crossed out immediately Complete travel related content not making it i.e. from half of his video It is related to travelling, rest it might be something else I’m working on a little overview Let me take a look at all these six channels whether these people are posting travel related content If you are making it then I get the idea from the topic jaega vietnam travel beautiful places ok garden rood south africa 10 high lights on a garden rude road trip ok This channel is related to travelling come into this and here also once briefly Let’s take a look at it and see that yes this too It is traveling related, videos come here in section a yes this is also good this sometimes talking about restaurants okay okay it is basically travelling related People travel somewhere or the other Get some idea of ​​restaurants too If you take it, then this is a little mixed channel But ok, I’m keeping it in my mind now Now I’ll keep all six of these, one by one. Let’s explore the channels and watch If yes then maybe we will have to remove some channels did you read it or not or all our 10 are from here Now definitely any channel should be finalised which You have finalized that you want to open that channel Her popular videos include Aana Popular After coming on the videos you saw what he These are titles, you have to judge a little Check out the top 15 videos here their titles are similar what are they like After all what kind of videos will get maximum views have come so you can see a little pattern You will see the 25 best among all these Places to Visit in USA 25 Best Places to Visit in Europe 25 Most Beautiful Destinations in Europe: 10 Best Places to visit in Italy i.e. one of You will find common keywords here, best places to visit in x yg city to First of all, note this down on your notepad. Get the Best Places to Visit in XYG That means you can set up a complete channel The only channel on which we can talk is this Hogi 10 Best Places to Visit in Europe 10 Best Places to Visit in America 10 Best Places to Visit in Istanbul Even if you make 300 videos here So it’s not like you have a video You will run out of ideas, see this here This channel has only 119 videos How many subscribers has he taken now? this is our all niche now here and so on No, we are not seeing any pattern, let us go ahead with this They also analyze on the channel that someone And there is a pattern that we can analyze here. Its top 25 most beautiful destinations in europe yes this could be a sub niche that Let us talk about the most beautiful on our channel of destinations and you can note this down as well Take the most Beautiful Destinations in x yg ok you can watch videos here Can make it the most beautiful destination In Canada’s Most Beautiful Destination Inn Europe’s Most Beautiful Destinations in istanbul in thailand in ex waji city ok i told you that x waji Means there are at least 100 cities here can fit this one lets us see the pattern or this is our most popular inside got a good keyword okay then there’s 30 Most beautiful cities in the world are on this We won’t be able to talk much until next time come on the channel come on the next channel from here its Open popular videos and there is no Start finding patterns View 10 Best Things to Do in and Around X Wise City: 10 Best Things to Do in Andaman and Nicobar Around x Waji City 10 Incredible Things To Do In And Around X Waji city ​​yes from here we know that Its most popular videos are around this idea where it talks this is the best thing to do in x was sure ok If so, we will take a note of this as well We got a third idea, this one This is a channel which is getting more traction Things to do and places to visit such as My take on the keywords is cross this out too Now let’s come to the next one and its popular Let’s check the videos now, this video it is not like that this concept was picked up that I should set up a whole channel no what will I do and see the top 10 Bali Travelers Paradise Top 10 Bali No Millionaire for a week this can’t happen how to travel yes this is one i noticed as a keyword aaya how to travel siago okay this is it How to Travel Bali Let’s see what Have any other such videos gone viral? a how to travel how to travel yes this one How to Travel the Philly Pines What That Means that we found this one more keyword number four How to travel and check here I get something now here’s another one and I’m on the pattern I am noting and that is top 10 Bali Top 10 Philippines Top 10 Thailand Now you can see these See this guy here has made these three made videos and all three of them are most popular I have gone so what is this doing that best Telling about Of Certain Cities That means best of Philippines best of Bali so This can also be a good sub niche, you can try it Also note the Fi Top 10 XYG and He is using some techniques here as well I am not writing just this small title Rather there is nothing inside the brackets ahead of it Click baiting is writing something attractive Get to the Right Your Dream Destination Here it is written Travelers Paradise It was written here best of Thailand so this We also got a good category and then more Let’s see if there’s any pattern in this Now this is the keyword that he has used In my opinion this is a big fate, is x YG worth the hype okay you can be any city Write for example is Istanbul worth the Hype is Thailand worth the hype so is this It could be a pretty good idea in my opinion yes, let’s note this down as well x Wazir worth the hype ok now do it with them what is the object to do after that vius i will tell in the letter or video but My first goal is to score at least 10-12 I should keep out such keywords about which we can discuss it later ok So this is a good keyword and with proven As a result its video has also gone viral hai ok the best of thailand can you Travel Bali with $ yaar this is also very good I have an idea, I’m noting it down right now can you travel x x vaji with $100 ok this is $100 also basically it is called as a x vaz ok we can make videos can you Travel Istanbul with $100 We Can Make Can you travel Bangkok with $500 can you travel lahore with $50 ok so like this It’s a sub nesh I tell you that why is it how is it that too later on hum video When I do research, we got it from this channel. I have got a lot of ideas, now I am doing this Let’s cross over and move to our next channel pay and see what this is discussing things is ok its not and Bali are the most popular videos Indonesia Travel Guide OK Best Things to Do Things to do in Bali: Best Things to do in this Best Things to Do I Think We’ve Covered If we have taken it then now it is an obvious thing I will not write again about the best travel destinations best things to do well this The keyword is this is a good travel guide ok number eight comes x y g travel guide okay now this is a little anchor videos why that Look at this you will see here that it has 39 A minute long video has been uploaded in which she Providing complete travel guide That’s right, another travel guide is the most popular 27 minutes end in section come down This is another travel guide that is 40 minutes long Means it is proven that this is a good I have found the keyword, this is a good one All niches have been removed XWJ Travel Guide now I have explored this channel quite deeply. We have done it but this target is only for two Only three keywords are said to be the best Things to Do Best Places to Visit and Travel guides would have crossed this as well then the next channel is there, you should check it you will appear in its most popular videos And let’s see what keyword we are looking for here I can lift it, I could not lift it the first time try can first time try can turkish Can’t we even afford street food? Why? Can’t pick it up because this is a personal channel that is why it is easy for this kind of making videos but when we do faceless channel If you go that way these things will become a bit difficult India Travel Guide will become a travel guide We have already picked up the things to do as well I have taken a road trip, I can’t even use this cant you where you should stay in bali yes this happened and then we have to check that Are more people searching on this or no but let’s not note it down wear should you stay in x vaji ok i have done this Okay, we noted down all the channels. We had taken out the maximum from them earlier I have put some more ideas aside now let’s see from there let’s scroll from there Come to where we searched earlier Places in Istanbul Maybe we should also visit here get some good ideas okay so this is a We got the video Mistakes Tourist always make in istanbul yes this is a good Idea number 11 tourists come here Scams in ACYG and How to Avoid It They got it right, this is our 11th idea These are the ideas that I’m coming up with right now I found this just by searching a keyword has taken it out and that keyword is places in Istanbul right now if I tell you this As many keywords as I am taking out from here no i just wrote it on notepad And I go to everybody youtube0 new and new ideas If it is right then mistakes will keep coming out Tourists always make a note of this too I’ll do it, from here I came to notepad and wrote Mistakes Tourists Always Make in Eks YG Ok, basically it’s tourist mistakes the channel is talking okay good here We Were 20 Things Not to Do in Istanbul yes this is also a good niche and a good Keywords Things Not to Do in XYG City I will note down these 13 things not to do in x waji this has also been noted ok So I think we have chosen a keyword very well I have squeezed out one more keyword now I can practically squeeze you in front of me I will show you then you will get the idea How to explore keywords and how new ideas emerge from there are generated ok scams in a I searched for use because it I had a keyword and you saw it here I might have kept a note of this as well Now I have opened five new channels The first of these five is this We will see which ones are in actuality Creating travel related content which We are making them, we will keep them and remove the rest If you give then I think that this channel is Not much travel related content was created because it is the nightlife here Discussing Indian Pickin Up German Girls this is ours who is blogging about it If he is also doing it then cancel it for now. Let us know about these hacks in videos yes this channel comes only and only for immols I am talking about this only, let’s talk about this a little bit We will analyze it next time we come on this channel go to the videos and see that Is this just travel related content Yes, he is making this, we will keep this with us okay remove this as well then this Go to the video section and watch it here What kind of content is We Found This creating? first impression honest first impression yes this is something related to travel ok so let’s explore this first The first keyword I like is a little bit of this It seems common that this first impression talking too much of x yg city it’s right i know that with this face There is a channel but still this work is without face It can be available on the channel also so bring it here Write number 14 first impression of aces Waji City then we came down so you can see this You can make this comparison video is like so and so city vs so and so city which is better this is a great niche You must have done your research on this I must do a Vaji vs ExYG well what you can do is you can Capture the country i.e. Switzerland Grab it and start comparing it Switzerland versus the whole world Norway Switzerland vs Pakistan Switzerland vs x vs any city catch it okay so this is also a good niche can you okay then I like this more on this channel Nothing was found, just a first impression got a good keyword ok so this too If we cross it, then we will check it all now. Now I will tell you another way Rather than selecting some channels going in to There is a video section where you can find the most popular videos videos a better one instead would be this You can come here and apply a filter After typing your keyword of view count You apply the filter here and you will get it here Those videos will start appearing on which Things not to do if you have too many views Do things not to do, this channel has come Open this The Dark Side of Dubai What They don’t tell you that this is also a very fit type of person it’s nice ok note this down as well 16 di The Dark Side Of X Waji What Can $ Get in dubai yes this is again a good niche what Can XYG Dollars Get In XYG Okay, let’s write down the number 17 here. what can x vaji [music] get you in x waji okay so this is also a it’s a good niche then let’s come down how am I Escape the Dark Side of Dubai Again This One And the things you will only see come out of the shadow c in xyg city so this is also here Note down number 18 Things You Will Only See in XYG City okay so this is another niche so I told you Two methods have been explained, the first one is that Start with a keyword and As many videos against are coming on top You should open those channels side by side By opening those channels and their most popular go to videos and see some patterns there Find out the patterns you notice Write it down, this is one way What is another way that you can search for a keyword Search here and apply filters Click on the view count in the filter and Then you are getting good ideas which You say yes friend it will cost around 100-150 rupees videos i can make this pattern While following you should note that also so You never run out of content ideas hoga let’s move forward to our chapter Number five which is keyword research Let me tell you this The most in the space of youtube.be The important things are yours Check out the keywords if your channel is at all Stuck, 0 views, 100 views 200 1000 1500 there are so many views and above no your views are going overall your entire I am 100% grateful to you for your channel without even watching it I can predict that you are searching for keywords If you are using it wrongly then understand this today that there are two types of keywords, numbers Which ones for One Searchable Topics Keywords should be number two browsable What keywords should be there for the topics I should have shown you in the start of the video Initially it was said that different kinds of Some videos are such traffic sources There is a search on which people can see that video they reach there and some videos are like this which when youtubers are shown their app when you open it or open the website then it is there If he starts showing his weight then both of them The strategy is going to be totally different In the first portion of the video, I will tell you this Explain the keywords of searchable topics How do you go about finding that out Totally a different game and browsable How did you select the keywords for the topics? This is a totally different game If it is ok then let’s go to youtube2 and see the things So Guy as you know that we had taken out all these 18 niches where We were finding out what travel niche it was How are all the niches taken out, one was the best places to visit in x yg here where It also has XYG written on it, its meaning Is there any tourist spot or tourist city Right, in the world I am 100, 200, 300 Tourist cities exist in those cities We will put our name here and this is one of our All niches will be completed, now you have added one in it Something has to be noted, all of these are definitely like this which are There is youtube0 which will take the views and browse So I can quickly go through these 18 features. I will divide it These are youtube’s, you will get views by searching on them or they may not come but The majority of views are going to come from here. Whatever I mentioned about them Let’s start with the search traffic How to find niche keywords now Although, to extract keywords from search traffic There are many ways, not just one but two No, there are not three but many ways. But in today’s video, I’m going to show you two ways I will tell you first that we use Vid IQ tool Second, we will find good keywords We will find out good titles okay so first of all let’s go from here Now this tool is very important on Vid IQ If you want to find good keywords If you want to do good SEO for them, then you want to rank your videos Now for example I am content travel I want to make it related and as an example basically i want to make them from lets should you stay in xyz i have seen this If it is finalized then I will write here wear should you stay in and I clicked enter from here when I clicked it is telling me that Its search volume is so much and so is the competition It is very high but definitely I have just No further whistle was blown due to this reason I thought that I will take out only that person on whom Competition is the lowest so I click from here View all six matching terms here I can see competition from this I will apply the filter Very Low Let me start first if I show you then this is telling that if you If you want to make this video then make it where are you should stay in Bujan now this must be some city If it is definitely correct then you should make a video on it competition is very low on this then this telling where you should stay in korea this You can make it on this as well, I think there is less competition on this and now I have entered where you are instead of should stay it is where i should stay in correct so now let’s see here that What are the terms on which videos can be made? I can come here for the competition Let me apply a filter and see what this is There are three ideas, there is very little competition here and the search volume is also appropriate, then this A video will be made on this as well, a video will be made on this It will be made on this as well It will be made on this as well It will go, it will be made on this as well and it will be made on this as well It will go on this as well, as far as our Competition is medium till then we can take our If I make videos then I will present it in front of you Have you selected any 13 yes 13 keywords? And you guys can go here and make videos and Chances of ranking your videos on this There’s definitely another idea in my mind It is coming that I write here where to stay in just i write this and Let’s see what’s here Ideas are coming, now see this is what happened in reality You will find more than 300 keywords here. Keywords are being seen and ideas you are not going to end here ok so what do I do here is filter I put my focus on the competition and whose competition tell me the lowest one that is wear to stay Overnight in Jeddah Airport you can do this Make a video if you have to stay in Japan You want to party, make a video on this You have all these keywords now all this Pay yes, videos can be made on all these I am selecting as many as I can Competition is very low, see how much The keywords have come out oh my goodness this see even till very low if we even reach here If you select then at least above this At least no more than 50 keywords I have given it to you, okay then If we come to medium competition then there also there will definitely be a lot of them If you see, the competition is not ending It is in front of you that you can even watch videos so I just made this I have found the matching terms, then come here there are its questions sometimes these questions Different matching terms are coming Different things are coming up related If the keywords are different then you can use these Explore everything and become different from the different If you can generate ideas then this will happen I just touched this one of ours and that too of search traffic now its other than that how can we do that here Come, write here where to stay in this I am going to tell you another way how to Ayaz can now find as many as you want Ideas are coming to you starting from The top one which is on the top, people are the most on it Search more, its search volume it is the highest but definitely its There is a lot of competition to see as well If you get it then how to eliminate that competition I’ll tell you that right now, what it means there are too many ways right it’s good For example you have Istanbul related you want to make it okay then you should not do that you Title a video Where to Stay In Istanbul there will be a lot of competition on this Let me show you how the competition is You searched for it, then you pressed Control F Press OK and then press Ctrl+F By doing this you have copied your search term and paste it here you press enter if you do it you will see that there are more than 30 People have made videos on this so that means it’s too much It is competitive and I have to make videos on it right now Maybe I shouldn’t make it, okay, so something else Let’s search and see how much competition there is beyond that Let’s remove the betel and pay for it here If we look at the example completely, then copied this and then pressed control-p f That is, it is used to find Then I pressed control v and this too About 26 people have made videos So let’s leave this as well and come back again and Let’s close it from here and from here We write Singapore and let’s give space further okay so Now when I give space then some new and Long tail keywords show me these will start it in which Singapore will also be If it will be included then now I will make a video I make you wear to stay in singapore on a Budget Edge Compare to I Make Video Where To stay in Singapore is my long The video with the tail keyword is its rank There are high chances that I will try this once Let me hit enter and show you how to do this But after all how much competition is there which is right It was going to have 26 searches, that means 26 searches. The results were coming, now check it once Let’s see how much is coming for this Here you can see that there are only three People have made videos on this thing. You can also make your own video on this You can rank your video on top here If not on top, it will come second but third It will come but it will be in the top three positions At least you must watch your video you will get it so this is a good title on which Your video can be made, let’s do this Close from here and now come some more searches let’s do it okay where to stay in Istanbul Now write Istanbul here After I will give space and after giving space I will I will write for tourist and now I am here I will come again and search for it, okay so this See if anyone has written anything on this topic. The video was not actually made wear to stay in istanbul for tourists alright so this is a it’s a good title if you make a video on it If you make it, your video can come on top. if you have done good SEO but if your title is not good so forget it go away your title is bad so score is good If your score is 100 then your video is not ranked it will but if your title is good and Use SO Score with IQ Extension Or use Tube Buddy’s extension By doing this your donation is coming close to 7080 Even then your videos will rank on top I have just presented these keywords to you. I have shown it to you again, I will show it to you again I’m finding control and here I am I have pasted this in front of you and here you can see that there is one by one result i.e. At only one place on this whole page keyword is used so this is a Excellent keyword on which you made this video If possible, we have learnt till now that The way you would research a topic is by using keywords. Will do research for searchable videos now Next we’ll move on to how we Topics of videos need to be found out If we make our videos viral do you want to go or our videos are such that Views are going to be taken through the browse That’s right, you already know the difference between these two. I have explained earlier that we have searchable Now we have talked about the topics of the videos Discuss topics in browsable videos If you are interested then let’s start with the same the niches which we had kept aside for these Today we will discuss a little about that friend if I select my niche is a what can $100 get you in x vaji I will make videos on different cities and I’ll tell people you can get this for $100 What can you get in the city for $50 What can be got in that city? Related How do I find out the title what should I title my video Should I search so that I get maximum views? The very first step is this that you go once and get some title You have to search and see what is related to it Can 100 get in ok now this is something in front of me If there are suggestions then I can search anything I take for example this one my video I haven’t finalised the title yet But once I randomly went to that niche Entered some related keyword Now after entering this, first of all you You have to open the filter. By opening the filter you have You have to click on view count and view Click on the count to make sure you have it Vid IQ extension is mandatory install It should be because if you have a Vidak key If the extension is not installed then your time will be wasted There will be a lot of consumption of Vidak How to install the extension googlegroups.com [music] Since I already have it installed I don’t have the install key but the remove key the option is coming to do it okay now What is the benefit of installing it, see for example I just google2 is also showing up and this is very important It is more important if you have an extension If it is not installed then the subscriber will show We won’t have to check each channel one by one You will have to open it to see its subscribers You will come back again and read the views here If we have to see it, it will become a big issue now I did a random search on this, now I search I will see if I can find a channel like that. No matter how many subscribers he has, The views that he has on that video are less less than multiply by the number of There should be subscribers for example It has 10 million subscribers so I Can I find any video that has 30 I may not even get a million views, maybe it won’t happen now It has around 8 lakh subscribers. Its views are 5 million yes it is mine It is completely meeting the criteria, that is the number of subscribers it has Multiply by three or more than that views then I come down and here But I will see that yes it also has 1.2 million subscribers and its views are 3x this is at least greater than then come down 2.2 million yes this is the video of this Views as truth is not that much at least Not more than 3x but we’ll see If it’s random then we’ll know yes friend 3.7 Even millions are a lot so the first did you understand the criteria that Videos that have as many number of offs There are subscribers, multiply that by 40% three he got views of the idea he came up with I have used that idea and it is winning If you use that idea then your The video also went viral because of his channel That means if you have 5000 subscribers right now So your video also has 15000 views, right? Will she be able to keep the potential to go, now see this That how many people here want a winning title I can bet a lot of people might be using it You might be using it like what can $1 get in vietnam worlds cheapest country now Maybe this title and something else comes below People have used it, see what can $1000 Get in Vietnam World’s Cheapest Country means this is also the same title and this too That’s the title, okay, just one guy copied it 100 L has been created by another person Go for $1000 and sell the same video idea Even brackets have been created by copying them The same words are written inside as well – Worlds You can get the idea of ​​the cheapest country from here It is known how many times a winning title is earned People use it, now see how much it is I got a great idea that I will earn 8 lakh rupees Subscribers are and 3.8 million views If yes then this is a winning idea, you can invest in Dubai remove it to Thailand remove Thailand that you make it Maldives by removing Maldives You do something else, similarly you withdraw $100 Let’s make it 1000, let’s make it 500, let’s make it 50, this is not an issue either but actually here psychology has been used that is winning You can use this or any other from below Let’s see if you find another niche of yours For example, things you will only see in Eks YG City now this is a little let’s explore here i come and I write things you will only see in And here I will put Dubai for Examples come from here, applying filters yes we put the view count we put the view count We are posting this because we are getting viral We have to create ideas that go viral If you want to find out videos then go viral We will get the videos only if we filter them We will try to find out the most viewed videos Right ok so after applying the filter see this It has 44 million subscribers and 14 We have millions of views but we are not content oh my goodness its 4 lakh subscribers and it has 14 million There are views that mean this is crazy Now see the idea when videos go viral That is the thing, there are many topics there too It is important and the thumbnail is also very it is important means I absolutely I will give equal priority to both Your videos will only be aligned together If there are chances of it going viral then The video has gone viral to such an extent Nor is its thumbnail amazing anywhere okay then let’s go down a little bit and this See if its just one lakh or 5 lakh subscribers and has 5.7 million If you have views then this idea is a winning idea 11 Things Not to Do in Dubai That Must See before you go but the thumbnail is also very important It is important as I told you earlier If the thumbnail is not good then why will it not get so many views will not come now see this idea has 1.3 million subscribers and 4.6 This is the exact title as it has millions of views The guy has also used it, come down Maybe other people have also used a let me See, this guy has also used it it is there and this guy has also used it and One more thing I’ll show you is this thumbnail see this one and come up and these thumbnails See this one see its title 10 things you can only see under a microscope and its View title: 10 Things You Can Only See Under a microscope, this thumbnail looks the same The title is the same and so is its video It has taken good views and when you come up you can see Its videos are also getting very good views if it has gone then definitely one of these two He must have uploaded his video first did the research but the one who later I have uploaded it, he must have seen that friend this is a This is a winning title This is a winning thumbnail ok let me also print it as it is and I also show it as it is on your channel If I upload then its video also again It took very good views, now you see this He is also using the same title He is using the title and everyone’s videos Everything is going well means everything is good Even he is performing, see him here The channel is also the same, that is, the same channel has the same This type of video has been uploaded twice Dalia 2 years ago A Dalia 3 years ago He knows this is my winning title My videos perform well here The 18x that is written on it means that Its normal videos or average ones There are 18 times more videos than this one It has performed well and on the same channel Same video with same title 15 His performance has been much better From the average video, here you will get the first Technique revealed to know how to win titles after that if you enter the same thing and apply a filter apply a filter that you click on this month and with If I click on the view count then here From this also you will understand that friend, someone A video that definitely doesn’t have 3x views But even if we get at least 1x views goes i.e. the number of its subscribers If it has got that many views then That is also a good title and that is also a good performance There is a winning title here, it will do wonders It has happened i.e. there are 25000 subscribers And it has got 6 lakh views and that too in 1 month inside then it will copy the title or Video of the idea which this guy will copy This is an extreme will go viral Winning titles then come down and down Let’s see that it has 21000 subscribers No, it doesn’t have 21000 views yet If it happens then let’s leave it and then come down Come down and see us 291 of whether you get the winning title or not It has 128 subscribers so far leave this as well leave this as well let go of this as well let go of this as well No, we just need a good title here. so this is another way that you Apply Filters Click on View Count Pay this month and if you want then you can pay between 4 to 20 Also click on the minutes and see that The number of subscribers you see If it got that many views that is also enough inside me We don’t need to go any further than that We don’t need 3x or 4x more Collect videos with lots of views then make another one I will tell you the method, let’s go back and By going back you can download the Vid IQ extension you can also find out which one How long does the video last longer? like I told you earlier for Note the example here which is this one Signal provides extension of Vid IQ Tells you how much better than the average If performed then 10x or more Are you seeing any video more So that too is a good winning title for you could be like this is 8.9 one not very good this is more than 100x then this is a Very good title, this should also be a criteria maybe this is 4.2 this is two this is 49x so This could also be a good title then below oh this is 14x this can also be a good title You can find the names of your cities under these titles You can change the name in these titles Make some small word changes It is possible but the concept must remain the same OK, so I have told you these three methods now. I will tell you another method, you can find it from this channel Open this channel and you will see this to analyse whether this entire channel Is this related to travelling, if so? If it is related to traveling then it is very It would be good if it is traveling related If not, then go to its videos and By going to videos you will find most popular If you want to click on the videos then If it is related to traveling then we have to know everything You will find only traveling related videos If it doesn’t happen then you should see that if traveling Any idea related to this became most viral If so, I’ll copy it If you see anything related to traveling then it’s okay If it doesn’t come then move to the next channel If among the top 30 most popular videos Are you seeing someone saying yes friend this is mine If it might be useful, pick it up and Start copying that one, then another one The way could be that with the help of Vid IQ You can go here only with the help of extension And click on view trending videos Do it and it will give you videos that The views are coming regularly and the You are getting the most views on the video will show first then find out from these Tell me friend which is that video on which It is still getting views even after 5 years It is old, even if it is 10 years old We don’t want to see this thing, we want to see that You can see in blue how many views this is getting It appears to be written in colour that It is getting 2374 views on this on video again similarly this 1 year ago It has been uploaded and still it is getting 1300 views then we look for something old like This is a year old video and still It is getting 624 views per hour so if If it is related to your niche then you should so these are the ways for which through we can find the ways that Your videos can go viral You can ask me one or two very quickly Even within three-four days, your Videos can grow at a very fast rate As we saw in the previous example That within four weeks his video got 6 lakh views has also crossed it, if it is correct then like this You can also find out these things easily If yes then Vid IQ is very important role If it plays then it is in browsable videos if you want to go then its extension will work If you want to go to searchable videos then go to Vid You should use the IQ tool to its fullest So our chapter five will end here. This is complete about keyword research Hope you got maximum value It will be related to keyword research and whether are your videos now searchable or your Trending videos are your greatest Curie would not have been straight forward now Let’s jump to our chapter number six on the side where we will understand that the videos How the script is crafted See if your video has a script It’s not good, it’s not engaging, no matter what you will get good CTR like I explained it to you in the first video, CTR is very very important but along with that average view duration is also important and watch time is also It is important if your script is good If not, you will get average view duration It’s too bad if people enter your videos So I will do it but they will say friend how much This is a boring video, let’s leave it are so for that we need to understand that How to write a good script Understand things that if your video If the duration on average is 10 minutes then your The total number of There will be around 1400-1500 words you will know the number of words You can further prepare your script accordingly will do craft okay so first of all I Let me tell you what the tools are using which you can write a good script Right now we can get it written down and we will sit and copy it And you can’t write a script with a pencil Infact what we have to do is to get it written You have to find out such tools online we have to use the tools because of which our The script is a little quicker and better If it can be written then there are many tools for this I am also giving you my personal recommendation I will tell you later, but let us understand that Which are the number one tools that we have right now We have GPT 3.5 and GPT 4.0 Jamna we have many blogs On the internet, we can refresh them and Do good by adding your own value we can get the script out then we have Quill Boat which is a refreshing And it is a very powerful tool also we have Agistify there are five resources or something inside them There are tools that you can use to get a good Now you can get a script written for a video A bigger frequency And by creating your visuals according to your needs, Should I stick the blog back in? youtube2 brother with those who ask youtube2 can do plus which of this content They are the owners, you can also find them here Panelized Pick Up By using youtube4 or any such tool By using it if you are saying that I have done this You have taken a very big step so I will tell you I would say that you should not do this also with human touch You have to add your own value in this You have to add some time to this I have to put money on it because it is the ultimate The game is that your piece of content is nowhere It must be somewhere unique How to use youtube.co? for him to get the script out Straight Forward Lee Let’s Go Chat GPT and go there and do this thing properly I understand ok so I will chat I have already come on GPT for example There is no video whose title is written that is around just taking it as an example discipline is ok let us make a video on discipline but firstly i need to know about chat gpt I have to give him instructions that I should work with him What am I going to get done with Chat GP If you will directly tell me that I have to do this like this If you write it down like this, maybe its result will be may not be as optimal as the good result You can get it when you use Chat GPT first give him some instruction and then Realize what kind of experience we have from him I have a small book for that I have copied the C line which I have posted here I will paste it on you guys even after reading it. I will tell you and you will see from it that The memory will be updated, I will tell it this I am saying that hello charge pati act as the Best Script Writer As I Need To Write a script for my youtube’s youtube3 engaging use as much easy as wading age you can and make it human sound a video On what do they do that now you can see it I will tell you the topic and it will tell you the whole story. I will take out the script and give it to you first Let me tell you what the wrong way is I’ll tell you what would be better If you had done this for example my Video topic is power of discipline now you Let’s see what script he will give us It wouldn’t be as much fun So I will tell you the other way I will teach you and tell you how to be a friend what is it then you will get to know that good I’ve been making this mistake before I want to implement it in second method well he gave me the script here you can see it first he gave an intro hey welcome back to the channel today we are talking about something that has the potential to completely transform your life it’s not money it’s not luck bla blah blah okay then after that he said that I have made the sections myself The Difference Between motivation and discipline then that he is explaining it then why Discipline matters here, these time stumps He is also telling me that you should carry it like this ok then he did this this is exactly It will not work, it is neither engaging nor there is no really good hook in it, right? The outline is defined by what we have discussed earlier Do I want to say anything about it? Do I want to say anything about it later? The first thing we need to do is this I would say that it is craft and outline of this video for me first give me proper sections of the video you are going to talk about it first then i will Ask for the complete script I am I will get the entire outline written first I will get the sections defined for our video What type of sieve is it? Will it be told first? will it be said later then which of them I will feel fine about that, I will do more than that I will take the description which does not seem right I can manipulate it in the same way and I won’t even ask, okay so this is how it made me I have given you the complete structure that this is your First of all we will have a complete outline we will do the introduction, there will be a hook in it where But we will grab attention and then we Who will introduce the concept of Discipline as a Key then we will say differentiable in this Video We Will Explore the Real Power of Discipline: How It Works and Why It Works Secret Ingredients We will come back to the story in part 2 Then we will define discipline The difference between motivation and discipline We will go and then we will tell you why motivation Relying on pay often fails us okay after that there will be section three then There will be section four, then there will be section five, then There will be section six and then there will be section seven it will happen then it will be at and at the end you will see that there is a conclusion and a call to action if you Are you ready to start your journey towards a More Disciplined Life Hit the Like Button and Subscribe for more videos like this See now I have it all sorted out The outline is ready, now I will do this one by one I will define the outline for example I need an introduction to this I would say that first of all tell me this thing what is this let’s copy this and paste it here Let’s paste it here and write give me A The hook which should grab attention with a powerful Statement and Relatable Question do not start with hi hello this We have entered here, now see this Ever Wonder Why Some People Seem to Achieve Succeed Effortlessly While Another Struggle Year After Year The Truth Is It’s Not About Luck and talent it all comes down to one thing That is discipline and if you muster it you can change everything in your life now from this I took out this one thing that I liked the most first i have to tell you this ok now this is good enough I am going to get everything removed at the end. I’ll do some editing later I will add things as per my requirement but So far it has given good results then I will call it brief Introduce the concept of discipline as a of differential now it gave me this but I would say keep it a A Bit Short and More Interesting End Motivational Only if there is an ad in it, people will watch it and we will engage on this so here it We should have found a much better statement than that. You have given the discipline yourself is a silent force that drives success and What is discipline saying here? What Separates Dreamers From Achievers It’s Not About Working When You Feel Like It It’s About Pushing Through When You Don’t So this is enough Motivational scriptwriter blah blah bla you copy this then you I have to tell him to draw an outline for me two about this particular video topic In which you have to give me proper sections Once you have your outline in front of you You have to see which thing suits you in it You do what suits you each and every one and get it written from him but directly do not go and paste this thing as it is Take it and see if he is giving the wrong answer so he has to do it like I told him here I corrected it saying yaar keep it a little short And keep it interesting and a little motivational Keep it because this was the demand for my video So you’ll have to apply a bit of your mind to this You will have to spend less time to extract the script of the video at least at least 15 20 minutes or half You will have to pay the hour only then you can go and get your work done It will be very efficient and of better quality It will happen so I hope that you have got it wrong here You must have understood what the method is And what is the right way to make a good script You must have understood this way of taking it out, okay So here goes our script chapter. It is complete now let’s move on Chapter Seven Pe Which Is About Voice Over I hope so many people’s minds I do a lot of voice over related work. There will be questions that you will not understand Also brother, should we use voice over or not If you want then which AI voice over should you use? If you have to do it then which character should you use? Which character should not be used in this In this chapter, I will tell you all your thoughts. I will clear all this in my mind, so tell everyone First, let us understand that human voice Over AI voice over and human sounding voice What is the difference between an over and What is number one for us, better than all others What is human voice over which voice over is now are you listening to my own voice or We will call it the voice of any human Over human voice comes number two AI voice Over now you must have seen the wildest tools like this Which offers you AI voice over in today’s time We are doing a complete list of those tools right now I will tell you more in the next video I will also tell you about my favourites But you know that nowadays this thing is very common. There are many people using AI voice overs but there is a difference between these AI Voice Over and Human Sounding AI Watch the voice over that you hear through AI They generate overs, some of them are like this which have a very robotic feel It seems like a robot is speaking, a machine she is talking but some voice overs are like this There are those who, after listening to them, do not understand that Dude is this a human talking or is this AI Voice over is generated through Although it was generated through AI. it happens but no one can These are the voice overs that are different today Most of the people are working on this Be it Pakistan, India, US or Canada Whichever country it is, maximum people right now Are you using human sounding AI voice overs? Because their cost is extremely low There is very little effort in this and whatever you have The output is too much in very less time It enters your mind after that The question will be that friend with AI and O See if you are monetized or not if you Robotic aeos will be over used as i Definitely explained to you in the previous slide. Your videos will not be monetized but If you use a human sounding voice over Your videos will be easily monetized It will go but there is a small catch here that if you Out Voice Overs Are you channel monetized that means there is some voice over behind there is no sign of you driving anything in front of you Is there any presentation, any natural scene? is recorded or any scene in which If voice is not required then why such things It gets monetized, friend, this is very very tricky this is a very tricky thing in this if If you are an absolutely experienced person then You should try that with voiceover go ahead but if you have a little If you have experience then you will know that voice Channels would have been monetized even without overs Yes, videos get monetized but very That thing needs to be looked at more sensibly what alternate am I using am i recording a scene In which the background noise is so good or is it so different and unique that it Exact sound in someone’s video If not, then that video will be monetized by you. will go away if you play background music They are relaying too youtube0 free music download and recorded any scene from the front If you put that thing in the background then friend that I would recommend that you start with don’t go in that direction now let’s come to that Also brother what are your favorite tools The tools I use to make my videos If I can monetize then these five of mine There are some favourites out of which priority wise The most favourite one of mine is that is 11lbs which is very expensive and its The quality is also extremely good m.o. a is again play.in there is ways labs.com These tools you You can also use and eVoice from here You can generate some voice overs You can generate it for free anywhere It will cost money too, that is the next question that friend Saad bhai is there any Jugaad that somehow I can use free AI voice overs for anyone If at least I can save my money like this then I would recommend that you guys Post if you have any solution for this You will obviously find it inside the community Because of youtube4 we can directly know this thing can not disclose here Right, till here things are clear to you Now I will take you to another website On which most of the people’s question is it happens that brother you use 11 labs There are so many characters in it Are there more people or more AI There are characters among these that I don’t understand Which one should I use and which one should I not use so brother can you tell me something which ai character should i use I will definitely say no to you but I will give you that too I will explain it to you, okay then let’s go First 11lbs come on first let’s go 11 in the labs and inside the 11 labs that I have The most first pay favorite is that is Antony Logic Will Get You From A To B Imagination will take you wherever you listen that you already heard its voice Lot’s of People have also played many long formats This is the voice over that is used so if you If you want, you can also use this Using it will lead to demonetization of your channel A little voice Let us also understand the settings of 11 labs Inside we find these few voice settings out of which the second thing is Do not touch it as it is by default let it remain as it is whatever is above if we move it a little on the left side If you bring it then write the result to us here Do not even take the extreme left side and Do not take it too far to the right a little bit to the left ok 45 to 65 I’ve tracked us down here The best results are obtained after My second most favourite is that is at the and name as t th now this is what we call it Read out the paragraph for us we recorded the paragraph here ok so just listen ae voice overs have revealed Shanaz The Content Creation Landscape Now It gets a little bit particular where you need to speak a little slow where you May I also talk about some meditation or Are you talking about a big spiritual level? are you there to find this voice over artist you can use keep this in mind that Every voice over artist is not for everyone In any niche we will do a voice over Artists use it in some cases So now you have to do this yourself according to your niche. I have to select from it is correct that was my The second most favorite now moves on to his third on the most favourite side which is michael you Listen to this, trust yourself, you know more than that you think you do what is the matter friend at all I can’t imagine that this is a human being’s Is it a voice over or is it some AI speaking this? ok so this was my third most Favorite Now let me tell you the fourth one that is Josh as an organizer I started from here The World as it is is Not as I’d Like It has to be amazing friend, it is amazing you too You can use it for your videos here From this I select Josh and once I will also read this paragraph to you I give you a aa voice overs have revolution the The Content Creation Landscape Provides a Seamless and Efficient Way to Generate High Aya that it’s not fun what does it mean friend The thing is here we have four male voice overs Artists are now a little complete So let’s discuss females as well The Most Favorite One for Females from my side is rachel this is really great one if you listen to this then see a voice over is there Revel The Kant Creation Landscape Provided Seamless and Efficient Way to Generate High Quality Dio is best if you are watching female oriented channel If you are making it then you can use this voice over in it you can use the artist after that if Let me tell you my second most favorite The female voice over artist is Sara this knowledge has its origin in our perception He is the voiceover artist that you have seen a lot. You must have heard on the channels, I don’t know that your how much exposure but I have seen it a lot From anon this is a good one after this seventh voice is an over artist meti ma a voice overs have revolution the The Content Creation Landscape Provides a Seamless and Efficient Way to Generate High Quality Audio Kya Baat Hai Yaar Extremely Human Sounds so here in our 11 labs Here are my favorite AI voice overs from So I told you okay so this chapter You must have understood well that What are voice overs AI voice overs Which characters to use and which not to use I have to use it, how to use all the things I gave you the link to my community. I gave it to you as well, there too someone came and said something more If you have any question, you can ask it there too so now moving on to chapter number eight What is video editing about first? First of all let me tell you these things Watch video editing and nail designing This is a complete skill, that is, people Many people sell separate services for this thing There are many video editors in the market thumbnail designers are in the market but The guy who knows how to design thumbnails It is not necessary that he runs his own Facebook channel Any person who knows how to edit videos It is not necessary that he runs his own faceless channel Because running a faceless channel is totally something different and video editing that’s it Small one having weightage of 5 to 10 This is a subject which is definitely for you people You must know video editing if you If she does not come, then there are separate big ones for her. There are courses if I start teaching here If I give you one hour, we will just do video editing. If we keep discussing that part only then Where to learn video editing skills Definitely you are Azad Chai Wala Free video editing from youtube0 The courses are already available and there is also one more I will tell you the resources right now Let’s go to the video but before that you Understand what the tools are copyright After picking up the free material, see if we can I am not going in front of you with my face right now I’m in front of you with my face There will be no one in this world who Record the exact same clip and youtube0 is it real or is it my real one I have my own identity, I have my own way of speaking I have my own style, anyone has their own ambitions The whole world cannot copy this But when we have to go faceless, right? We are looking for copyright free Resources are those resources on which someone’s it should not be copyrighted so that we can use it and We should add our value to it Because of this our content looks unique and that Let it be monetized t free material website so right now I I am telling you but the material from here How to make it unique after picking it up We will now discuss this in the next slide. First of all, let us see that Where to pick up content Basic content Number one story blogs which is the best Platform Mostly Niche content here You will get what I gave you first It is written that this is most important and the second The most important thing is that you also need it now let me tell you, anyway the second option is Inviting elements is third and motion is fourth is pexels.com pixabay.comunsplash.com youtube0 number one story blogs and jo I told you at the end youtube has all the content which is copyright free if it happens i can use it too you can use it too how to use it i you These are the number of videos that are coming I can use their clips easily Nobody hit me with a copyright trick I told you earlier that I could but keep this in mind just told that Now after that comes what tools do we need You need this much to do video editing People will be aware of the cap cut committee from this fara prer p pic tree in video you can see you can use it but the best one which I have always used it and you guys I would also recommend that you use it That is cap cut cap cut is a great kind A tool that almost covers your 99 per cent needs can cater and i would recommend that you use this only ok so value addition How can you do these video editing I have written six, seven, eight things in front of you. why do you have to do this again i told you It has also been stated earlier that youtube0 many free videos you can choose You I want to do youtube0 for example The sound in the background could be You can make it a little unique in some way The transition you use in it is You can make it unique inside It could be the effects you are using you make it unique because of that if it The video looks like this if you flip it Maybe I may also give you a video It becomes unique if you make motion inside it I will add graphics, maybe then your The video becomes unique if you If you add text then definitely it will be yours The video will become unique only if you add voice A nice background with over Music a little unique background Even if you add music, your The video can become unique, you can say something above Even if you add PNG, your video You can add some popup sounds to make it unique Even if you do this, your video will still become unique. You add some filters Even then your video becomes unique now For example, I took one story from the block. downloaded the video you did the same and The third guy also posted the same video, exactly the same I downloaded the video but I tried different Effects on transitions While doing different types of editing I installed different motion graphics put background music in it There is a third guy who has applied PNG filters. He put text, she also put motion He applied graphics with different transitions When I put it, that same video of yours became my unique one also became unique and that guy’s also became unique gay this is called value addition in copyright free resources that you can use when you You are not going to get any strike Obviously because it is copyright free and no more youtube0 don’t understand that friend four websites I downloaded four videos from and added them This faceless video of mine will be uploaded like this Your content will never be monetized because it is not unique now i will tell you I’ll take you along and tell you that if You should learn faceless video editing properly so where did you want to learn from There is a 2 hour video in this youtube Complete, I have taught you how to You want to do faceless video editing from How to use these things It is very important to make these things unique in some way There is more value and it lasts for 1.5 hours This is a master class so if I spend an hour and a half If I start teaching you this course here then Video editing will take too long something different and you can see it here who will get it so till here our video The chapter on editing is complete now Let’s move forward to chapter nine which It is about thumbnail designing, now you have read this Keep in mind that in letter on video I have just read a big chapter, one of the most We have to discuss important chapters now what was about this business here How much does the investment in tools cost Which ones do you have to buy? The chapter is very interesting, move forward and many more things in the next video Particular frequency is a separate skill which is very expensive and This is a great skill if you have some You can’t even do that if you just want thumbnails If you learn designing then you can do many such things From can provide services to and You can charge them regularly because Whoever has a faceless channel, this week I need thumbnails from next week too I need it next month as well as after a year and 2 years If you still need it then this is a good service which that you can give and make money from it now understand this that this is very very It is very important the first one which is most The important thing is that it is keyword research or title selection topic selection thereof After all, the most important thing is that it is your Thumbnails If your thumbnail game isn’t good especially if you want browsable videos Heading towards Browse through views are coming then if your thumbnail is good Your video doesn’t have that many views you won’t be able to come and if you are in to what is the kava now kava in pro1 150 pro1 you can also use cava for free Use the one that is free Your thumbnail could be made here then the second most important that is and you will find many types of thumbnails If you do professional work then it makes it if you are going towards such work are where you get the views browse from then i would suggest you to do this or don’t go towards kava phra then you go The question would be that brother, if we use this AI If you create a thumbnail using the tools will our channel be monetized Definitely your videos will also be monetized Everything will happen inside the thumbnail through AI Using any tool related to this is not a problem There is no restriction I have to write YouTube’s by myself Good colors have to be used to get good fun If you have to use it then you must do it and you have to do that manually Now you can design your thumbnail yourself I have a skill, I will sit and teach it, it will take a lot of time If you go, I will give you another resource I will try it, link is below I should put the video in the description as well More thumbnails of the resources you are editing It is mandatory for you to describe the person once as well check it ok what do you need to do youtube0 25 minutes long approximately 26 minutes in which training will come I have taught you that this kind of how do you create thumbnails or the way that’s how i make thumbnails How to create and make faceless thumbnails That is also taught in this video If that’s right, then you have to watch this training. It takes approximately 26 minutes to complete You will get good value that nice thumbnail What happens and how is their editing done? how to make this in photoshop You will get all these things in this particular 26 minutes You will understand it in the training so let’s go now here we are moving on to chapter 10 which is about If you want to take YouTube’s viral then SO does not give us any work at all Then those keywords work. Infact if we have banked the videos it happens then SO gives work and this to Are totally different things browsable Videos and youtube0 is close to zero in terms of views that is that two million 3 million 4 million Practically it’s too much, I’ll tell you Taking it to the laptop screen also made an I will show you such a video so that your Be assured that yes friend for every video SO is not that important now I am here After searching youtube4 cars car here I click on Filters on Filters I go from here by clicking on Most Now here on popular i.e. view count Many videos are coming in front of me, one video It is coming which has 2 billion views for For example, I open it, friend, how many Niche will be any SEO that is why its The video has 2 billion views i.e. 2000 million views okay now from here its SEO I will try to find out the score To find out the score you have or So Tube Buddy extension should be installed Do you need or have Vid IQ? I must have the extension installed Here is the overview of Vid IQ I will click and scroll down to End You can see that its SEO score is that is zero out of 100 means 2000 million Despite the views it gets, its SEO score he is zero i.e. the one who created this has not done any SEO on it yet it is 2000 Have you got a million views or two billion views? If you have come then from here you have your You must have been convinced before your eyes that Dude, if I want to get views then I will do it every time SEO is not necessary or not necessary in every case It is not necessary to do SEO on your own Matters when you rank your video on search well now on the other hand I would have been I will show you a video that I am searching for the ranking on search. I do it for example how to change instagram2 97 out of 100 97 its ao This is the score, that is why it will be released in two months It has received so many views and its video You can see this in front of me at the top The video is ranking on top just because that its seo score is very good from here You understood one importance that Where to do SEO and where not to do SEO now I’ll take you along and tell you this how is SEO done which are those There are six points you need to cover then will your SEO score be maximum or your SEO will be really good so let’s Discover that now first of all we discuss We will use keywords because these are the most It is going to be more important when it comes down to The first point is understood, after that what The second point is that it is a 10/1 What is a keyword? A 10/10 keyword we That is called the one in which number one is his Search volume is there, that number should be good So his competition should be low And number three keywords like that at least Channels must have used the questions now This will come with us brother, how do we find it out Let’s find out which keyword is being searched for Which keyword has good volume? If the competition is low then I use only one tool for this I will recommend it to you guys and that is Create a free account on VidIQ After that you will click on keywords and Now you can enter your keywords by clicking on keywords will start searching for example I want to make video editing Related I am good at editing I am just finding out some keywords i am working on If I can make a video then I will first post it here I will come and do a broad term search, which is it After searching editing editing I From here I will click on the matching terms and I’ll see which one suits me best which of these things should I choose and use I can create a video below I am coming, I think what suits me That is this I will click on this and By clicking on it I will come back here again I will click on matching terms. By clicking on the terms I will see that I what of this might be suiting if this suits me more then I I will click on this now I will click on this After that I think this is the one on which My video can become yours once You got the keyword of your choice and you did it. copy it from here and by copying you have made a You have to open a new tab from here we’re going to need vid iq if you go for the extension google3 hajj is there then when we come down on second That channel has only 19000 ranked videos If you go below the number of subscribers The video which is ranked on the third page is only There are around 1000 subscribers, that means that we don’t see much competition here I can’t find the one which is on number fourth He has 11000 subscribers so from here It has been confirmed that yes there is a lot of competition There are not many videos even on small channels Here we are ranking, after that the number There is something in the second, we have to see that friend Are people even searching for this? Pay views are coming consistently here So you see a tag here. In which it is written 16 VPH VPH stands for views on our that means that joe Top ranked video every hour 16 views coming in That’s Pretty Decent Then if you come down then you will see here that The video is ranked on the second and it has got 23 views but ours again which is very decent After that, even four views is not much Not bad, then 16 views So from here we got the idea that Its search volume is also reasonable and good Now we have also seen the competition of this keyword Which was low, we also saw its search volume I saw that it was pretty decent, now we This is the third thing and the last thing to see whether this keyword is used anywhere else People have copied it exactly from somewhere so what will I do from here is copy it I will do it and I will type tomorrow f so that here But my search bar will open, I will click on this I will paste it here so that I can paste it here Some results are visible which is it 1/3 means it is present only in three places Keyword is used and that too in a search bar I am a Vid IQ telling this and again vid iq show here on right hand side that means that someone is doing it directly Use this keyword as the title of your video which shows that this a perfect title if i Exactly this keyword in your title If I use it then my video potential will be top How can she now come to the title jana hai which is our second part after keyword there I’ll tell you How do we use it in the title? ok so for the title you have to try that Exact keywords in your title This is where you will get your keywords from We will copy it from here and bring it here You will paste it and after pasting you will it has to make sense that somehow this Your actual title should also be there For that there are two-three things which we You can paste it before or after it For example you can paste it here You can either write on how to do 3d after effect video reels editing either you You can make your title like this or you can can make 3d after effects video reels Editing Tutorial 2024 or you can write tutorial for Beginners, this is how you make sense of a title How can we know what to make Again you write your keyword by writing the keyword You give a space ahead, after giving a space you will see that What do you find makes sense? Write it and then give a space So you write all these things in front of your keyword. can you complete your full title Same like this as I told you here I showed you how to do it, okay so now let’s move on towards your description which is ours Third part after title now description how to write first of all whatever is yours This is the title, you have to copy it from here And you have to bring it here and paste it. After pasting you have to press enter and You have to move to the next line and Let us write a small paragraph here. We will write a file which will be filled with our keyword Now where to find keywords again Again we will go to Vid IQ and from here You have to click on the related keywords By clicking on the related keywords you will get There are keywords coming that you can potentially You can use it in your description and Also share your video against these keywords Can I get you ranked from here? I select three or four keywords that but i want my video in Now rank against these keywords as well I have selected four keywords from here. I’ll copy these and Use it like this in your video description I will do it so that it looks a little natural and also this Don’t think that I am spamming here It has been done just like this, you should see this I wrote this small paragraph In which I used some keywords I have liked the keyword this one is mine This is my first keyword, this is my second keyword This is my third keyword and this is my fourth The keyword is you see how I put it Naturally used in this video we will be learning how to do 3d after effect Video editing you will also see after Effects Tutorial We Will Be Discussing Motion Graphics and Viral Instagram’s Video editing is now just like this you can write a paragraph You have to make it which should look absolutely natural and then the seconds you have to work In your video description, write That’s Time Stumps Now what are time stumps You have my HBA Services are here youtube-dl designing ok so like this You have also added time stamps to your videos Now I have to add this video in the description What types of time stumps can there be I will give you an example of that here we go here you can see that for example just Taking as an example my video 3 minutes in which in the first 1 minute I Intro to After Effects Video Editing Then I showed you by editing the video And in the third portion I gave you a motion Now I have explained the graphics like this You have to write the keywords here as well It gets entered and it doesn’t look like spamming again this LegalQuest Make your video in the form of Mas Can you add it again in the description This was our description part now move we will do our third part on which is video tags now video tags are so It is not important but still I will tell you Let me tell you a small way to do this how do you putt you come up your Copy the title of the video from here and There is a website name as rapidgator.net do it so you are done with your tags you are Done with your title you are done with your video Description You are done with your keyword Now only two things are left for selection point number five and point six of which Point number five is how your video is What things should be in the video There should be a reason because of which your video will rank You can do this now before moving on to the video You can see here that Vid IQ tells me I hope your SO is already very good Now it has given us a score of 48.1 out of 50 I have also given the report of which if I give you If I show you, the tag count is five out of four The keywords are 5/5 5/5 5/5 i.e. everywhere It has given me very good marks right now Our SEO was not completed because Only title description and tags are good By doing this our SEO does not improve. Our video should also be very good Our video should also have life The video should also be problem solving It should attract the audience what do we have to do we have to simply come to them On videos that are already ranking We have to open these videos one by one we have to watch the whole video I want to see what is in these videos explained and what are the shortcomings How do you know what is missing? also open the video and comment on this video In the section you will see that some people have told dude you should have done this I should have done this, I didn’t like it This can be improved so whatever you find here You should see good feedback on your use in the video and there is room for improvement there you have to improve so that your audience which is more valuable than your video take it away and then come to your last butt not the least point number six which is About Thumbnail Now Thumbnail How should we be Thumbnail should also play a very important role When it comes down to ranking Your videos are through SO now for that again Have you been to the place where these videos are Some rankings are being done, you have to see that friend Thumbnails of ranked videos what is the similarity and what is the Improvement proof can be done first of all we If you see the similarity then look at this here 3D Viral Reels is also written on the thumbnail The second one is also written 3d viral It is written on the reels third one that go viral The fourth one is written 3D Viral Reels So I understand that if I too am thumbnail pe likhoon 3d viral reels to that would be pretty enough means my video too There are chances to rank but points will never come It also does not happen that you go and meet someone Copy a thumbnail or a concept copy your purpose is that I Can I improve it a little bit? Can I do some value addition? because of which my video is not visible to him If you outperform then here you are See if there is scope for improvement in this come down and keep scrolling you will read two-three times You can also mix and match by holding the You can pick up a theme from someone, just from someone else can pick up the text for sure yours Thumbnail can be the best so now Let’s move forward to chapter number 12 which is it about It’s going to happen friend, now the fun will begin YouTube can become faceless in the same way Short videos can also become faceless now If we were to make faceless shorts then Pure Post it on any platform like youtube1 we can if we want to but if we isn’t it so Youtube2 behaves totally differently If it does, then we will move ahead from this perspective. we will talk about everything that is to come youtube1 to get early success yes many I know such YouTubers myself. of the students of the friends of the Those who played silver within 50 days Buttons have been purchased i.e. 100000 within 50 days Subscribers 1 lakh subscribers He has achieved and Even if you are a little new to Datchi You will also get 1000 subscribers in 50 days If they are coming then that is enough, but now this How does success work? What is the duration, is it long term or not Now let’s go ahead and talk about it, okay ok now if I give you a one liner that How the Algorithm Works for is on youtube0 is it 100% or above 100% Then definitely you will see success here. You will get millions of rupees on your video You will get views but if your video is liked by everyone Someone is skipping Your skip ratio is quite high If it is more then you will get good results here Not to see substantial results I will meet you with my own personal invited people from youtube0 People who did an interview or podcast with working in shorts and believe me It was shocking anyway if I told you this one liner like i said earlier if If I tell you then it’s all about engagement and It’s about your average view duration Assalam Walekum Guy in short Hello Guy Welcome to our channel Welcome to our shorts saying nothing of the sort is not an attempt To the point your hook is very hooky Very interesting very much You should be catchy and there is no useless thing in your video There shouldn’t be even one second of useless talk in it There should not be an average joe of your shorts The length is from 30 seconds to 45 seconds It should be no more than this If you make this hook game strong yes and we don’t talk uselessly in between So you will get 92% 100% of your average ration It will come and only then will your shots go viral And we have to follow the same pattern here too. that’s if one of our shots goes viral then keep this in mind that you have There are other shorts that I have to try you have to make it the same way it is not that you have made one Made it viral on short x vaji topic You have left now and you can go in some other direction They are lying there and saying that my short Why are the views not coming? That is only because that you are most popular with your short And also not creating that type of content You also have to see how your competition is Which shorts is he making? if a particular video of her is going viral This type of shorts is going viral for you too as a beginning I have to try that because that There is a proven thing, if it goes viral youtube1 short gets 200 thousand 300 views I will also go to next short above 1000 If your views don’t go down then there are many shorts It also gets removed on zero views and many more Shorts get removed even after 10000 views so this This is a common problem if you face this If it is there then it has multiple solutions that I’ll tell you about right now For example you will find extreme here you have to be kind of consistent if your There is no consistency if you watch a video every day Not uploading for example you among I skip a day in shorts so I am talking about youtube2 will definitely help you in the next step which you take I will upload a short story, there is something significant in it If we get to see decrees of views The number one thing you have to try It is that the consistency that you have should be maintained and number two you have The thing you need to make sure of is that absolutely You did not do shorts work on fresh channel do some ad, the channel is a bit old Whatever the channel, shorts perform well on that channel and the third one is that pre monetize You should not leave the channel at all is there a difference between pre monetized channels And an agent channel you go to the agent channel Do not go towards pre monetized channel After that the next thing you need to understand is That you have more target audience here Who are the people who are more into shorts? I prefer to see the number one Kids Under 11 Your Content Here are going to consume too much and Number two are those who are 45 plus or 50 plus They are the ones who consume your shorts here You are going to do it, so accordingly you have You have to take out the niche according to this you have I have to select the topic whether this is for me or not I am targeting the same people who wear shorts Do you actually see it or are you like me are targeting who may be on youtube4 I don’t watch it that much or it’s not at that level Kids of that level don’t watch youtube4 do they watch it or do older people watch it and if I am in any of these two If I give priority to them then they are the children All over the globe right now only on youtube4 If you are mostly consuming this then you your content or your niche accordingly You have to plan, after that the next question comes brother please tell me that on the same channel I upload shorts and longs on the same Can I or not, now this is a big thing This is an important question and a very deep one This is a question whose answer you need to understand Need to see people watching shorts The mindset is totally different long Mindset of people watching videos Totally different hai main agar long video I am watching and subscribing to your channel hmm that means i expect this from you I hope that your upcoming videos also yes it is going to be long for For example your video was top 10 Destinations to Visit in Istanbul OK I liked your video I subscribed to this channel friend No, it shows videos of very fit people it is travel related and my own My hobby is also traveling, now I have told you I have subscribed to your next one The video is coming, I’m watching it But in between you get short In which you are very pressa is a small thing I do it whether I relate to him or not is there a chance that I might skip it It is too much but your long video should come and It is not possible for me to skip that Now on the other hand we can do this voice versa take my shorts you like it very much I am small for example my face I have a channel with you I will tell you some funny I will tell you some tricks or tell me some funny hacks Let me tell you something related to children I can provide entertainment from any such channel In which I am uploading shorts now If I upload a long video So my audience is already built there ups are those who subscribed me Those people who have pressed the bell icon are now mine will never watch long videos because The mindset of these two audiences is different okay i accepted that friend its good it is different it is different then Why don’t we bring this audience also to our channel Audience should cut this too collect them on the channel now this is not possible because when we for example We’ve built a strong Shorts audience I have 1000 subscribers out of which 800 People are such that they look at shorts or shorts Because of that they blocked my channel had subscribed now when i am on my long When I publish the video, it will be there These thousands of people should know the impression I need these 800 people when they don’t click on it If you do it then potentially as I told you I mentioned my CTR in the previous chapters Click through rate will decrease Click through rate will decrease Now these friends after watching long videos My channel was subscribed to by these Not everyone will click on 10 also If you take some of this then definitely this is a very If the number is big then 10 per 200 is just 20 and if I take 20 out of 1000 then That’s just 2 but my CTR is this much inspite of being good i.e. There was a dedicated audience out of which 10 per cent If you clicked then it was very good right? But the dedicated audience was so small Because of which my overall CTR decreases did and that went to just 2 slowly slowly my channel is dead here The end event will come into position to happen Succedence Content will not work, only one There is a possibility in which this can work And that is how you can choose long format of content you work and you use shorts as a fuel for your long form of Videos how is it possible for example you make money online yay automation wala jo mera There is a channel on that if I show long format off I am making videos, okay I have made 20-20 videos. 30 min 30 min 40 40 min videos it’s posted there now what do I do and For example there is a video in which I Told five mistakes to avoid for your Faceless youtube0 long format of video is 10 It is of minutes now I made a short in which I said you know that you youtube1 ji ye ye ye ye I have shorted I pointed out a mistake inside which was very thoughtful. yes friend i am making this mistake and what did you say about your short [ __ ] He said you are making four more mistakes like this which you can see in my video is where I have explained it in detail I have explained it, now if that short of mine Even if it goes viral, I won’t be afraid friend Irrelevant audiences should not come to my channel Or I know my channel might go dead If this goes viral, people should watch it till the end. are the most like he came out of this Come and watch my long video also because the The ultimate game is that of my long form The content will run and if it is in short format The shorts can help a little are more than welcome we will welcome him very well it will be right i hope you like it here you must have understood now the next The question is whether SEO of youtube4 It is important to not do it at all, you are your shorts The title can be the same for all the shorts All your shorts can have the same tags Here are the descriptions of all your shorts Same Ho Jaaye It Dozen Even Matter Shorts Mein the only thing that matters is that you How are you engaging your hook? What are you carrying and how are you Increasing the average view duration okay so the last question is with Bhai shorts vs long videos what is the difference in revenue means if I I am earning ₹ in one place by posting long videos In short I am of the same views How much money can I earn against you I will not tell you I will give you an example of this for your example. A video is a long form of content and it is in a suitable niche on which You get RPM close to $ i.e. You get $ for 1000 views For example, if you get 1 million views How much money did you make on that niche? $4000 from just a single video which has given you around 1 million views coming now On the other hand are your short videos? and it gets 1 million views and that is in the same niche which is a good choice It is considered niche i.e. the one whose long If you are getting $ in videos then on the the other hand here instead of your $4000 You will earn just $400 and your the rpm would be 0.4 So Ruffle this is my personal experience My personal observation is that almost 10x That means 10 times difference of income is short Niche too in shorts vs long Niche depends on how much money you have There are some shorts available where you can pay $1 RPM can be obtained upto that also but if the same Niche if you make a long video then There you can get RPM up to $10 Potentially youtube4 has such niches too where you get 0.1 rpm but if If you come to long videos of that then You might be getting up to $ there, so this This will be plus minus niche to niche together That means those niches with low RPM They will have both long and short term work and Those which have high RPM niches Both short and long will be more But there is a 10-fold difference between these two. We have to be here A lot of content related to youtube0 youtube4 You will find it on my channel where I called people who have worn shorts Silver Play within 50-50 days through We have also bought the buttons, so now let’s go to our Chapter Number 13 Pe Which Is Extremely Extremely Important and That’s What It’s About Investment and tools that we have here Basically how much money will it cost If we apply then our face channel will become different Then our channel will not be able to become this now This is a very interesting question The answer to this may be very subjective This video has been viewed by thousands and millions of people If a million people watch it, then even if there are thousand people So there can be thousands of different answers to this. There can be a different answer for every person why see some people will be for For example those tutorials went in the mise what to do in which how to change Background of inside the animation niche You can have up to 00 minutes per person I might have to pay for this animation niche I am talking and this is a video per minute in just one minute I am telling you It has to be done, I have put it aside I told you about the extreme, I told you about the other side now let’s talk about the middle the middle thing is that If you create any faceless channel Good quality editing in it If you want faceless editing then go there You will have to pay Rs 800-000 per minute Now you will have to pay 10% of your monthly salary again There are 15 videos There are 30 videos all things are subjective for everyone Now different rates are going to be applicable for these methods What is it and how can this cost be minimised? How can you make the most of your money You can spend less, I will tell you this thing I am first of all if this is your first channel Don’t try to do it like you would a script There is writing, there is title research, there is voice over Video editing and thumbnail designing SEO is all these are its departments Out of these, you can do three to four departments yourself. handle it and most important is video Editing If you are into video editing Your department takes care of itself, right? things will become much easier for you now They will say that if I am not with you brother then I will do this work myself I can’t do it, maybe I’m overseas or I am 30 plus or I am 25 plus I’m done now, maybe I have enough time I don’t have a full time job or I manage my business myself You tell me I can’t do this anymore How to be the cheapest in less than a minute 800000 is too expensive for me Tell me a cheap Jugaad, ok let’s come now Towards the agricultural jugaad the agricultural jugaad is that At the end we have to keep this game to ourselves You will have to keep this department with you We will have to keep it but we will not do it ourselves We will train a teenager from our family may be our sibling may be our cousin anyone your nephew your nephew your niece your Niece, is there any such child in your family? or the girl who is 181 years old you You will have to train him yourself, maybe you My video editing master class I can also show him some online course Get him to join editing We ourselves will have to teach him the basics You should have a laptop and then you can buy it Even if you give them 10-15000 rupees per month, right? The Very Beginning Then He and She Will Be Happy to serve you she will be happy to Provide you may be in 10 videos per month b12 videos because that’s it right now not as professional as professional Obviously people from the market are here to you Obviously professional will be available at least There is a lot of talk about skills too There will be compromises but your budget will be very Too many cuts can be short you say No brother, I have no problem with the budget I need a professional guy please tell me Where will I find a professional guy for that? You are my free community youtube4 I think there are people close to Hajj who that I am definitely sitting here for this work There are service providers there If there are people providing services then you are there I will post you there, good guy I can get a good resource now I will suggest that the one who has a lot of money But the video does not keep any account Video: Do ​​not make commitments with anyone Discuss your things on a fixed salary For example, friend, I will hire you I make 10 to 12 videos every month On average their length would be 10 to 15 minutes hogi and i will pay you straight away 50000 50000 is a very good number to pay the one who I have been editing that for the past one and a half years And again I keep mentioning one thing again and again I will do that as it plays a very important role If you are a 25, 26, 27 year old video editor who are hiring on which responsibilities that one has to undertake throughout their career I’ve already come a little way ahead Then he will charge you more money Have to find the editors who are either female yes because she believes that it is appropriate Dislike di does your work for money Guys who are 25-26 years old, this is for you Teenagers 2021 Maximum will have to be found 2021 year now come back to what I told you I said in the beginning that if your tutorial The based videos are very basic and very short Maybe if you want 180 videos per month I told you that this video is available for ₹1 How can cost be behind this The trick was that we had to find children who Right now there are teenagers for whom 5000 or 10000 is a big deal. more than enough he doesn’t have 3000 in his pocket If we are giving them 10,000 then they will give Be very very happy, she gives you six days a day The videos will be recorded easily which It’s just a matter of one minute, here’s your resource Kept it for screen recording for voice over and you kept one resource for Thumbnail and video editing and a resource You kept it for uploading the videos Even if we give them Rs. 55,000, which I am telling you it is practically possible again age matters and the guy is living in the area that area matters okay if You are from Lahore DHHM will not do it year to year find a kid from the Three Cities who He is a little skillful, his skill is good He has a laptop, I will give you many I guarantee you will get a lot of them I am talking about the children who are happy even with Rs. 5000 I have been here and it is not as if this Jugaad is yours Will not work over the period of two to three years Those kids too, slowly a little bit You will become wise, 00 will come from Pa to 10 15000 will come to Datsa it will continue now again i am coming this I can sum up the matter of very different niches I am just giving an overall perspective on the whole thing Although every niche has different calculations The content to be picked up in each niche is different I have to pick it up from some place youtube’s talk about the tools watch the tools So I have counted you so much that right now I will give you 10 tools while standing. Ginwala Ginwala Essentials Which are Very Which are the very supreme essentials brother Please tell us that so that if we rely on tools If you want to do it also then we use the same tools Just acquire it, nothing else don’t do it again let me tell you that the tools It is not absolutely necessary in every niche It is definitely not necessary in some niches If it is necessary then in those niches where it is necessary Which tools do you want to take among them? One You Have To Purchase The Subscription Of Story Blogs that will help you on a shared basis You get your number on Rs. 00 per month have to go for what pra which is shared with you You get the number on basis of Rs. 50 per month Three, if you want, for script writing Or for a good title selection you can use flat You can buy 4.0 at its actual cost So I think it is close to 6000 but shared You can get that too very cheap on basis there are then 11 labs which are almost absolute which is necessary for your voice overs This will help you a lot in most of the areas This is important so you’ll have to buy it And these are also its different plans as The cost of the plan will be written there. You will get it for almost half of the cost This can be obtained on shared basis through IQ again if you want this is your personal You can subscribe to whichever is better very low and if you want you can do this also You can take these five on shared basis There are tools that are almost necessary But even out of this, Chart GPT is so You are not necessary if you know how to play So you can manage with charger 3.5 also Of the Kawa Pra and Storage Blocks Even if anyone takes one, I will give you too It might work but 11 labs are obviously If it is very necessary then the total cost of these Even if we put all five in, even if you take If you take it on shared basis then Its cost is not more than 5000 per month And in some niches you don’t need any tools at all Like not even a single Tool and I also did an interview with him With a prince he told that right Now He Is Earning Like Around $600 Today He did not invest even a single rupee till now Overall in youtube3 because it was working On youtube3 and the same sowar that use of cap cut I was doing it and he was sorted out even one rupee He didn’t have to give anything to anyone nor did he have any had to buy the tool now last but not the Least which is your thumbnail designing I would prefer you to consult an expert in that. Hire only those people where you have completed your basic level I don’t want to go because That will not be good, your content will be good not gonna let go thumbnail designer you my come to the group again where someone Hire experts only at the basic level You haven’t tried a thumbnail designer yet A good thumbnail maker will cost you Rs 1500 I can make a thumbnail for Rs. 1000 that if you want a thumbnail of the month Definitely need that higher end charge Will do if you need 20 thumbnails a month Its cost will also be reduced You can invest Rafi Idea here 1000 1500 end age minimum age if you have more If you want then you can send it to anyone in 7008 also I can close this, I am a professional I am talking about a guy but the one whose age it’s a little less and also the one which is on f Not sitting which is not sitting on Upwork It happened that people charge more money there or You have to find a Desi child and this will help you My community is Tashan Pakistan you will be able to sleep comfortably I have told you about those things, right? Have to calculate which niche you are going into What level of editing is required in that niche? Will the one for Rs. 700-00 work or the one for Rs. 1500-2000 work? will it work or the edge basic edge 00 one will work but I’m talking about a minute and then you See if your quantity is more so I’m not gonna keep that on the minute I I will hire an editor for Rs. 40,000, 0000, 50,000 Otherwise, I will learn this skill myself or I To any housewife in your house I will teach you or I will teach some teenager I will give you all these options now it’s up to you that you do so smartly Let’s take these things with us so that was all for chapter number 13 now let’s move forward to chapter number 14 which is mistakes to Now I will tell you some such avoid the mistakes that you make because of your channels do not grow and definitely You understand that in this field, no one There is no scope, this field is very boring I can’t even grow my pay here So let’s understand some basic mistakes in numbers Forest Combining [music] youtube2 will give you back your growth quickly In a fit of confusion, I switch to shorts But then your long video gets 20 views Views 50 Views 100 Views 200 Views This you can’t go much because you Gather irrelevant audiences on your channel If you have taken it then you should not make this mistake at all Number two sharing your channel now I hope so that There is so much awareness that this mistake So at least 90 people must know that Do not share your channel with anyone your relative with any of your friend with Any of your exes Your content is not consumed organically will do and you know about it from him you have your If you don’t want to share the channel then it’s me Or any trustworthy person close to you person because that person is also from your channel that first video of yours is irrelevant for you I will see it, I will see the second one, I will see the third one But will he watch your 50th video? If it comes in front of him then he will click on it he won’t do it because he doesn’t want to see it yes your channel is about trucks I have never driven a motorcycle in my life why would he click on it if he clicks on it Your seat will not click or come down he will do it too, if he doesn’t see it completely then your The average duration will come down and your watch time will increase So your channel will be shared with anyone not to share and number three which is your The mistake is that it is reusing the content See, now you must have understood this much That No, understand this thing that by reusing content We have to avoid doing this, just do these two I added only four videos and uploaded it No friend, add some input to it yourself You will have to add some value Only then will your content be monetized It might not be that difficult, but then I have also put forth an emphasis on this I mentioned it so that it stays in your mind as you go Let this thing settle down, okay? After that again this Uploading Content Using a VPN Uploading Content Using RDP Datchi Comfort Content Your USA UK Canada Australia Germany France wherever If you want then hit that language Hit the topic there, that thing there It will reach on its own as I told you It was also explained correctly in the initial chapters Now this is the mistake that I have started telling you am I not thatchi of the videos for each and everything On I’m thinking let’s do that Although the game is completely opposite to this, you We have to see what the data is saying what youtube2 is saying youtube4 lad But which packaging is going viral Which title and which thumbnail is more viral? This is going to happen to you through your computers only. I will tell you and youtube1 I know how to speak on things my address no what is the interest but if that The thing is not youtube1 and not that it is successful If it has happened then it won’t be yours even if you You can say as much good as you want about it. You have to lift your brain and put it to the side You just need to do research on it use your brain for this Have your own mind for content creation do not use it at all i hope that It’s making sense for you to use your mind How is it not okay to use it After last but not the least ours came think so the seventh mistake is that not Analyzing your competitor or your competitor I myself follow what I I love my own comparator so much is dearer than the channel because Everything tells me that this friend is a follower of this nation. what’s going on inside what’s not going on What things have I failed at? I have become successful in which thing My If he is doing asar then what do I need my Thinking about it or doing things yourself Make your time money by experimenting so that was all to waste resources for this particular course i hope so that You might have learned something new Learnings must have happened now, one of mine to you The message is to see the economy of Pakistan He is already getting worse and worse day by day It is getting wet no matter what Whatever political changes may come We have to change the things that we have It is in everyone’s hands to change this thing ourselves It is fate that a man writes with his own hands Allah sends our fate in writing How does a person write the fate of his decisions The person who takes good decision on the basis Definitely his luck would have been better than better It goes away so I want you guys to also keep your The one who is destined takes this decision himself Make it as good as possible that yes friend I will do it it’s for me for my family for my Parents for my upcoming family I I will work on improving all these things I will do it, there is no guarantee that it will take time No person will give you any such guarantee from I cannot say that this will happen in 15 days This will happen in a month This will happen in two months It will take some time brother you tell me In achieving the job you are in If your XYG is particular any Be it salary or business, whatever you earn You made a struggle to earn this Initially you might have suffered a loss or It takes you two to four months to find a job It took eight months to get the job You must have studied for at least 4 years Everything matters here, right? The same rules are implemented either way This is not a get rich quick scheme but it It’s a lazy thing, it will take some time It will take time but if we are consistent We will stay if we put in effort everyday Friend how is it possible that you come here Those people who are already sitting here may not get success Are they different from us after achieving it? is he an alien no he is also like us As everything demands persistence Right Knowledge Right Mentorship Right Actions Right strategy after learning all these things What big thing can you get in this Just have to be disciplined and consistent It’s a little difficult to stay in it and nothing is difficult i am telling you so i hope you guys liked it You will like the video as much as possible Like so I know you have How many people have benefited from it Let me know your opinion in the comments is there any question i will definitely I try to put your every comment in your favor there is a question, can you answer it as well guys can you come to my instagram2 If you have any questions for me then ask me there can you watch my content on my There is a lot of knowledge on youtube2. value is provided already you can come to My Till then in some other video of mine allah hafiz

    By Amjad Izhar
    Contact: amjad.izhar@gmail.com
    https://amjadizhar.blog

  • Flask Web Development: From Basics to Deployment

    Flask Web Development: From Basics to Deployment

    The text offers a comprehensive guide to constructing and deploying Flask web applications. It begins with the essentials of setting up a virtual environment and creating a basic “Hello, World!” application using Flask. The guide then demonstrates advanced features such as URL handling, request methods, response customization, and Jinja templating, which dynamically generates HTML content. Furthermore, the text details incorporating static files and integrating frameworks such as Bootstrap. The text advances to explore user authentication and databases and further enhances application structure through the implementation of blueprints. The explanation culminates in directions for using Docker to containerize applications for deployment on remote servers.

    Flask Framework Mastery: A Comprehensive Study Guide

    I. Quiz: Short Answer Questions

    Answer each question in 2-3 sentences.

    1. What is the primary reason for creating a virtual environment when developing Flask applications?
    2. Explain the purpose of the requirements.txt file in a Flask project.
    3. Describe how to activate a virtual environment in a command line interface (CLI) on Linux or macOS.
    4. In Flask, what is a “route” and how is it defined?
    5. What does the debug=True parameter do when running a Flask application and why should it be turned off in production?
    6. Explain the difference between URL processors and URL parameters in Flask.
    7. How can you access URL parameters within a Flask route function?
    8. How can you specifically handle POST requests in Flask, and why is this useful?
    9. Explain how to return a custom status code along with a response in Flask. Give an example of a use case for this.
    10. What is Jinja2 and how is it used to generate dynamic web pages?

    Answer Key

    1. Virtual environments isolate project dependencies, ensuring specific package versions don’t conflict with other projects or the system’s global packages. This isolation creates reproducible deployments.
    2. The requirements.txt file lists all the packages and their versions required for a Flask project. It enables others to easily replicate the project’s environment by installing these dependencies.
    3. To activate a virtual environment on Linux or macOS, use the command source venv/bin/activate. This command sets the environment variables to use the virtual environment’s Python interpreter and packages.
    4. A route in Flask maps a URL endpoint to a specific function that handles requests to that endpoint. It is defined using the @app.route() decorator.
    5. When debug=True, Flask automatically reloads the server on code changes and displays detailed error messages. It should be turned off in production to prevent security vulnerabilities and improve performance.
    6. URL processors are dynamic parts of the URL path captured as function arguments, like /greet/<name>. URL parameters are key-value pairs appended to the URL after a question mark, like /login?username=user.
    7. URL parameters can be accessed using the request.args object. The code example uses request.args.get(‘parameter_name’) or directly accesses request.args[‘parameter_name’].
    8. POST requests are handled by specifying methods=[‘POST’] in the @app.route() decorator. This is useful for submitting form data or sending data to the server to create or update resources.
    9. A custom status code can be returned as a second value in a return statement. For instance, return “Created”, 201 returns a 201 Created status. This is useful for indicating the success or failure of an operation to the client.
    10. Jinja2 is a templating engine that enables developers to embed dynamic content within HTML templates. It is used to generate dynamic web pages by combining data from the Flask application with HTML markup.

    II. Essay Questions

    1. Discuss the advantages of using a modular structure, such as blueprints, in large Flask applications.
    2. Compare and contrast sessions and cookies in Flask, detailing their purposes, implementation, and security implications.
    3. Outline the steps involved in building a user authentication system in Flask, including hashing passwords and managing user sessions.
    4. Describe how static files (CSS, JavaScript, images) are served in Flask and explain how to structure your project to effectively manage them.
    5. Explain the process of deploying a Flask application using Docker, highlighting the benefits of containerization for deployment.

    III. Glossary of Key Terms

    • Flask: A micro web framework for Python, designed to be lightweight and flexible.
    • Virtual Environment: An isolated environment for Python projects, managing dependencies and package versions.
    • requirements.txt: A text file listing all the Python packages required for a project, used to recreate the environment.
    • Route: A URL endpoint in a Flask application, mapped to a specific function that handles requests.
    • Decorator: A Python feature used to modify or extend a function’s behavior, often using the @ symbol (e.g., @app.route).
    • URL Processor: A dynamic part of a URL that captures values as function arguments (e.g., <int:id>).
    • URL Parameter: A key-value pair appended to a URL after a question mark (e.g., ?key=value).
    • POST Request: An HTTP method used to send data to a server to create or update a resource.
    • Status Code: A three-digit code returned by a server indicating the result of a request (e.g., 200 OK, 404 Not Found).
    • Jinja2: A templating engine for Python, used to embed dynamic content within HTML templates.
    • Template: A file containing HTML markup and Jinja2 syntax, used to generate dynamic web pages.
    • Session: Server-side storage used to persist user-specific data across multiple requests, using a cookie to maintain state.
    • Cookie: A small piece of data stored on the client-side, used to remember information about the user or track their activity.
    • Blueprint: A modular component in Flask, used to organize and encapsulate a set of related views, templates, and static files.
    • Docker: A platform for developing, shipping, and running applications inside containers, providing isolation and portability.
    • Container: A standardized unit of software that packages up code and all its dependencies, enabling applications to run quickly and reliably from one computing environment to another.
    • Docker Image: A read-only template with instructions for creating a Docker container.
    • pip: The package installer for Python, used to install and manage packages from the Python Package Index (PyPI).
    • flask-login: A Flask extension that provides user session management for login/logout functionality
    • bcrypt: A password-hashing function designed to be computationally intensive to prevent reverse engineering by brute-force attacks.
    • flask-sqlalchemy: A Flask extension that simplifies using SQLAlchemy, a powerful ORM (Object-Relational Mapper) for working with databases.
    • flask-migrate: A Flask extension that uses Alembic to handle database schema migrations in your Flask application

    Flask Application Development and Deployment Guide

    Okay, here’s a detailed briefing document summarizing the key themes and ideas from the provided source.

    Briefing Document: Flask Application Development & Deployment

    Overview:

    This document synthesizes information from a series of tutorials on developing and deploying Flask applications. The tutorials cover core concepts, best practices, and practical steps for building, containerizing, and deploying Flask applications to a server. The emphasis is on modularity, maintainability, and security.

    Main Themes & Ideas:

    1. Virtual Environments:
    • Theme: Isolating project dependencies.
    • Details: Creating a virtual environment ensures a project uses only the necessary packages and versions. This prevents conflicts and simplifies deployment.
    • Quote: “The reason you want to create a virtual environment is because you want to have an isolated uh project where you only have the packages and also the package versions that are relevant to this particular project.”
    • Process:Navigate to project directory in the command line.
    • Create the environment: python -m venv venv (or python3 -m venv venv).
    • Activate the environment: source venv/bin/activate (Linux/Mac).
    • Configure IDE (e.g., PyCharm) to use the virtual environment’s Python interpreter.
    1. Basic Flask Application Structure:
    • Theme: Building a minimal “Hello, World!” application.
    • Details: Creating a simple Flask application to demonstrate the core components and workflow. This covers importing Flask, creating an app instance, defining routes, and running the application.
    • Process:Import Flask: from flask import Flask
    • Create app instance: app = Flask(__name__)
    • Define a route: @app.route(“/”)
    • Create a function to handle the route, returning HTML or text.
    • Run the app: if __name__ == “__main__”: app.run(host=”0.0.0.0″, debug=True)
    1. Routes & Request Handling:
    • Theme: Defining and managing different URL endpoints.
    • Details: This covers static routes, dynamic URLs (using URL processors), URL parameters, and handling different HTTP methods (GET, POST).
    • Dynamic URLs:Use angle brackets to define variables in the route: /greet/<name>.
    • The function handling the route takes the variable as a parameter: def greet(name):.
    • Type casting parameters (e.g., <int:number>) to enforce data types in URLs.
    • URL Parameters:Access URL parameters using request.args: request.args.get(‘name’).
    • Check for the existence of parameters using if ‘name’ in request.args.keys():.
    • HTTP Methods:Specify allowed methods in the route decorator: @app.route(‘/login’, methods=[‘GET’, ‘POST’]).
    • Use request.method to differentiate between GET and POST requests.
    • GET requests are typically used to display forms, while POST requests handle form submissions.
    1. Templates:
    • Theme: Separating presentation logic from application code using Jinja2 templates.
    • Details: This covers rendering HTML templates, passing variables to templates, using loops and conditionals within templates, and template inheritance for creating reusable layouts.
    • Process:Store HTML templates in a “templates” directory.
    • Use render_template(‘index.html’, variable1=value1) to render a template.
    • Access variables in templates using double curly brackets: {{ variable1 }}.
    • Use Jinja2 syntax for loops ({% for item in list %}) and conditionals ({% if condition %}).
    • Use template inheritance to create reusable layouts with {% extends ‘base.html’ %} and {% block content %}.
    1. Filters:
    • Theme: Modifying data within templates using filters.
    • Details: Using built-in filters (e.g., upper, lower, replace) and creating custom filters to manipulate data before displaying it in the template.
    • Custom Filters:Define a filter function: def reverse_string(s): return s[::-1].
    • Register the filter: @app.template_filter(‘reverse_string’).
    • Use the filter in the template: {{ my_string | reverse_string }}.
    1. Static Files:
    • Theme: Serving static assets like CSS, JavaScript, and images.
    • Details: This covers how to serve static files from a dedicated “static” directory and referencing them in HTML templates.
    • Process:Store static files (CSS, JavaScript, images) in a “static” directory.
    • Reference static files in templates using the /static URL: <link rel=”stylesheet” href=”/static/style.css”>.
    1. File Uploads:
    • Theme: Handling file uploads from HTML forms.
    • Details: This covers creating a form for file uploads, accessing uploaded files using request.files, validating file types, and saving files to the server.
    • Process:Create an HTML form with enctype=”multipart/form-data”.
    • Access uploaded files using request.files[‘file_field_name’].
    • Validate file types using file.content_type.
    • Save files using file.save(‘path/to/save/file’).
    1. Downloads
    • Theme: Allowing users to download dynamically created files, such as CSV exports, through the web application.
    • Details: The process involves generating the file on the server, creating a unique filename to avoid conflicts, and using Flask’s send_from_directory function to securely serve the file for download. The tutorial demonstrates generating a CSV from an uploaded Excel file for download.
    1. Sessions & Cookies:
    • Theme: Managing user data and state across requests.
    • Details: This covers the difference between sessions (server-side storage) and cookies (client-side storage), setting and retrieving session data, setting and retrieving cookies, and the security implications of using each.
    • Sessions:Set app.secret_key to enable sessions.
    • Store data in the session dictionary: session[‘username’] = ‘value’.
    • Access data from the session dictionary: session.get(‘username’).
    • Clear the session using session.clear().
    • Cookies:Set cookies using response.set_cookie(‘key’, ‘value’).
    • Access cookies using request.cookies.get(‘key’).
    • Remove cookies by setting expires=0.
    1. Message Flashing:
    • Theme: Displaying temporary status messages to the user.
    • Details: This covers using the flash() function to store messages and retrieving them in templates using get_flashed_messages().
    1. Database Integration (SQLAlchemy):
    • Theme: Interacting with databases using Flask-SQLAlchemy.
    • Details: This covers setting up Flask-SQLAlchemy, defining database models, creating tables using Flask-Migrate, and performing basic database operations (CRUD – Create, Read, Update, Delete).
    • Models:Define models as classes inheriting from db.Model.
    • Define columns using db.Column(db.DataType, primary_key=True, nullable=False).
    • Migrations:Use Flask-Migrate to manage database schema changes: flask db init, flask db migrate, flask db upgrade.
    1. User Authentication (Flask-Login & Bcrypt):
    • Theme: Implementing a user authentication system.
    • Details: This covers using Flask-Login to manage user login and logout, using Flask-Bcrypt to hash passwords securely, creating user models, and protecting routes that require authentication.
    • Security:Hash passwords using bcrypt.generate_password_hash(password).
    • Verify passwords using bcrypt.check_password_hash(hashed_password, password).
    • Flask Login:Import and create a LoginManager instance, setting up user loading callbacks.
    • Implement a function @login_manager.user_loader to load users from the database based on their ID.
    • Protect views with login_required.
    1. Blueprints:
    • Theme: Organizing applications into modular components.
    • Details: This covers creating blueprints, defining routes and templates within blueprints, and registering blueprints with the main application.
    • Process:Create a Blueprint instance: blueprint_name = Blueprint(‘name’, __name__, template_folder=’templates’).
    • Define routes using @blueprint_name.route(‘/route’).
    • Register the blueprint with the application: app.register_blueprint(blueprint_name, url_prefix=’/prefix’).
    1. Deployment with Docker:
    • Theme: Containerizing and deploying Flask applications using Docker.
    • Details: The process involves creating a Dockerfile to define the environment and dependencies of the application, building a Docker image, and running the image on a server.
    • Docker File CommandsFROM defines base image
    • WORKDIR sets the working directory
    • COPY copies files from host to container
    • RUN executes commands to configure the environment
    • The process further involves building, saving, uploading, loading, and running the docker image on the server.
    • The importance of using pip freeze to export packages with exact versions is highlighted, making it easier to rebuild the container elsewhere.

    Key Quotes:

    • “(Virtual Environment) the reason you want to create a virtual environment is because you want to have an isolated uh project where you only have the packages and also the package versions that are relevant to this particular project.”
    • “(For deploying you) need Docker on the server and that’s it.”

    Conclusion:

    This source provides a comprehensive guide to developing and deploying Flask applications, emphasizing modularity, security, and best practices. By following these tutorials, developers can build robust and scalable web applications using the Flask framework. The focus on using virtual environments, secure password handling, and containerization ensures that the applications are well-structured, secure, and easy to deploy.

    Flask Development Essentials

    General Flask Development

    1. What is a virtual environment and why should I use one when developing Flask applications?

    A virtual environment is an isolated project workspace that contains only the necessary packages and package versions specific to that project. This prevents conflicts with other projects and ensures that your application has consistent dependencies across different environments (development, testing, and production). Using a virtual environment also streamlines the process of creating a requirements.txt file for easy deployment and containerization.

    2. How do I create and activate a virtual environment for a Flask project?

    Open a command line (CMD on Windows, terminal on Linux/Mac) and navigate to your project directory. Create the environment using python -m venv venv (or python3 -m venv venv, depending on your system), where “venv” is the name of the environment directory. To activate it, use source venv/bin/activate (on Linux/Mac) or venv\Scripts\activate (on Windows). Your command line prompt will indicate the active environment.

    3. How do I install Flask and save the project dependencies to a file?

    With your virtual environment activated, use pip install flask (or pip3 install flask) to install Flask and its dependencies. To save the list of installed packages and their versions to a requirements.txt file, use pip freeze > requirements.txt (or pip3 freeze > requirements.txt). This file can then be used by others (or yourself on another system) to easily install the exact same dependencies by running pip install -r requirements.txt.

    4. What is a route in Flask and how do I define one?

    A route in Flask is a URL path that is associated with a specific function. When a user visits that URL, the corresponding function is executed. Routes are defined using the @app.route() decorator above a function definition. The decorator takes the URL path as an argument. For example:

    from flask import Flask

    app = Flask(__name__)

    @app.route(“/”)

    def index():

    return “Hello, World!”

    5. How do I pass and handle dynamic URLs in Flask?

    Dynamic URLs can include variables that are passed as part of the URL path. You define these variables using angle brackets <> within the route. The variable name inside the angle brackets becomes an argument to the associated function. You can also specify the data type using <int:variable_name>.

    @app.route(“/greet/<name>”)

    def greet(name):

    return f”Hello, {name}!”

    @app.route(“/add/<int:num1>/<int:num2>”)

    def add(num1, num2):

    return str(num1 + num2)

    6. What are URL parameters and how do I handle them in Flask?

    URL parameters are key-value pairs appended to the end of a URL after a question mark (?). For example: /login?username=john&password=secret. You can access these parameters using the request.args object.

    from flask import Flask, request

    app = Flask(__name__)

    @app.route(“/handle_params”)

    def handle_params():

    name = request.args.get(“name”)

    greeting = request.args.get(“greeting”, “Hello”) #Default value if greeting is not provided

    return f”{greeting}, {name}!”

    7. How can I use HTML Templates in Flask?

    To use HTML templates, you must first place your HTML files in a directory called “templates” within your project directory. The directory will be located in whatever file runs the application, commonly app.py. Use the render_template() function from Flask to load and render these templates, passing any necessary variables as keyword arguments. Use Jinja2 syntax ({{ variable_name }}) within the HTML templates to display these variables. This requires importing render_template from the flask package: from flask import render_template. Here is how you would return an HTML template in your app.py file:

    from flask import Flask, render_template

    app = Flask(__name__)

    @app.route(“/”)

    def index():

    return render_template(“index.html”, message=”Welcome!”)

    Within the index.html file you would have the following:

    <!DOCTYPE html>

    <html>

    <head>

    <title>My Webpage</title>

    </head>

    <body>

    <h1>{{ message }}</h1>

    </body>

    </html>

    8. How do I deploy a Flask application using Docker?

    1. Create a Dockerfile: This file contains instructions to build a Docker image for your application.
    2. Define Base Image: Start with a Python base image (FROM python:3.10-slim-buster).
    3. Set Working Directory: Create a working directory inside the container (WORKDIR /app).
    4. Copy Requirements: Copy the requirements.txt file into the container (COPY requirements.txt .).
    5. Install Dependencies: Install Python dependencies using pip (RUN pip install -r requirements.txt).
    6. Copy Application Files: Copy the entire Flask application code into the container (COPY . .).
    7. Run database migrations: Change the working directory and run database migrations (WORKDIR /flaskapp/blueprintapp, then RUN flask db init, RUN flask db migrate, RUN flask db upgrade, then WORKDIR /flaskapp).
    8. Expose Ports: Specify the port that the Flask application will listen on (EXPOSE 5000).
    9. Set Entrypoint/Command: Define the command to start the application (CMD [“python3”, “run.py”]).
    10. Build the Docker Image: Use the command docker build -t <image_name> . from the directory containing the Dockerfile.
    11. Run the Docker Container: Use the command docker run -d -p <host_port>:<container_port> <image_name> to run the image as a container.

    Understanding and Using Python Virtual Environments

    A virtual environment is a tool used to create isolated project spaces containing only the packages and package versions relevant to that specific project. Here’s a breakdown of why and how to use them, according to the sources:

    • Purpose
    • Isolation: Virtual environments isolate projects, ensuring that each has its own dependencies without conflicts.
    • Dependency Management: They allow for specifying and managing exact package versions, which is crucial for consistent performance and avoiding compatibility issues.
    • Requirements File: Facilitates the creation of a requirements.txt file, which lists all project dependencies and their versions, simplifying deployment and containerization.
    • Creation & Activation
    • Command Line: Creation is typically done via the command line using python -m venv <environment_name>. For example, python -m venv venv.
    • Activation: Activating the environment makes it the current Python environment for the terminal session. On Linux and Mac, this is done using source <environment_name>/bin/activate.
    • Usage
    • Package Installation: Once activated, packages are installed using pip install <package_name>. For example, pip install flask.
    • Dependency Listing: The command pip freeze lists all installed packages within the active environment, which can then be saved to a requirements.txt file using pip freeze > requirements.txt.
    • Replicating Environments: Others can install the exact dependencies of a project by using the requirements.txt file and the command pip install -r requirements.txt.

    Flask Application Development: A Minimalist Python Web Framework

    A Flask application is a web application built using the Flask framework, a Python microframework known for its simplicity and minimalism.

    Key aspects of Flask applications, based on the sources:

    • Minimalistic Approach: Flask provides only the essential tools and features needed for web development, leaving developers to implement additional functionality as required or by installing extension packages.
    • File Structure: A simple Flask application can be created with just a single Python file. However, more complex applications typically use a directory structure that includes templates and possibly blueprints.
    • Virtual Environments: It is recommended to create a virtual environment to manage project-specific dependencies.

    How to create a basic Flask application, according to the sources:

    1. Set up: First, import the Flask class from the flask library: from flask import Flask.
    2. Create an instance: Create an instance of the Flask class, which will be the WSGI application: app = Flask(__name__).
    3. Define routes: Use the @app.route() decorator to define routes, which map URL paths to Python functions. For example:
    4. @app.route(‘/’)
    5. def index():
    6. return ‘Hello, World!’
    7. Run the application: Use the app.run() method to start the development server. You can specify parameters such as the host, port, and debug mode.
    8. if __name__ == ‘__main__’:
    9. app.run(host=’0.0.0.0′, port=5000, debug=True)

    Key components and concepts in Flask applications:

    • Routes: Routes define the different URLs that the application responds to and the functions that are executed when those URLs are accessed.
    • Templates: Flask uses Jinja2 templating engine to render HTML files dynamically.
    • Static Files: Flask applications can serve static files such as CSS, JavaScript, and images from a designated static directory.
    • Blueprints: Blueprints are a way to organize larger Flask applications into reusable components.
    • Requests and Responses: Flask handles HTTP requests and provides objects for accessing request data, such as URL parameters and form data. It also provides mechanisms for creating custom responses, including setting status codes and headers.
    • Sessions and Cookies: Flask supports sessions and cookies for managing user-specific data across multiple requests.
    • Database Integration: Flask can be integrated with databases using extensions like Flask-SQLAlchemy, allowing you to define data models and perform database operations.
    • User Authentication: Flask can be used to implement user authentication systems, using extensions like Flask-Login and Flask-Bcrypt to manage user sessions and password hashing.

    Docker Containers: Application Standardization and Deployment

    A Docker container is a standardized unit of software that packages up code and all its dependencies so the application runs reliably from one computing environment to another. Here’s a breakdown based on the sources:

    • Purpose
    • Consistency: Docker containers ensure applications run the same way regardless of the environment, eliminating “it works on my machine” problems.
    • Efficiency: Containers virtualize the operating system, allowing for smaller sizes and faster startup times compared to virtual machines.
    • Isolation: Docker containers isolate applications from one another and the underlying infrastructure, providing security and preventing conflicts.
    • Creation
    • Dockerfile: A Dockerfile is a text file that contains all the instructions needed to build a Docker image. This includes the base image, dependencies, environment variables, and startup commands.
    • Image: A Docker image is a read-only template used to create containers. It’s built from a Dockerfile and contains everything needed to run an application.
    • Build Command: The command docker build -t <image_name> . is used to build a Docker image from a Dockerfile in the current directory.
    • Deployment
    • Docker Hub: Docker images can be stored in and distributed from registries like Docker Hub.
    • Run Command: The command docker run -d -p <host_port>:<container_port> <image_name> is used to run a Docker image as a container. The -d flag runs the container in detached mode (in the background), and the -p flag maps a port on the host to a port in the container.
    • Docker Compose: For more complex applications, Docker Compose can be used to define and manage multi-container applications.
    • Key commands
    • docker build: Builds a Docker image from a Dockerfile.
    • docker run: Runs a Docker image as a container.
    • docker ps: Lists running containers.
    • docker stop: Stops a running container.
    • docker save: Saves a Docker image to a tar archive.
    • docker load: Loads a Docker image from a tar archive.
    • docker images: Lists Docker images.

    To deploy a Flask application using Docker, the process generally involves the following steps:

    1. Create a Dockerfile that specifies the base image, installs dependencies, copies the application code, and defines the startup command.
    2. Build a Docker image from the Dockerfile using the docker build command.
    3. Run the Docker image as a container using the docker run command, mapping the host port to the container port.

    By containerizing a Flask application with Docker, you can ensure it runs consistently across different environments, simplify deployment, and isolate it from other applications.

    Flask Database Migrations with SQLAlchemy and Flask-Migrate

    Database migration, specifically in the context of Flask applications, involves managing changes to the database schema in a structured and organized manner. It is a way to evolve the database schema over time as the application’s needs change.

    Here’s a breakdown of database migrations using Flask-Migrate and SQLAlchemy, according to the sources:

    • Packages: Flask-Migrate and SQLAlchemy are essential packages.
    • SQLAlchemy is an Object Relational Mapper (ORM) that facilitates the interaction with databases using Python classes and objects, rather than raw SQL queries.
    • Flask-Migrate is an extension for Flask that uses Alembic to handle database migrations.
    • Avoiding Circular Imports: To avoid circular import issues when working with databases and models in Flask, a common approach is to use the factory pattern, where the application and database objects are created within a function.
    • Steps for Implementing Migrations:
    1. Initialization: Use the command flask db init to initialize the migration repository. This step is done only once.
    2. Migration Creation: Use the command flask db migrate to automatically generate a migration script based on the changes made to the models. Flask-Migrate detects the changes in the models and generates the necessary migration script.
    3. Applying Migrations: Use the command flask db upgrade to apply the migration to the database. This updates the database schema to match the current state of the models.
    • Workflow: The typical workflow involves making changes to the models (e.g., adding a new field, changing a data type), generating a migration, and then applying the migration to the database. This process ensures that the database schema is always in sync with the application’s models.
    • Database Types: Flask-Migrate and SQLAlchemy support various database types, including SQLite, MySQL, and PostgreSQL. To switch between databases, you only need to change the connection string in the application configuration. After changing the connection string, you need to migrate and upgrade the database.
    • Model Definition: Define database tables as classes that inherit from db.Model. Each attribute of the class represents a column in the database table. Specify the data type of each column using db.Column and the appropriate SQLAlchemy data type (e.g., db.Integer, db.String, db.Text). You can define the table name using the __tablename__ attribute. You can specify the primary key for a column using primary_key=True. You can specify whether a column can be empty using nullable=False.
    • Making Changes: To make changes to the database schema, modify the models, then generate and apply a migration.
    • Benefits:
    • Version Control: Database migrations provide a way to version control the database schema, allowing you to track changes and roll back to previous versions if necessary.
    • Collaboration: Migrations facilitate collaboration among developers by providing a standardized way to manage database changes.
    • Deployment: Migrations simplify deployment by ensuring that the database schema is automatically updated when the application is deployed to a new environment.

    Flask Application Server Deployment Guide

    Server deployment involves making a Flask application accessible on the internet. Here’s a breakdown of key aspects and methods, according to the sources:

    • Methods
    • Manual Deployment: This involves copying the application files to a Linux server, installing the necessary dependencies, and running the application.
    • Docker Containerization: This involves packaging the application and its dependencies into a Docker container, which can then be run on any server with Docker installed.
    • Cloud Services: Docker can be used in combination with cloud services.
    • Docker Containerization Deployment Steps
    1. Create a Dockerfile: A Dockerfile contains the instructions to build a Docker image. This includes specifying the base image, setting the working directory, copying the application files, installing dependencies, and defining the startup command.
    2. Build the Docker image: Use the command docker build -t <image_name> . to build the Docker image from the Dockerfile.
    3. Save the Docker image: Save the Docker image to a tar archive using the command docker save -o <image_name>.tar <image_name>.
    4. Upload the Docker image: Upload the Docker image to the server using a tool like SCP. For example: SCP <file_name> root@<host_name>:<path>.
    5. Load the Docker image: Load the Docker image on the server using the command docker load -i <image_name>.tar.
    6. Run the Docker image: Run the Docker image as a container using the command docker run -d -p <host_port>:<container_port> <image_name>.
    • Key Considerations for Docker Containerization
    • Virtual Environment: Use a virtual environment during development to manage project-specific dependencies and create a requirements.txt file.
    • Base Image: Specify a Python base image in the Dockerfile. For example: FROM python:3.10-slim-buster.
    • Working Directory: Define a working directory in the Dockerfile. For example: WORKDIR /app.
    • Install Dependencies: Copy the requirements.txt file to the container and install the dependencies using pip install -r requirements.txt.
    • Copy Application Files: Copy the application files to the container. For example: COPY . ..
    • Database Migrations: Run database migrations inside the container to ensure the database schema is up to date.
    • Port Mapping: Map the host port to the container port when running the Docker image. For example: docker run -d -p 5000:5000 <image_name>.

    By using Docker, you can ensure that the Flask application runs consistently across different environments, simplify deployment, and isolate it from other applications.

    Full Flask Course For Python – From Basics To Deployment

    The Original Text

    what is going on guys welcome back this video today is a full flas course combined into a single video it covers everything from the very basics of flask like working with HTML files rendering templates handling post requests working with files working with static files integrating bootstrap two more advanced concepts like sessions and cookies database interaction user authentication up until stuff like blueprints and even deployment and Docker so this is a very comprehensive course and it consists of 10 individual videos compiled into one big course so often times you will hear me referring to the previous episode or to the next episode uh in this case I just mean earlier or future points in the video so don’t be confused by that and I do this because most of you guys prefer to have one big course instead of 10 individual episodes so this is now the full flas course uh on the neural 9 Channel as I said it’s quite comprehensive so you might want to split it up into multiple sessions but yeah let’s get right into it I hope you enjoy it not a g all right so we’re going to start in this first episode today by creating our first simple flask application a simple hello world application just to get to know the process of creating and running a flask app so it’s going to be very beginner friendly and simple now as I already mentioned flask is a python web development framework and it’s often times also referred to as a micro framework or a microw web framework because it’s so simple and minimalistic compared to something like Django when you create a new flask application you don’t have any functionality out of the box you don’t have an authentication system or anything like that you basically have to implement everything from scratch or you have to install additional packages that implement the functionality we’re not going to go into the advantages and disadvantages we’re not going to compare here Jango versus flask we’re going to go into flask but it’s important to know that flask is very simple and minimalistic you can basically built an application with a single file you don’t have some uh project structure that has to be in place in order to run a simple hello world project we’re going to see that this is the case in a second here so the first thing we’re going to do is we’re going to create a virtual environment and the reason you want to create a virtual environment is because you want to have an isolated uh project where you only have the packages and also the package versions that are relevant to this particular project there are many reasons you want to do that but one reason is that it’s very uh convenient to then create a requirements txt file to then deploy the application to containerize it and so on uh but there are also other benefits so what we’re going to do first is we’re going to open up a command line so on Windows CMD on Linux and Mac the terminal and we’re going to navigate to the directory that we’re going to be working in in my case this is the current directory and here now we’re going to create our flask uh project directory so we’re just going to create a directory I’m going to call it now first app and in this directory here in this first app directory we’re going to create a virtual environment for this you don’t need to install any python packages this is something that works with python out of the box it’s part of the core python uh installation and what we need to do is we need to say python or Python 3 depending on your operating system- mvmf and then the name of the virtual environment directory I like to call itvn which makes it a hidden directory and once you have this once this is um created you can see that we have this virtual environment here and depending on your IDE depending on the editor that you’re using you will have to configure that now the environment that is being used is this environment because by default it’s going to use the environment it always uses uh in my case here in py charm what I have to do is I have to click here um on the python interpreter and I have to oh actually I’m blocking this with my camera let me just move this for a second I have to click on the python version down here I have to add a new interpreter a local interpreter and then basically I have to go to Virtual n environment existing and then I basically have to look for this so I have to in this case I have my prepared projects here uh I have to go to python current VN bin and then I want to use Python 3 this is the executable or the binary I’m interested in I click on this I click okay and now my pie charm uses this virtual environment um in addition to that the terminal that I want to use I also want to activate this environment in so I want to say Source at least on Linux and Mac source and then vnf bin and then activate and now you can see it’s using the vmf environment how can you check if this is actually working you can just type pip or pip 3 freeze and you’re going to get a list of all the packages that are installed in this case no package is installed now once you have the virtual environment running and activated what you can do or what you have to do is you have to install flask so pip or pip 3 install flask and then this is going to install uh everything that’s needed for a basic flask application I can run pip freeze again and now you can see I have a couple of packages here installed in this environment so after this what we want to do is want to create a python file called app.py and this is actually all we’re going to need for this video today we don’t need any uh directory structure we don’t need models we don’t need anything like that we can just have a simple python file and this is going to be our whole application of course when you build more complex projects you still have a directory structure you have templates you have Blueprints and so on we’re going to talk about this in future episodes but for a simple flask application one file is enough so what we’re going to do here now is we’re going to import from flask flask with a capital f so from flask import flask and then we’re going to create the application by saying app equals flask ask and we’re going to pass here uncore name uncore uncore so this is how you create the application and now what we do with this application is we add end points or routes you could say we’re going to talk about routes in the next episode but for this video we’re going to just create a simple uh default route a simple index route so what we’re going to do is we’re going to use the decorator so at app. Route and we’re going to specify the rule so basically the path that this uh route is going to to belong to and the default is just slash so app route slash and then below that we want to create a function that is going to return something uh which is what we’re going to see the HTML code we’re going to see when we go to that endpoint so here we’re going to say now def to create a new function index and here you can return something now later on we’re going to render HTML templates we’re going to do it professionally but for now you can just return any text you can just return hello world for example and this is what you’re going to see when you go to that specific endpoint now this is now the endpoint to actually run the application what we’re going to do is we’re going to say if uncore name uncore equals uncore maincore that’s just a basic uh python main section um what we’re going to do here is we’re going to say app.run and we can provide a couple of parameters here the three important parameters that we’re going to provide here are the host the port and whether we want to run this in debug mode or not so we can say host equals and what you want to do is you always want to run the application on the Local Host so on the host of The Machine uh not necessarily on Local Host but on the local IP address so if you’re running this on a server you can provide the IP address that you can find with the terminal so for example something like 1 192 168 and so on um or you can provide Local Host if you just want to run this locally or you can provide both by passing 000000 this is going to basically use the local IP address and Local Host so you can keep it simple and just provide this and then you can also provide a port I’m not sure what the default Port is we can actually see what the default Port is um and then you want to provide debug equals true now you don’t want to provide debuck equals true when you’re actually running this on a server when you’re actually deploying this but while you’re developing this application you want to run it in debug mode because then you don’t have to constantly restart the server you can just keep it running change the code and it’s going to update automatically uh and you’re also going to see the error messages and stuff like that uh but you want to turn this to false once you deploy the application so um right now I can just run this I think the default Port is yeah 5,000 but we can also change this for example you can say Port equals 5555 if you want to then you can run this and you can see it’s running now on Local Host and also on the private IP address and when I click on this it will open up a web browser and this web browser goes automatically to the default route slash and I get hello world as an output here and you can of course also change this to be HTML code so you can say here H1 and then H1 um yeah and and then this is going to to when you save this it will update because you’re running this in debug mode I can click on it and you can see now I have a heading here so this is the basic idea of a simple flask application what we’re going to do now in the next episodes is we’re going to add more routes we’re going to handle different types of requests we’re going to add uh Dynamic routes we’re going to add post requests and Status codes and templates and blueprints and all that but this is where it all starts this is the simple basic hello world application uh in flask and of course what you can also do is you can run this in the terminal you can just say Python 3 app.py this also works and uh just as one thing up front you can now take all the packages let’s say this is now your application you want to deploy it somewhere all you have to do for example to push it to GitHub so that people can uh use it you want to do something like um pip 3 freeze and then you want to pipe this with uh with the greater than sign with the close closing angle bracket you want to uh feed this into a requirements.txt file and when you have that you have this requirements txt file and then people can just go ahead and say pip 3 install dasr requirements txt and they can install all the packages that you have installed in this particular virtual environment all right so let us briefly recap what we did up until this point we created a virtual environment for our application so that we only have the packages that are relevant to this project that we’re building here and we created this simple hello world application in flask the idea is we import from flask flask with a capital f we create an application and then we add this index function which just returns hello world as a heading this is just some HTML code here and then we map this index function to the default route slash and then all we have to do is we have to run the application with the host 000000 which is automatically local host and also the private local IP address then we also customized the port to be 5555 and we set debug to True which has the effect of us not having to constantly restart the application to make changes or to apply changes uh it happens when we change the code and we also see the error messages instead of something like internal server error without any context so what we’re going to do in this video is we’re going to learn about routes we’re going to learn how to handle different types of um URLs so how to handle Dynamic URLs also also how to handle URL parameters and we’re going to learn about the different types of requests like post and get and put and so on um and we’re going to also learn how to return custom status codes so let us start with a very simple thing first let’s just add another endpoint here which has a different route so we can say here another function let’s say hello and this function will also return just a simple hello world maybe not as a heading this time uh what we can do easily we can just say app. route and the route can be something like SL hello the important thing is every route want it has to start with a slash so we have to say slash and then something and you can call this route whatever you want you can call it hello you can call it hello world you can call it ABC it doesn’t matter and it doesn’t even have to match the name of the function so I can call the route XYZ and I can call the function hello this is also fine and by doing that you can basically add as many end points as you want so what you have to do is you have to run the application and then you can just say slash hello and then you will get to this end point uh that is mapped to the function or that the function is mapped to now this is all static so I can add a bunch of those and they’re always going to be the same however what I can also do is I can add certain or so-called URL processor so I can have variables in the URL itself that I can handle in the function so so for example what I can do is I can create an endpoint here a route uh which I can call slash greet and then what I can do is I can add uh a name here so I can say I want to greet a certain name and how I can do that is I can use angle brackets to specify name here so now it’s not greed and then slash angle brackets name this is not the endpoint but name is now a variable that can be dynamic so I can say greet Mike greet uh Bob or something like that this and the way I handle this is I create a function and the function takes the parameter name so in this case what I could do is I could say fstring hello and then name so the idea is now in the URL itself I have the parameter name and I can go to the route greet SL mik and I would get a different response then when I go to greet SLB for example and uh we can see that this is the case by just going to SLG greet SL Mike and there you go hello mik SLG greet SL Bop hello Bop so this is what is called a URL processor now there are certain things that we can add to these URL processors so for example if I have a route um let’s call it at so slash add and what I have here is number one and number two then what I can do is I can Define the function add which takes the parameters number one number two but you’re going to notice something if I return for example an FST string saying number one plus number two is equal to number one + number two what you will notice is that when we go to the application and I actually go to add sl10 sl20 you will see that the result is 1020 and of of course this is because what happens by default is that the parameters that we pass are considered to be strings so they’re just concatenated so the string 10 plus the string 20 is of course 1020 that’s a string concatenation if I actually want to do a calculation I have to typ cast these parameters so what I can do of course is I can say number one equals int number one but I can also just specify the data type of the parameter of the um of the it’s not a URL parameter of the um value that is passed here as part of the dynamic URL I can specify it here in the route already so I can say it’s an INT colon number one and it’s an INT colon number two so what happens here now is that this is considered to be uh an integer already so I can say at 1020 and you can see 10 + 20 is 30 what happens now is though when I pass something else so when I say 10 hello I get not found because this is now obviously a string it cannot be typ casted into an integer and this route is only for integers so if I pass something that’s not an integer it doesn’t even have the route it doesn’t find the mapping so those are or this is how you do Dynamic URLs those are URL processors what we can also do is we can pass actual URL parameters and maybe you’ve seen this or probably you’ve seen this um on a couple of websites you go to something like uh login now hopefully it’s not done like this this is very secure uh but you usually have something like login and then question mark username equals and then something and then you have an ant and then you have password equals and again hopefully it’s not in clear text in the URL but these are URL parameters if you see them somewhere so how can we handle those in flask what we can do is we can do the following app route and then maybe let’s call this handle uh the suggestions you see here are by the way from my prepared code it just thinks that I’m going to write all the stuff again and I actually am uh so handle query or handle URL params let’s call it that way uh handle URL parameters and the function is going to be handle PMS or something like this uh now we don’t need to pass anything here now as a parameter the parameters here are taken from the URL so if I have uh these URL processors year they’re going to be part of the function signature if I handle the actual URL parameters it’s happening by uh using a so-called uh or using the request instance so what I have to do is I have to say from flask import flask and also request and then it’s going to be part of the request uh object so I can do here or actually I can return uh the string version of request do arguments so I can just return this as a string version and then I can go to handle uh what was it handle URL params and you can see it’s an empty dictionary so it’s an empty immutable dictionary but if I add now some parameters so uh question mark name is equal to mic then you can see I have name and mik in here and if I say ant greeting is equal to hello you can see I have name mic greeting hello so what I can do here is I can say that I want to handle the following thing the greeting is going to be equal to request. ARs doget and I can say here greeting and the name is going to be the same thing with Name by the way this is a dictionary so you can also instead of saying get you can just do this this also works um and then we can return for example an F string that says greeting and then name so when I go back I can just go to slash handle your url parameters and then name mic greeting hello hello mic so this is how you handle the URL parameters now of course if one is missing this is going to give me a bat request key so it makes sense to check if we have all the parameters available we can do something like if greeting in request arguments. keys and name in request arguments. Keys then we do all this otherwise we return some parameters are missing uh so now if I do this I get some parameters are missing and if I go to this I get hello mic all right um so this is how you handle the uh URL parameters now if you have a post request you actually get uh a form we’re going to talk about this I think in the next video so we’re not going to handle the post parameters yet so not we’re not going to handle forms that actually um include uh include information that we pass with a post request however what we are going to do is we’re going to learn how to handle different types of requests because all these routes all these endpoints that we Define here are by default only handling get request so we can see that this is the case by opening up a terminal uh I’m not sure if this works out of the box on Windows it does work on Mac and Linux uh you can use the tool curl and if you don’t have curl just install curl using your package man manager uh and curl basically just sends a request so I can say HTTP colon sl/ uh then Local Host slash hello for example and of course I need to specify the port which is 5555 uh and you can see I get Hello World here uh as an answer so I can just send a simple get request to an endpoint and I get whatever this endpoint returns to me now what I can do is I can also specify the method so I can say curl – x so capital x and then post to specify that now I’m sending a post request to the same same endpoint and what you can see here is I get as a response 405 method not allowed so the post method is not supported by this endpoint now if we want to change this if we want to allow for post requests we need to Define this in the route definition so for example if I want to allow for post requests on the endpoint hello what I have to do is I have to say methods equals and then I have to pass a list of all the methods that I want to support on this endpoint by default this list looks like this it’s just get however I can also say it’s just post if I specify it like that get requests are no longer allowed so I can save this I can open up my terminal and I can say curl um HTTP colon1 27001 5555 and then SL hello you will see it now tells me method not allowed even though didn’t specify post or exactly because I didn’t specify post whereas if I say DX poost you will see I get hello world so if I want to support both I just have to say get and post and then I can run the same thing it works and I can also run just uh now the displaying is a little bit messed up there you go I can also do it with get and I also get the same response now the difference between get post put delete is not really uh a technical one primarily it’s primarily a convention you use get when you want to get a resource when you want to get information you use post when you want to submit information so when you want to create something uh you use put when you want to update information so when there is for example uh if you have a to-do list application you already have an existing to-do you want to change something about it you use put and if you want to delete it you use delete so those are the four main methods there are also others but we’re going to to focus on those four uh and you can basically just specify that you want to allow for put you want to allow for delete and so on maybe you only want to allow for delete but this is how you use them get to get information post to create information or to submit information put to change information delete to delete information um now let’s say you support multiple of these methods on the same endpoint how can you differentiate between the two uh or between the three or four let’s say I have get and post here what I can do is I can say if request. method is equal to get then I want to have a certain kind of behavior so then I want to return for example here um you made a get request then I can say l if request method is equal to post then I can just print you made a post request now you can also if you want to add an else Branch but this is not going to be relevant because the proper message here is you will never see this message because of course we cannot send a put request or a delete request or anything else to this endpoint you will always only get a get or a post request so I can go again into the terminal maybe let’s go ahead and also add a back sln Indian just so we have a line break so that we don’t have to constantly mess up the formatting in uh in the command line so I can send this request you made a get request I can send a post request you made a post request and what you usually do later on we’re going to learn about templating and using HTML files and so on uh what you usually do is you have one endpoint that does something and when you send a get request to that endpoint you get the HTML template so you get basically the form to fill out with maybe create a new to-do you get uh when you send a get request to this create to-do page you get the form that allows you to create a word top specify the new to-do and then when you click the submit button you send a post request to the same endpoint to actually create um the to-do so in the get Branch you would serf the HTML file and here you would actually process the information from the form um all right so this is how you handle the different methods now last but not least I want to show you how you can return a custom response so how you can uh specify the status code that you want to return and for this we’re going to actually also use the hello here let’s go back and just return hello world and let’s only allow for get again um what we can do here this is the simple way to do it we can just specify the status code by passing uh or by returning it as a second value here so I can just say comma 200 and this will return a 200 status code now I think 200 is the default we can see if that is the case by just going again into the terminal and let’s just add again here for formatting reasons back ACC in uh we can go ahead and say curl but I can also specify here Dash uh what was it I wrote it down here um I think it’s- i- capital I to get the response header so you get HTP 200 okay and then you get also the content type the content length you can see it’s text HTML uh it’s content a Content length of 12 and so on now I can change this by just saying comma 2011 which is created so usually use that after a post request I can just curl again and you can see here now I get 21 created I can also change this to 202 and then you get accepted I can also change this even though it doesn’t fit here I can also change this to 404 which is not found and you can see I get not found I can also change this to 500 which is I think internal server error there you go I can also change this to 51 which is something else not implemented and I can also change this to something like 936 uh which I don’t even know what it is unknown there you go or I can change this to something like this I’m not sure if this is going to be rejected uh yeah unsupported Response Code and HTTP response so I have a video on this channel where I explain the different status codes when to use which one and what they basically mean I’m not going to go through all this here just know 200s are basically to tell you that uh everything worked fine 300s are for redirection uh 400 is telling you you did something wrong and 500 is telling you the server messed up something that’s like the most important thing to know um now we can also go ahead and create a full custom response so we can go and say from flask import flask request and make response and then we can craft a full response we can say response is equal to make response and then we can do things like response do status code is equal to 202 for example and then we can also say response and I can actually or response. headers and I can actually manipulate things like content type is going to be equal to and I can change this to application SL octet stream for example or Json or text plane or something like this so I can go now and you can see we get actually we don’t get this because we were still returning hello world we need to of course return the response there you go you can see now 202 accepted content type application octet stream uh and of course now we we don’t have any text so we would have to add here hello world back sln to have the content there you go and we still have content length 12 and if I just do it like this I still get hello world um we can also change this here to text/plain which is more fitting I guess there you go text plane 202 accepted and this is the content so this is how you can craft custom responses all right so we’re going to cover a couple of different concepts in this video today as I already mentioned we’re going to learn how to render HTML files we’re going to learn how to work with templates in addition to that we’re also going to learn how to redirect we’re going to learn how to dynamically get the URLs for specific end points and we’re also going to learn how to work with the Ginger 2 templating engine how to use filters how to create custom filters so it’s going to be a quite comprehensive episode today now what we have here is a very basic hello world project we just have a simple index endpoint and that’s it and up until this point every time we had an endpoint we returned some string some Json object something like this but not an actual HTML file and this is the first thing that we’re going to change now so what we’re going to do is we’re going to create a directory full of templates full of HTML files and then we’re going to render them instead of just returning a text and the first step to do that is in the definition of our application we’re going to add a keyword argument called template folder and we’re going to call the folder in this case templates this is what it’s usually called now this folder this directory now needs to be created here in our app application so I can rightclick new directory and I can call this here templates now to keep it very simple what we can do now is we can just create an HTML file in here let’s call it index HTML and in my case here I already have some basic structure just doc type HTML HTML head uh characters set defined a title and then an empty body and we can say the title is flask app and uh then I can just you know have a heading here hello world or something like this this is now an HTML file in my templates directory a very simple one now in order to return the HTML file and not just some text I need to import a function or a method called render template and now what I do is I render the template instead of returning hello world so I say return render template and then just the name of the file we don’t need to specify the path because we already know that the template folder is templates so all I have to do is I have to say index HTML and in this case when I run the application when I go to the browser you’re going to see Hello World the HTML file has been rendered now the good thing is now we can do a lot of things here that we can usually not do with HTML files we can dynamically uh change what is happening in this HTML file we can change the content of this HTML file and we can do that for example in a very simple way by just passing certain keyword arguments so for example I might have uh my value here and my value can be hello world or let’s change this to something else like uh uh let’s just call this neural 9 and then I might have some calculation my my result is equal to 10 + 20 I do some stuff here in this method I call some functions I do some processing and then I want to put these two values these two resulting values I want to feed them into the HTML file and I want to dynamically render them in the HTML file what I can do for this is I can just pass keyword arguments whichever keyword arguments I want I can say my value equals my value I can say my result equals my result and of course they don’t have to be the same name I can also say uh XYZ equals my value this is not a problem the important thing is that the name that I choose for the keyword argument so the left one is the one that I have to access in the HTML file the right side doesn’t really matter this is just a value um so now I have these two values and I can easily just go into my HTML file and all I have to do to display them is I can use some tag so for example a paragraph and in order to access these variables these values I just have to use double curly brackets and I can uh now specify the variable name so my value for example and I can copy this and change this to my result by the way I think that if you’re working in pyrum you need to set up the templating language I think you need to go to settings um template is there something like template language yeah you have to go with template language and change this to Ginger 2 because this is the templating engine of uh of flash but I think this only works in the professional Edition I’m not sure about that uh but it’s only about syntax highlighting you can also do it without that so you have these two um things here now and what I have to do or what I can do now is I can just go reload the page and you can see I get the values in the page even though I didn’t explicitly say neural 930 I get whatever I passed from the function here so that is how you use values that you pass now you can also do some more advanced stuff so for example what I can do is I can say my list equals and then I can have some elements in here 10 20 30 40 50 and I can say that I want to pass the list so let’s just pass the list only my list equals my list let’s delete these two things um and what I can do now is of course I can go here and I can just say my list this is easy in this case um what would happen is I would just get the list but I can also uh use certain other structures of the templating language so I can go ahead and say I want to have an unordered list so ul and then I want to have certain list items and I want to list all the individual elements of the list how do I do that I can do that with a Ginger 2 full loop so I can use a single curly bracket not not double single and then percent and then I also close this with percent curly bracket and here I can say now four and I can call this whatever I want item in my list now I need to close this with curly bracket percent and for percent curly bracket and in between now for each element in the list I will do something so I can also just say hello then I’m going to do this five times uh this also works as you can see uh but it makes more sense to have a list item and to have the content of this list item be double curly brackets item so what we do here is percent so single curly bracket percent for a full loop also for if statements and so on and we use double quot uh not quotations double uh curly brackets for individual variables or values then you can see here I get a list of the values so this is what we can do here um what else can we do now we can do a lot of things we can um do conditions so for example I can say uh curly bracket percent if item is equal to 30 uh what I want to do then is again also here end if then I can say if that is the case I want to have a specific list item where the style is color red item and I also need an else branch and I can just copy this here there you go uh and in this case now this one is red because I have this condition in here uh now of course I can also take this and make it more efficient by just not doing it like this by just saying here uh within the the list item I can just go and say percent if item equals 30 then add the style and if and otherwise don’t this has the same effect it’s just uh another way of writing it so basically we have the if here and then this is what happens if the condition is met so this produces the same result as you can see um all right so that’s like the simple stuff um this is the basic idea of templating um or at least of of of using values in the templates now what we can also do and this is now very interesting is we can inherit templates so let’s say I want to have the same navigation I want to have the same uh header I want to have or the same head section I want to have the same Imports I want to have the same content on every single page I have on my page uh or on my uh application uh and I don’t want to rewrite it all the time so actually the only thing that’s different about this index HTML compared to all the other files in my application is this content here I don’t need the rest this is just what’s unique about this everything else should be the same everywhere else maybe the title not what we can do for this is we can create a so-called base template so I can go ahead I can I can create an HTML file base. HTML and in this base HTML file I can now Define the structure so I can say we have this doc type HTML again HTML language English uh we Define a character set I have a body and so on um and the title now we can make Dynamics so we can say if you inherit from this template you will be able to fill in certain blocks so you will have certain sections that you can change and as such a section can be defined as curly bracket percent block and then we can choose a name for this section so title for example and then I also need uh end block the idea now is that when we inherit from this template we’re going to see how to do that here in a second when we inherit from this template we can fill in this section so depending on which page you’re in you’re going to get a different title however I can also put a default value in between so I can say default value for example this is going to be the default title if I don’t actively fill in the title in the sub page that is inheriting from this template uh and then I can do another block here in body I can say um again curly bracket percent block content and I can close this here end block and then I have some content here so this is now the basic structure and of course if I want to I can have a navigation here on each page and this is now always the same it’s not part of the block it will always be there um or maybe just to show you that this is the case I can add a paragraph here this will always be here because it’s not part of the uh of the block content here or of the block content here um and now what we can do is we can go into our index file and we can extend from this template so I can go here I can delete all of this here and at the top of my index HTML file I can say now uh curly bracket percent extends and then base. HTML like this so now it extends from base HTML it has the same structure and I can fill in the blocks now I can do the same thing block and title and block and in title I’m going to say here just index page and then I can say block content then I have my content here and I can close this block there you go so now what I can do is I can refresh the page you can see this will always be there and I still have the same content and I can do this now with a different page as well I can copy this I can call this other HTML um I can change the title to other page and I can you know maybe just have a heading here other something like this then I also need an endpoint for this so let’s copy this let’s call this other let’s put around to other and then just render other HTML there you go and now when I rerun this you can see here first of all we have um again here index page and then I can go slash other and this is still here and we get other Pages a title here so this is very useful because you don’t have to constantly uh make all the changes everywhere imagine you don’t do that and you want to include a new CSS file or a new Javascript file or you want to import bootstrap or something you cannot just do it here once you have to do it at every single HTML file you have and chances are you have hundreds of them depending on the size of your application so it makes a lot of sense to have this base HTML file um for the basic structure and then to just extend it here uh with with the other HTML files all right so now let us move on to a concept uh called filters now I have a video on this channel separately a separate video about filters in ginger um and I’m just going to briefly go through them so I’m going to create here a new or actually let’s use the other page for that let’s call it filters here um what we’re going to do now is we’re going to explore the effect of filters so very basic here let’s say I have uh some text that I pass to this to this endpoint I have a text and let’s call this text just hell World Su text equals Su text now as we already saw I can just display this in a paragraph here in a very simple way by using double curly brackets some text just to see that this still works there you go hello world now what I can do is I can say I want to have certain operations applied to that a very simple one is I want to have everything in uppercase now what you do in Python is you call the Dot Upper function or you call other methods of the string this is not really possible here in ginger what what you do in ginger is you use templates and to use templates uh not templates sorry filters uh and to use filters you need to pipe the text through a filter so we use the pipe symbol and for example one filter is upper this is a built-in filter you need to to know that these exist there is a there’s a list of them in the documentation but this is a built-in filter and now if I go to the page you can see we get hell World in uppercase I can do the same thing in let’s maybe just keep all of them to compare them I can do the same thing with lower so now if I go here you can see it’s all lowercase and there are also other filters so for example I can do title I can do stuff like uh replace where I can also add parameters so I can say replace all the else by uppercase lse for example this works so here you can see title case is just default and then we have here the replace filter active um and then we can also do uh or actually you know there there’s a huge list of different filters that you can use but what I’m interested in showing you here is that you can also Define your own custom filter so you can say uh let’s say you want to have a a filter that reverses the string for example for some reason you want to do that um this is not a filter as far as I know that is available by default so you have to implement yourself and you can easily do that by going into your appy and importing from flask here um or actually I don’t even think we need to import anything sorry uh we can go down here and we can create now not a route so not app. route but app. template filter uh and we can call this filter for example reverse string then I can call the method reverse string and it takes something as a parameter um and this parameter is just our text so our string s and what I can do now is I can just return s and then I can reverse it like this colon colon1 this is just how you reverse the string in Python and now what I can do is I have this reverse string here I can go to my other HTML and I can say reverse string and now I can go here and you can see it reverses the string it’s my custom Behavior I get some input and I return some output this is my filter I can do other filters as well I can do a filter called uh what did I have here repeat is a very simple one repeat also takes additional parameters so I can say repeat um and repeat takes a string and I can also say it takes times and Times by default is two but it doesn’t have to be it can also be 10 and then I return just s * times so I can go here I I can copy this I can say repeat and I can say repeat five and then you can see Hello World hello world and then I get it five times as well um maybe another thing that we can do is we can alternate the case is just now one more example here we can go and say app template filter alternate case basically everything that’s uppercase will be made lower case and vice versa so alternate case of s and now we can return here MP string join I’m going to use a list comprehension character upper if I or actually uh no this would be swap case alternate case means uh you have uppercase lower case uppercase lower case uppercase lower case so what we’re going to do actually here is we’re going to say if the index is um modulo modulo 2 is zero so if it’s an odd uh if it’s an even number we’re going to do c. uper else C do lower for i c in enumerate s and then what we get is of course we need to apply it as well let’s go to other alternate case there you go we get this uppercase lower case uppercase lowercase uppercase and so on so this is how you use filters now one last thing or actually uh two things that I want to show you here now is uh one the redirect and two how you get Dynamic URLs so how you can get um Dynamic how you can get the the the URL of an endpoint dynamically without having to specified statically because of course it can change so first of all let’s do the redirect um or actually first of all let’s do the the dynamic URL because the redirect can then use the dynamic URL for the redirection uh now let’s say on my index page I want to have a link to other so I want to have a link to the endpoint other now the endpoint other might have actually this URL here but I might uh I might change this over time so I might say this is something else now I don’t want to manually Define that this is the endpoint uh or that this is the route to this endpoint so what I can do here in the index pages I can have a link I can have an A an anchor tag uh with the following destination and now I can use double cly brackets again and I can say URL or4 and then I just pass the function name other and then I can say here other now you can see I didn’t specify the route at all but if if I now go to to this and I reload the page you can see I have a link to other and you can see in the bottom left that it actually gets me to this page so you can see here that the link is going to this URL here to this endpoint dynamically if I change it it’s going to change as well so if I go here and I change this again back to other it will also change in index HTML without me having to do anything there you go still works uh now this can also be used for redirects and this can also be used in the python code not just in HTML not just in the templating engine so for example what I can do is I can say let’s add a new endpoint here app route redirect endpoint and then I can say redirect endp Point here uh what I can do now is I can return instead of returning a template or a text or something I can just return a redirect and for this I need to import the redirect function and I can just say return redirect and the location now I can of course say just slash other but I can also do and for this I need to also import URL 4 I can just call the URL 4 function here URL 4 and then other for example redirects me to other um so if I now run the application again and I go to slash redirect endpoint you can see I end up at the other page so yeah this is how you can do that this is how you work with templates this is how you render HTML files how you can use uh filters in ginger how you can extend templates and uh how you work in general with actual HTML content not just text all right so we’re going to cover a lot of different things in this video today primarily we’re going to focus on handling post requests in the back end in a more advanced way than we already did in episode two we’re going to learn about forms we’re going to learn how to handle forms data we’re going to learn how to send post requests using JavaScript with Json data we’re going to learn how to handle that Json data we’re going to learn how to upload files how to process uploaded files how to respond with a file download for the user uh and stuff like that and what we have here now for the beginning is a very basic flask application which just renders an index HTML file this index HTML file just has a heading hello world and it extends a base HTML template nothing too fancy here very simple we already know how all of this works I can run this so that you can see what this looks like again just a basic hell World page and what we want to do now is we want to handle a post request but we don’t want to do it the way we did it in episode to with curl with a command line tool we actually want to have an HTML form where I can input some data where I can press a button and then the post request is sent and something is done based on that post request so what we’re going to do here is a very simple example is a uh dummy login page so we’re just going to have username password and then we’re going to send a post request with username password and if they match some static string then we’re going to say success otherwise we’re going to say fail so this is of course not an authentication system it’s just a dummy page that you know processes username and password and Compares them to Strings but it’s a good start to understand what is happening here or how this works so we’re going to use index for that and what we need to do first is we need to specify that multiple methods are allowed here by default remember get is already allowed but we still need to specify it here if we want to change this uh and we now also want to allow for post requests here so the idea is with a get request we want to get the HTML page to display the form and then when we submit that form we want to send a post request and then we want to process the data that was sent so what we’re going to do here is first of all import request and we’re going to distinguish two cases between two cases if request. method is equal to get then what we want to do is we want to just render the index HTML file otherwise if request method is equal to post we want to do something else that we don’t have yet so I’m just going to return an empty string for now uh we’re going to implement that once we have the form so what we want to do now is we want to get into index HTML and we want to create a simple form so I’m just going to say here form and now we need to specify a couple of things we want to say method is equal to post this is a post request that we’re sending and the action is the target URL that we’re sending this to here for this we’re going to use again double curly bracket URL 4 and the endpoint that we’re sending the post request to in our case index now of course what you can also do if you want to you can also create a separate endpoint login that only accepts post requests and then index only accepts get get requests and then of course you can also send the action to another page you don’t have to send it to the same page you can also send it to a different endpoint uh but we’re going to do it like this now and in this form we’re going to have two basic fields in input type textt now the important thing here is the name we don’t need an ID this is more for CSS stuff or styling we don’t need a class we need a name the name is important because the name is what we’re going to get as a key uh for the key value pair in the backend so we’re going to say that the name is username here uh and then we’re going to define a placeholder username and then we’re going to copy this type password name is going to be password and placeholder is going to also be password like this and then finally want to have an input type submit with the value login and probably we should add some line breaks here so when I run this here you can see we have this basic form I can enter some stuff and I think if I just do something I’m going to get an empty response here because remember if we send a post request which we now did we just get uh an empty string as a as a result here so what we would actually want to do is we would want to compare the username and password to our quote unquote actual username and password so what we do here is we say username equals and now we have to get the username from the post request that was being sent so we’re going to say request. form now this is important if you get the request from a form the post request comes from a form we get request. form Dot and then get key or you use it as a dictionary however if you send a request with JavaScript and you send a Json object you have to use request Json we’re going to look at this here in a second request form and now I can access the key username like this or I can also say form. get usern name whatever you like it’s the same thing it’s just a different way of writing it then password request form get password so now we get these things from the post request and of of course if you have some optional stuff uh it makes sense to first of all check if it’s part of the form so you can say if and then before getting it because in this case you would get an exception if you have something that’s not part of the form that was submitted and you try to access it you’re going to get an exception it’s going to crash your application what you should do is something like if username in request form Keys only then get username but in this case there’s no way uh to not get to not get the username because we’re going to use the application properly so for now we’re going to ignore this but this is how you get the two things now from the form and now we can say if username is equal to let’s say neural 9 and password is equal to uh let’s say password then return now we’re just going to return a text success otherwise we’re going to return failure like this so I can go here again I can type some nonsense there you go failure and now I can go and I can say neural n password success so this is how you handle very basic form data now what we can also do is we can upload files this now gets a little bit more advanced because you need to consider a couple of things when you upload files you have to to uh provide specific types of in puts you also have to change stuff about the form itself and you have to also access the files in a different way so this right here is a very simple way you just have some input stuff you have some text password number whatever and you just name them and you just access them this is how you handle basic form data you can now add a bunch of other fields here with type number and stuff like this doesn’t really matter it’s the same way of handling it you just get the form dictionary and then you get the individual keys and again if something is optional you just say if whatever key you have some key in request form Keys then get it from there to keep it safe now we’re going to handle files and for this I want to actually create a new uh a new endpoint I want to create an endpoint file upload so we’re going to say app route slash file upload file upload and and here now we want to handle what happens when a file is being uploaded for now I’m just going to return an empty string because first of all again I want to handle this in the HTML file so we’re going to create another form here let’s maybe add a heading in between to know the different sections we’re going to add a new form here and we’re going to start the same way method is equal to post action is going to be equal to now of course different URL so URL for the method or for the function file upload and the important thing now is that we need to specify an encoding type we need to say that this is now uh we we need to add this parameter here en type is equal to multiart form data because we’re going to pass files now so it’s a different type of encoding that we have to use here multiart form data this is important then what we can do is we can say input and the type of the input is file however this is not all of it because file is very generic what kind of file are you expecting are you expecting any type are you expecting any kind of file or are you expecting maybe just plain text or just uh Excel files or just CSV files or something like this uh depending on that you’re going to have to specify uh a different keyword here or or a different uh parameter here in a second so we’re going to say the name is just file nothing too fancy uh and what we want to do now is we want to say accept equals and accept equals now you can specify certain uh content types now what these content types uh content content types are exactly you have to Google most of the time here in py charm I have uh all the suggestions which is very convenient but um if you have a certain file type that you want to uh allow for here you need to Google what the content type string is actually uh what I want to allow here now is I want to allow uh Excel files so basic Excel files XLS and xlsx and also plain text so how do I do that I have to know what the proper um content type is for Excel and I think it is um application vnd D and then we need open XML formats so you have to scroll for a while here oh actually I don’t think that we have it here so I have to type it out applications SLV and. openen XML formats Dash Office document uh do spreadsheet usually you want to copy that you want to you don’t want to type this out actually I’m going to copy this now because that that’s no uh there’s no value in uh in doing this here so let me just mark this and then copy this to my clipboard then I’m going to just paste this here so the idea is you get the content types in this case I have three content types this is one then I use a comma to separate them then I use another one and then I use a comma again another one so here I have uh Excel Excel again and then uh text PL so txt files so that’s basically it then I can also set this to required equals required even though I think required in of itself should be enough let’s do it like that and then I can use again input type submit or yeah submit and then the value of that is upload file so let’s go ahead I can browse the file I can use data xlsx I can upload the file and in this case it tells me method not allowed because in my file upload here I didn’t specify that the method that I want to allow here is equal to post let’s go again upload the file and I get nothing in return because of course we had return an empty string so now it’s about handling that file let’s say what we want to do here in this case is we just want to uh in the case of a text file we want to to return the content of the file so we just want to display the content of the text file in the case of an EXO file we want to uh render the table we want to load it into a data frame and we want to render the table um to the HTML file so we want to show an HTML table off the data frame for this of course we need pandas so if you don’t have pandas installed uh this is now just an example by the way if you don’t care about pandas you don’t want to process Excel files just skip this you don’t need to work with that that’s not part of the course but we’re going to do this here now as an example in this case you would have to install pandas like this pip or pip 3 install pandas uh and of course we need to also then import pandas SPD um and now what we would do here is we would first of all get the file so we would say that the file is equal to request do files this is now a separate field it’s not form it’s not Json it’s files specifically for files and here want to get file this is again the name here file uh what we now want to do is we want to look at the content type of the file and decide what we do with that file so we’re going to say if file. content type is equal to text/plain if that is the case all I want to do is I want to return file read read the content of the file decode it so that it’s a string because it’s binary data I think uh by default since we have uh the encoding type um and that happens when we have a text file otherwise if the file content type come on file content type is equal to the Excel stuff and I think for this I’m going to just do it like this or file. content type is equal to that so just a two different uh content type strings if it’s one of those then what we want to do is want to say data frame is equal to pandas read Excel and then uh the file like this and then what we want to return is just df2 HTML which is a method in pandas that allows us to turn the data frame into HTML so that we can easily just uh display it all right so that is it and we can actually see now hopefully that this works so I have data xlsx I can upload it and you can see I get the content of the Excel file this is the content of the Excel file uh as HTML here rendered now I can also go here now and I can create uh a text file let’s call this hello.txt and I can say hello world this is a text file with some text and then I can go here I can browse I can get hello txt upload file and there you go now the line braks are not displayed properly but that’s okay uh and you can see we can distinguish between content type and get different responses so this is how you handle file uploads you get a file from request files this is just whatever file you submit here is input type file you accept certain file formats you can check for them you can process them in different ways depending on what the content type is so that’s actually quite straightforward and simple let us now actually go and Implement uh a use case that might be interesting let’s go ahead and convert um an Excel file to a CSV file so we take an Excel file and we take the content that we displayed as a table here in HTML and we want to return so this is now also about a file download as a result of the request we don’t just want to display something we actually want to return a CSV file to the user that the user can download so how can we do that for this what we’re going to do is we’re going to create an endpoint app route we’re going to call this convert CSV by the way the reason you already always see uh the names that we’re going to use is because I have all the code prepared so it already knows what I want to call the functions or the routes at least so convert CSV is going to be the endpoint um and here now all we want to do is we want to take the file and we want to return the converted version so the csb file and for this now again we’re going to just copy this part going to paste it down below I’m going to change this to convert to C vsv and now we’re not going to allow for text plane we’re only going to allow for EXO so we have um and also we’re going to not send this to file upload we’re going to send this to convert CSV and it’s important of course to specify here again methods is equal to post we accept post requests on this endpoint and uh the idea is the same now we get the file we say file equals request files file and in this case it’s always going to be an Excel file we don’t even need to to check for this it’s always going to be an Excel file because those are the two things that we accept um by the way let me just I hope this can be run right now you can see which types are supported down here you can see now since I in the first form allowed for Excel Excel and text file these are the supported types and only these are actually displayed here uh whereas here now I only have Excel and Excel um all right so we know that this is going to be the file type what I can do now is I can load this into a data frame again pd. read Excel file and then I can craft a response that I can give to the user and in this response I’m actually returning a file how do I do that I import from flask response with a capital R and then I do the following thing response is equal to response and here I specify a couple of things first of all what am I responding with and what I’m responding with is a CSV file so df2 CSV I’m taking the data frame and turning it into a CSV file and since I’m not specifying a path here I’m getting the object itself as a result so df2 CSV then I specify the mime type which is the content type and the string for CSV is just text SL CSV and then what I do is I say header equals and here I pass now a dictionary with a key content disposition and we pass uh the value attachment and file name equals and now now you can choose the file name of the CSV file now this is important this optional but this is important because the file itself uh doesn’t have uh or actually I’m not sure if this is uh in this case is even optional maybe it’s even mandatory but the thing that you’re returning you need to also specify a file name for it and what you can do with this header field is you can specify what the download name is going to be because there’s also another use case which we’re going to look at in a second where you actually have the file stored on your system and the file might have a completely random file name but you want to return it as result CSV for example so this is why you need this header and now what we do is we just return the response itself so again we get the file we load it into pandas we turn it into a CSV file we specify the type we specify the header with a file name and that is it so now this should already work I load the Excel file upload file and now you can see that for this I’m going to now navigate to my uh directory here result CSV I don’t want to do that come on current save result CSV and now I have a CSV file with the information from the Excel file so this is one way to serve a file this is one way to return uh a file for download we can find a second way now or we can do a second way now uh which is you get the file you download the file from the user so the user uploads the file and um you you process the file and what you do is the result you don’t return it immediately you save it in a downloads directory and then what you do is you return to the user a download page with a separate button so the user uploads an EXO file clicks on convert and instead of just getting the file as a result he’s redirected to a download page and at this download page uh the file is then loaded from the system from the server uh and download it this is in my opinion more professional most of the time you don’t want to just return the file immed medely you want to have a download page uh and then you can download the file from there but of course it depends on the use case so we’re going to call this convert CSV 2 um and the function is going to also be called convert CSV 2 and of course this takes methods equals post and what we want to do now here is let’s copy this convert to CSV 2 convert CSV 2 uh we’re going to have to add a couple of things here because we need a download template in our application we need to have here a download HTML file which actually I’m going to just copy index I’m going to call it download HTML and for now we’re just going to have downloads as a heading here and actually nothing else I’m going to add the stuff later on um and in our convert to function now we’re going to do the same thing file equals request. files file then we’re going to load this into a data frame so PD read Excel file and now what we’re going to do is we’re going to see does the download directory that I want to store this in uh the CSV file in does it already exist if not we’re going to create it and then we’re going to place the CSV file there so that it can be downloaded later on uh for this we’re going to need the OS module or package so import OS uh and we’re going to say if OS do path. exists or actually if not OS path exists downloads we’re going to do OS make deers downloads and then we’re going to create a file name we’re going to say file name is equal to and the important thing now is we want to have some file name that’s completely random it doesn’t really matter but we want to make sure that we don’t use the same file name that’s maybe already there and for this we’re going to import another uh python Library uu ID which is basically generating a random ID which is almost certain to not be the same as one that you generated uh already so it’s very unlikely that you’re going to generate something that you already have so we’re going to say file name is equal to uuid uuid4 and then CSV so just some generated file name and now what we’re going to do is we’re going to save the file with this file name and then we’re going to return download HTML and we’re going to pass the file name as a parameter to the HTML file so that the HTML file when you press download knows which file to actually download um so we’re going to say df2 CSV and then um OS path join downloads and file name and then we return render template download HTML and the file name is equal to file name now the important thing about download is now it has to actually download from an endpoint so it actually needs to call an endpoint that makes the download that performs the download so we’re going to create this one app. route download slash download actually and then we’re going to just call this download and here what we’re going to do is we’re going to return and this is now a function that we need to import again from flask it’s called sent from directory so we send from directory and this is now the directory downloads the file name file name which uh we need to pass here or we want to pass here as a URL parameter so I’m going to just call this file name I’m going to pass this here as file name this is now again these uh URL processors we passed a file name here and then the downloador name is what we want the file actually to be called so again we have some random file name some numbers and letters mixed together CSV but the download name should be result CSV all right and then finally what we need to do is we need to go to download we need to create an anchor tag with the following url url 4 download and the file name is equal to file name then download file so if I’m not mistaken this should actually be it uh I need to run the application there you go now this is not the best styling I know uh let’s go ahead upload data xlsx upload file now I’m redirected to download we can see here behind the scenes a downloads directory was created with some random file name you can see here the uuid it’s the CSV file and now what I can do is I can download the file and and I get result CSV I can save it replace the existing file and I now have the same file here and if I do this again I’m going to get a different file so I can do this again upload file and now you can see I have a second file here and I’m going to download it and it’s going to be result CSV again and of course uh you should probably on a regular basis clean the downloads directory otherwise you’re going to get a lot of different files that you don’t need anymore maybe once a day you should clean it uh but yeah this is how you can do that um then finally I also want to cover how to post Json data with JavaScript so this is now no longer python in HTML now we’re going to actually use JavaScript to send a post request with a button click now why is this useful it’s useful because sometimes you’re going to have um some button or some chat or something that you want to use to send request to the backend so a very simple example of that is you have a chatbot you have a chat window and you have an AI model in the background answering uh the request you have an endpoint that you need to communicate with but you don’t want to actually send form data so to chat with a chat bot you don’t want to send you don’t want to fill out a form with your message send uh the request and then be redirected to another page to get the response you want to do this dynamically in the same window you want to just send a request using JavaScript get the response update the HTML and so on this is why you want to do that so for this let me just close all of this let’s go to index again we’re going to do down below H1 JavaScript Json request and all we’re going to do here now is we’re going to have a button and the button will have an ID this is now important the ID is important because now we’re working with JavaScript JavaScript works with ID and ID is a unique identifier for a specific element in HTML and we’re going to call this post button and we’re going to say send post request and what we need now is we need an endpoint that we’re going to send a request to this is going to be the endpoint that handles the Json data and for that we’re going to go to appy we’re going to create an endpoint app route let’s call this handle post which of course needs to take method post and we’ll post and what we do in this one here is we get the ad Json data we expect this post request to be a Json uh to have the content type Json so we say here um what we’re going to do is we’re going to have a greeting and a name and we’re going to process a greeting and Name by writing it into a file and then returning that the file was successfully written so we’re going to say greeting is equal to um to request. Json and then greeting I can copy this name equals request Json name and then I want to say with open file.txt in writing mode SF fite and then just greeting name and then we want to return just adjacent object saying that it was successfully written so key message and value successfully written so I can just do it like this message and then successfully written now the best practice way to do this is to jsonify this to make sure it’s actually ajacent object so you want to import jsonify from flask and you just want to call the function on this so jsonify on this dictionary that’s it so this is our endpoint and now we’re going to send a post request to that endpoint using JavaScript so script we’re going to create a script tag down here script type is text JavaScript and the functionality is going to be the following we’re going to get the con uh the button is a constant here so const uh post button is going to be equal to document. get element by ID now this is core JavaScript you probably want to use something like J query if you’re actually doing some JavaScript stuff but this is now core JavaScript get element by ID postore button uh then const Json data is going to be equal to and now let’s just go with name or actually we don’t need quotation marks your name is going to be equal to Mike and the greeting is going to be equal to hello and of course in the case of a chatbot you would not just statically Define adjacent data you would actually get it you would get the content off a text box that contains the data you would get the content from the chat window you would update the content of the chant window but we’re keeping it simple now we have some static Json dictionary here some static Json data and now we’re going to add an event to the post button we’re going to say post button. add event listener and the event listener that we’re targeting is Click so when you click on the button the following is going to happen we’re going to have an an anonymous function here just uh parentheses then equals and then the greatest uh greater than sign so an arrow basically then CI brackets and in here now we’re going to call the fetch function and the URL is again we can get it dynamically URL 4 and the URL 4 is going to be handle post so that is where the request is going then again k brackets to say the method that we’re using here is post and we need to specify the headers because of course what we’re sending is Json data but we need to also specify it’s Json data so we’re going to say content type is application SL Json then semicolon character set is equal to utf-8 encoding basically and the body this is now the content the body is equal to json. stringify Json data um this is basically sending the request what we want to do now also is we need to respond or we need to to we can respond so we can say here uh dot then what happens then response is response. Json and then do then we can say data console lock and we can lock that this was successful success is uh success data here so success colon data um and then finally we can say catch if there is an error we can also uh we can also come on not used to JavaScript I don’t like JavaScript so I have to constantly check my second screen console do error and we can just lock the error message yeah that’s basically it and uh I think this needs to be closed and this also needs to be no actually is this where is this closed this is actually closed here I think I messed up something in my code yeah of course because we need it like this all right so to just go over this again we Define the element post button to be the element in document that has the ID post button which is our button here we have some static Json data in an actual application you would read this from the text boxes then you add an event listener to the button when the button has the event click then the following thing happens we fetch to the URL of the handle post endpoint with a post request we have the content type Json we get the Json data we stringify it that’s the body then we get the response we get the data we lock the data if it was successful if there’s an error we lock the error message that is what we do here so let’s go ahead and go to the site let’s go ahead and open up the console let’s send a post request there you go success successfully written then I can see I have file txt hello mik so this is how you can handle Json data from JavaScript script post requests all right so we’re going to learn how to work with static files and flask in this video today which means we’re going to learn how to work with images CSS files javascripts and so on how can we load these things into our HTML files how can I specify the path to an image how can I link to a stylesheet how can I load a JavaScript from the respective directory how is this done in flask properly and how do I work with static files in general in addition to that we also going to use that knowledge to integrate bootstrap into our flask application just so you see how you can integrate something simple like a CSS framework uh and yeah this is what we’re going to do in this video today so this is our starting point we have a simple flask application just an index endpoint rendering the index HTML file which just extends the base HTML template we just have a simple hello world heading here and now let’s say my goal is to display an image here so let’s say I want to have an image Tech down here this is basic HTML I have an image the image has a source and uh the image also has an alternative text so something like this here um and that is basically our image here how do I do that now in flask so where do I put the images how do I link to the images because for our templates is very simple we have a template folder and we just specify the name of the HTML file so we have the templates all the HTML files here in the templates directory and then in order to load the HTML files I just have to specify the file name how do I do that now with static files the way you do that with static files is very simple to the way you do that with templates you define a static folder so you have to add an additional parameter here an additional keyword argument called Static folder equals and then you can choose the name of the static folder usually you call the static and then in addition to that we also want to specify a static URL path so how do we uh get there and what I like to do or what it’s usually done is you just pass slash so simple slash and then you can access all the different directories uh from the static directory just after the slash so in addition to templates now here we add an additional directory called Static and in this directory what I like to do and what is usually done is you have different directories for the different types of static files that you want to serve so you can have something like IMG or images you can call this whatever you want I like to call it IMG then you have maybe another one for uh CSS and then maybe you have another one for scripts or you can call it JavaScript or JS whatever you want to call it so CSS IMG JS again you can call this uh CSS images scripts something like this doesn’t really matter but now you have the static directory the static folder which is also defined here in the application and when I now uh put an image here so for example I have here the prepared logo. jpeg just in theal 9 logo I can just take it drag it into IMG and now this image is in the static folder and all I have to do to display it in the index HTML file is in the source I have to say SL IMG SL logo. jpack and it’s automatically going to recognize since I have static as the folder and the URL path is slash I can just go into slash IMG because I’m already in static when I go slash I can go IMG logo JPEG and that’s it so I can run this application and you’re going to see that we have the neural 9 logo here very simple and this now works of course with stylesheets with scripts whatever you want to do you can do that uh so for example I can go ahead and I can create a file called style.css and here maybe I can create a class special and this special class here I want to say that the color of the text in that class has to be red and the font size has to be I don’t know 18 PT and then I can go into my index HTML file I can create maybe uh span or something give it a class special and I can just add hello here then I can go to my application uh and of course we’re not going to see anything for uh first of all let’s let’s make this a paragraph uh but of course we also need to uh to include the stylesheet sheet into our uh HTML template so let me just show you again that we have hello down here so The Styling is not applied even though I had the class uh set to special of course we need to also include this CSS file and how you usually do that is you go to the Head section which is of course in our base template not in our index file uh and here I do a simple link Rel equals stylesheet type equals text CSS and The Source or the path is equal to/ CSS SL style CSS like this then I can load the page again and you can see the styling is applied because it loads the static files from the static directory um what else I can do is I can create a JavaScript so for example I can go and I can say um I want to have a simple JavaScript that displays some popup after 5 seconds so I can go ahead and I can say uh hello.js and I can Define window onload is equal to a function that is called when the window is loaded and this function what it does is it sets a timeout and there’s another function in here and what we basically do is we just alert which is just pop up the warning hello world and we do that after 5,000 milliseconds so after after 5 Seconds basically uh that is our JavaScript now this alone won’t do anything if I open the page and wait for 5 seconds nothing’s going to happen because of course the script is not loaded in the index HTML file I have to load the script again from the static directory uh for example here at the bottom I can just say script and then um source is equal to uh sljs hello JS like this not sure if I have to specify a type I don’t think so now we can wait for 5 seconds and we should get a popup after 5 Seconds there you go hello world and yeah this is the basic idea of how you load images and CSS files and JavaScript files everything that’s static can be just placed here and you can just access it because you defined in the app py file here in the definition of the app you define the static folder and the static URL path so we can use this now of course to also integrate bootstrap so we can go to the bootstrap website which is this one here um and basically you can just download the compiled CSS in JavaScript you can just uh download the zip file which I have here then we can go and open files I can just open this and here we can see we have Js and we have CSS so all I have to do is I have to go to static JS I can take all these files here I can extract them I can go back I can go to CS CS we can go up here CSS take all these files drag them in here and now we have bootstrap basically installed uh in our flask application that was already it the only thing that you need to do now to actually be able to use bootstrap is you have to of course uh link the stylesheet and uh load to JavaScript so I can say link real stylesheet type text CSS and then SL CSS slash and then bootstrap.css and then also here I can go and I can say script source is equal to sljs SL bootstrap.js there you go and now in index for example I can go ahead let’s remove the image uh I can go ahead and add a button or an anchor tack so I can just say going nowhere let’s just use a filler here um I want to have some button text here and I can go ahead and I can say class equals and now BTN BTN primary for example which is these two are bootstrap classes that Define uh The Styling of the button you can see this is now a bootstrap button and of course if I change this to button uh danger I will get a red button that is bootstrap as you can see loaded and working all right so we’re going to learn about session management and cookie management and flask in this video today and we’re also going to learn about message flashing now let us get started with the first two sessions and cookies the basic ideas here are quite similar because in both cases we want to keep track of information we want to store information that is relevant for multiple requests so we want to keep information across multiple requests because HTTP in general is stateless which means we have a request and a response and we don’t have a state that keeps track of information uh about the overall exchange so if you want to do that you have the two basic ideas or the two basic methods to have a session or to have cookies to use cookies on the client site or to keep track of session information on the server site that’s the major difference the location of the storing and also for security reasons if something is sensitive and you want to be able to trust it you want to keep it in the session you want to keep it on the server side and um if something doesn’t really matter it does really matter if it’s changed it doesn’t really matter if the user sees it you can store it in a cookie on the client side so in the browser because whatever you store in a cookie on the client side can of course be changed by the client can be seen by the client whereas if you just provide the client with an ID with a so-called session ID and then you store the information uh for that session ID on the server and you do all this with a secret key you sign it with secret key and so on uh this is more secure so these are the two things we’re going to talk about out here now this is again our basic starting application we have an index endpoint rendering the index HTML file quite simple and we have the base HTML template here uh that is extended by index HTML very simple now the first thing we want to do here in order to be able to use sessions is we need to set a secret key for the signing for the encryption basically so app. secret key has to be set to something now in practice you want to use a good secret key here um for learning purposes for testing purposes you can use whatever you want just some key here uh again if you have an actual application you want to definitely uh set this to something yeah proper but you have now this secret key and with this secret key now you can uh issue basically uh session IDs and you can keep track of information uh of individual users of individual clients on the server site so for example if I want to do this in the index endpoint or actually let’s create individual endpoints for all of these things we’re going to talk about here um let’s do slash set data and let’s call the function here set data as well and what we want to do here is in the session and for this we need to import from flask import session here uh in the session dictionary you could say we want to set now some field to something so for example I can go and say name equals mic now these are just examples you can of course do whatever you want here in reality in actual applications as I mentioned the session data is something that is usually sensitive or that should not be changed by the user that should not be seen by the user maybe something that is not um yeah something that you’re supposed to be able to trust on the server side that’s the basic idea so session name equals mik and then session maybe something else let’s call it other equals hello world whatever you want to call it so this is now information stored in the session dictionary in this case um and this will be associated with a specific session ID so what I can do here now is I can say return render template and I can you know return index HTML maybe what we’re going to do here is just so we see the difference because I’m going to return here a couple of times uh I’m going to add a paragraph here and in this paragraph we’re going to just have some mess message and the message will be passed uh here so I can say message equals index and here I can say message equals session data set or something like this uh and then maybe Also let’s go ahead and have a couple of anchor Texs here with URL 4 so that we can have some buttons to play around with URL 4 set data and then set session data so let’s run the application and let’s open this up there you go so now I can click on set session data and it says session data set and I can actually see that in my browser if I right click go to inspect and then I go to storage you can see that I have a cookie here so I have a cookie here uh in Firefox and the name of the cookie is session and the value is something that I cannot really read you can see I don’t have any information here I don’t see the actual values for name and other I just have a session cookie and the server has the information for name and for other and I can just get it the server can provide me the information if the server wants to but I don’t have the information here on the client side I just have this session cookie um that I can identify myself with basically so now I can make another end point I can create a route app route um get data and here now I could just go ahead and render the data as the message or into the message so I can say that the name is equal to session name that other is equal to session other and then I can just return render template index HTML and the message will be a formatted string and F string where I have this information so I can say something like name name and other other whatever and then of course I also want to add an anchor tag for this so that we can easily do these things interactively so here I have set session data get session data set get now the interesting thing is I can go now into my memory uh or actually storage and I can delete the session cookie so I can delete my identifier that the server needs to know who I am that the server needs to understand that this is the same session so I can just go ahead delete this and now if I go to get session data I get the key error name because there is no session for this I don’t have a session uh cookie I don’t have a session ID so there is no data that the server can provide me with so actually what would make sense is to say something like if name in session do keys and other in session. keys if that is the case do this else just return with the message uh no session found so in this case now get session data no session found set session data get session data there you go so again this is all happening on the server side this is for security reasons this is what you want to do if you have some sensitive information and you want information that the user cannot change now we can do the same thing now uh or actually before we go to cookies let me show how you can clear a session you can also create an endpoint um app route and then uh we can say clear session and then clear session is also the function what I can do here is I can say session. CLE and then this basically clears the session uh the sessions entirely so it clears all the session data and uh I can then again just copy this and return the uh the message session cleared so now when I run this I don’t have a link to this so let me just add this maybe also with a line break to get a better overview um clear session clear session data then I can clear it now when we look at the storage I don’t have anything here I can set it then I can look again I have a session cookie I can get it still still have the session cookie I can clear the session data and I don’t have the session cookie anymore uh and now I cannot get it because it tells me again no session found so that is how you work with sessions now cookies are quite similar the important thing again is cookies are um cookies are stored on the client side now actually one more thing before we get uh on you can also just pop individual Fields now I’m not going to run this now to not spend too much time on this but if you don’t want to clear the whole session but you only want to pop individual um individual Fields you can also do something like session pop and then name for example so you can pop the name key value pair from the session but then you would still have other so if you have some mechanism for only reading certain parts of it you can also only clear certain parts of it so let us move on to the cookies now let’s say we have a route we want to call this route uh set cookie and the method is also or the function is also so set cookie and what we do here now is we make a response the response instructs the browser to set a cookie again this is client side so now we cannot just set the cookie we need to instruct the browser to set the cookie on the client side and then the client has control over the cookie so I can say response is equal to and for this we need to import a function called make response I think we talked about this already uh make response and the response we make is just render template index.html with a message cookie set that is the response and to this response now we can attach a cookie or we can set a cookie so response set cookie and then we just pass the key and we pass the value so we pass a cookie name and a cookie value so in this case the name is Cookie name or the key is Cookie name and the value is Cookie value and then I can just return to response and then I can also just copy this paste this set cookie set cookie and I need to run the application there’s a problem because I didn’t use a slash there you go now we can rightclick inspect look at the storage look at the cookies we don’t have cookies I can also set a session cookie there you go and now I can set cookie and now you can see we have cookie name cookie value you can see that this is now clear text I can see the content of the cookie I can see cookie name cookie value it’s not like with a session where the server has the information I have it here in my browser um and now we can have an endpoint get cookie so I can copy this down here I can change this to get cookie get get cookie and now what we want to do is we want to say cookie value is equal to request now do we have request imported no we need to get from request we need to get the cookies and in in particular here we want to get the cookie with the name cookie name of course you can have multiple cookies you can set cookie name cookie value then something else uh but in this case we’re interested in this one cookie uh so we get the value and then we can return a response in this case it’s going to be render template index HTML and the message is going to be formatted string cookie value is equal to cookie value so let’s load this and of course we need to have a link here as well so just copy change S to G and now let’s go ahead and see get cookie cookie value so you can see again the cookie is still here now the thing is since I have control over it I can change it it’s my browser I can do with it whatever I want and now if I go to get cookie you can see that the value has changed which shows you why the session might be a better choice in certain cases if it’s my choice whatever I want to do with a cookie it’s my choice I can I can uh you know manipulate it maybe it’s not sensitive maybe it doesn’t really matter but if the server needs to have control about something or over something if the server needs to be able to trust the information uh then of course use the session uh and don’t use cookies because cookies I can do with them whatever I want I can set new ones I can change them I can do whatever I want with cookies because they’re on my system they’re in my browser where’s the session of course I can also change this but I cannot change it in a meaningful way I cannot uh change the value of name and other just because I changed this cookie uh session cookie here um all right what else can we do we can also invalidate cookies so we can remove cookies uh let’s copy this here remove cookie uh and the way we do that is we basically make a response and we instruct the browser to expire the cookie to say the cookie expires in uh immediately basically so we can actually copy this here it’s almost the same we say cookie removed and what we do here now is we set cookie cookie name but we don’t set a value to it because the default value is just an empty string we set expires equal to zero and then we just return the response let’s go and I always forget to add the new endpoint here it is remove cookie remove cookie there you go and if I go and get the cookie I have it here remove the cookie get cookie and there you go bad request so here also again you should check for the key um but we can see in the storage now we don’t have it then again we do have it then again we don’t have it so this is how you can remove a cookie you just let it expire now last but not least I want to show you message flashing which is something in Flash that we can do it is basically you you display a message um that can be flashed using the flash function which can be useful uh if you want to have the field up there on every page for specific status messages for example you locked in or some event happened and uh this is something you could add in the base template for example so the idea is that we have the base template and in the base template what I can do is I can add a section in the body and of course you should style the section properly I’m not going to style it now so it’s going to look uh bad but what we can do here is we can use ginger with Ki brackets percent and I can say with messages being equal to get flashed messages and I can also use an endwith in between what I can do is I can say if there are messages and then of course I have to close it off with an end if if there are messages I’m going to iterate over the messages and show them in an unordered list again this is going to look bad but if you style it properly you will have an info box at the top showing relevant messages that have been flashed so we can say here for message in messages and for we’re going to have a list item with the message so this is how you display the flashed messages now you can flash a me a message in flask by just using the flash function so you import Flash and then let’s go ahead now and create a login page let’s go ahead and say we have an app route SL login and what we do here is we return render template login HTML so this of course needs to be created login HTML there you go then we can or actually let’s go ahead and copy the content of index and just replace this stuff here login page and then the content is going to be a form so we’re going to have a heading One login and we’re going to have a simple form which is going to have an action equal to URL for login and a method being equal to post and then we have some basic input type text name is going to be username placeholder is going to be username then we’re going to copy that we’re going to say this is password this is password this is password then we’re going to have an input type submit that value login very simple that’s basically it that is our login page and what we want to do now is we want to go to index um when we successfully logged in but of course we want to flash the message that we’re now successfully logged in or that the login failed depending on what we do so what we’re going to do here now is we’re going to say if request method and of course we need to allow here for methods being equal to get and to post so if the method is equal to get that is the case just render login HTML otherwise if the method is equal to post then do the following get the value for the values username is equal to request. form doget username password is equal to request form get password and then if username equals noral 9 and password equals 1 2 3 4 5 if that is the case we return render template index HTML and the message will be uh yeah not going to have any message or actually let’s go ahead and say message is going to be empty like this and otherwise we can copy this and also redirect to index the only difference now is going to be our message flashing I’m going to flash in this case successful login and in this case I’m going to flash login failed so the flash function is the only difference here and this is what we display here in the base template at the top so I can go now of course one more time let’s go ahead and add here the login there you go login and now I can say neural 9 1 2 3 4 5 login successful login and now do something else login failed this is the message flashing again usually you want to style this you want to design this properly so that you can have just an info field at the top all right so we’re going to learn how to work with databases in flask in this video today and for this we’re going to create a new project or application from scratch because we’re going to slightly change the structure of the files and of the code because in this case here since we’re working with databases and with models we have to avoid circular Imports because the idea is if you have an application file an appy file for example and you define a database object and this database object is then used in the models file where you define all the models and then you also import the models back into the application file you can end up in an endless Circle in a circular import and that can cause some issues so we’re going to adjust the structure here we’re going to use a factory pattern uh we’re going to talk about this here in a second but first of all what we need to do is we need to install two packages that we need for working with databases and for this you can open up your terminal of course use your virtual environment in this case now for the sake of the tutorial I’m just going to use my base environment but you want to do pip or pip 3 install Flash and then SQL Alchemy and flask migrate these are the two packages that you need to install for this video today let me zoom in a little bit there you go these are the two packages and once you have them installed we can go ahead and we can create now a new application directory let’s call this DB application and let’s let’s create now an app py file now this app py file in order to avoid circular Imports we need to now change the idea a little bit because what we’re going to have here is we’re going to have a DB object now let’s say this DB object is now an empty string but this DB object will be needed in another file that we’re going to have called models.py now why do we need a models py file think about it that way in our flask application we don’t have database tables we have classes so for example what we’re going to do in this video is we’re going to define a person Class A person can have an ID a person can have a name an age uh and other attributes but this is all just a class in python in the database if you’re connecting to a sqlite database or to a postgress database or mySQL database you are connecting to database tables now what the omm does an object relational mapper which is SQL Alchemy in this case what it does is it converts it migrates so to say the class CL into database tables it connects it to Worlds so that you can work with classes and flask and you can basically translate all the actions all the updates all the Creations all the insertions and so on in database language so that it all ends up in tables and that you can also select tables and get uh python objects as an answer now in order to Define that what we need to do in the models file is we need to create a class and so on but we also need to import this DB object in the models file now however once we have the the model defined here we also need to define or we also need to import the model from the models file into the application and then what happens is you import models in app you import app and models and it creates this circular import so we’re going to use a design pattern uh I think it’s the factory pattern where we have a function that creates the application then we have a separate file called run py which is going to run the application so the basic idea here is we’re going to import from flask import flask from flask SQL Alchemy we’re going to import SQL Alchemy and from flask uh migrate we’re going to import migrate these are the Imports now and what we do now is we Define a database object we say DB equals SQL Alchemy so that we can import it in models but then what we do is we create a function which we call create app and this fun function creates the application and returns it as an object so that it’s not always executed when you import this um this appy file because when you import something you execute all of the code however if it’s a function you don’t call the function so what we’re going to do here now is I’m going to say um equals flask uncore uncore name uncore template folder equals templates as we did it before now what we need to do here is we need to configure the string for the SQL database so I need to say okay what am I going to connect to and we’re going to start here with a simple SQL light database because if it doesn’t exist it’s just going to create it it’s the most simple database if you want to connect this to mySQL or postgress you can do that I can show you how to do that with postgress I’m not going to go through the installation of postgress and setting up postgress if you don’t have postgress already running it’s not going to work but you can connect this to any type of database so you can say here app.config and then you have to say SQL Alchemy uncore database _ URI is equal to and then you need this string and in the case of a sqlite database you can use it out of the box already you can say sqlite and then colon SL SL slash and then the path to the database so if it exists the path to the database otherwise just the name of the database so in this case we can say current directory and in this current directory I want to have a test T db. DB for example so this would now create a database test dbdb in this directory here that is the config now what we also do is we say DB initialize application so DB init app app and then what we do now is uh we do a couple of imports now we we’re not going to do the Imports yet um because we don’t have uh the stuff written out yet but what we’re going to do here is we’re going to import the routes so the views that we had before like app route Index app route create something or so on uh and we’re going to have in these routes they’re going to import the models which is again where the circular input uh import would happen uh but for now we’re going to leave this empty so we’re going to say here Imports later on and then what we want to do is we want to say migrate is equal to migrate app and DB and in the end we return the application so what we want to do in our run file is quite simple all we do in our run file is we say from App import create app and then we say flask application here is equal to create app and then we just say if uncore uncore name uncore uncore is equal toore uncore maincore uncore if that is the case just do flask app run host is equal to 000000 and debug equals true that’s down this is how you run the application so now instead of running the appy file We Run The Run py file it’s as simple as that so let us move on now to the model uh the model is going to be whatever you want to have in the database so you can either create the database first and then connect uh your application to the database or you can also create the database tables using uh SQL Alchemy and flask migrate so what we’re going to do here is we’re going to say from App import DB and then we can define a class let’s call it person and this class has to inherit from db. model so we’re defining a database model now and we need to have a double under hcore variable here called table name like this and this is basically the name of the table in the database let’s call table in the database people and all you have to do now is you have to define the field so I can say p ID is equal to db. column and what I do here now is I specify the data type DB integer for example and then I can also do some stuff like primary key equals true which makes the P ID the primary key integer column in the database table um then I can do name equals DB column and then I can say DB and then text now it depends on the database type what you want to use here so for example in the case of sqlite I think there is only text you don’t have something like varar or something but if you’re working with postgress you might want to do something like string and then I don’t know 255 or something or 128 I don’t know whatever you want to do here but I’m going to keep it simple here with text and I can say nullable equals false so it’s not allowed to be empty then I can do something like age is equal to DB column DB integer and then maybe job is equal to DB column DB text like this then I can also Define a representation Dunder method here just what happens when I print this so I can see more information I can say person with name self. name and H self. H that is just a string that you get uh when you when you print a person object here all right now this is a model I have in my application what I need to do now is I need to somehow create a database but in order to do that I first need to use this model in my application and for this we’re going to create a fourth F python file which is going to be routes. py you can also call this views pii it doesn’t really matter and this routes py here is going to import from flask uh render template and request but it’s also going to import from Models the person class and in order again to avoid circular Imports we’re going to do this now with a function again so we’re going to say def register rout takes the parameter app and DB or the parameters app and DB and to this we pass now the application and here we can register the route so we can say app route and by the way this is not necessarily the the only way you can do that or even the best way it’s one way you can do that while avoiding circular Imports it’s not the only way and you can uh try different patterns and different approaches here well let’s just let’s just go ahead and say we have the index function and all we want to do here is we want to say people is equal to person query all then maybe I want to print the string version or actually not print I want to return the string version of this people result here that would be now using the model uh now we don’t use any of these but we’re going to use them here in a second uh let’s also maybe create here a templates directory but now what I can do is I can go into my application here and I can say in appy um in the function this is important now I want to do the Import in the function this is how I’m avoiding the circular import I’m not doing it all the time I’m doing it when I call the function so what I do here now is I say import or actually from routes import register routes and then I call register routes with app and DB like this so I think if I didn’t mess up anything I mean it’s not going to work because we didn’t uh create anything but I’m not sure if we can even run the application let’s see it should probably cause some issue though there you go because we don’t have a table people so what we need to do now is we need to somehow migrate this to a database for this we’re going to open up the terminal in the directory of our uh project for this I’m going to actually open up this terminal here I’m going to navigate to um to my working directory so to current here let me just zoom in a little bit and actually I’m going to go into DB application now here I’m going to run the following command flask DB init flask DB init and you can see that this worked and then I can do flask DB migrate and then you can see detected added table people and in order to now actually create the migration to actually upgrade it I can say flask DB upgrade there you go it’s running the upgrade now the important thing is you only do this flask DB in it once and you do the migrate and upgrade every time you make a change in the scheme add a new class add a new model change a field you can always do that here you have now the database I can always change something I can always say I want to have an additional field or I don’t want to have the job field anymore or or I want to change the nullable or the data type I can do all of that but I have to migrate and upgrade every single time so I can open open up here this sqlite database can open up a connection and I can say select everything from people and you will see that I have P name AG job in the database which is of course great so now what I can do is I can just run this application and you can see that I get an empty list but it loaded all the people from the database because we don’t have any people in the database now what I can do is I can open up again the connection here and I can say insert into people and I can specify the fields uh Fields name H for example values and I can say I want to have Mike being 25 years old and maybe Bob being 30 years old then I can run this and then I can say select everything from people again you can then see I have these entries in the database and now I can again go run my application actually it was running already I can open it up and you can see I have these two people loaded from the database into flask mapped into a class now I have the objects that I can work with that’s the most simple way to do that so you have again a run file you have an app file where you have a function that creates the application just in order to avoid circular Imports here because routes think about it routes import models models Imports uh from App Imports DB from app and app itself again Imports routes routes Imports models models app and so on if we don’t do this in a function here it’s going to cause issues so that’s the basic idea what we’re going to do now in this video is we’re going to Define um or we’re not going to Define we’re going to create a base template again we’re going to create an index and we’re going to create a uh Details page where we can actually create users we can or create people uh delete people and also show more details about the people so we’re going to say here base HTML and we’re going to have the same uh layout that we had before so for the title we’re going to have here a block which is going to be the title block end block and the default title is just going to be default and then here we’re going to have a block content and we’re going to end the block um yeah that’s basically it now for the index what we’re going to do is we’re going to have index HTML the index HTML is going to extend this template extends base. HTML and we’re going to fill first of all the block title with the value index and we’re going to have also the block content and in here we’re going to put our content which is going to be a heading index page and then we can have uh we can list all the people from the database so we can say give me an unordered list and I want to do for person in people and for I want to have a list item here and this list item will be just the person and of course for this to work I need to pass first of all I need to render the HTML render template index.html and I need to pass people come on need to pass people equals to people so then there you go we get all the people from the database now what we want to do is we want to provide a form that allows for the creation of a new person so I’m going to go down here I’m going to say now heading of size three new person I’m going to create a form I’m going to say that the action of the form is going to go to yourl for index HTML um and we’re going to have a post request so we’re going to say method equals post like this and of course for this we need to adjust a route to also accept post so methods is going to be equal to get and post this is all stuff we already covered nothing new and we’re going to go ahead now and say we’re going to have the following fields input type text which is going to be the name placeholder is also going to be name and it’s going to be required like this then I can copy this and I can say I want to have also a type number which is going to be H with a placeholder H not going to be required and we’re going to have also job with a placeholder job and it’s also not required and then I want to have an input type submit with a value create all right so that’s quite simple um and I also want to have line breaks here there you go so that will not work because we need to say URL for index not URL for HTML but now you can see we have this form here and all I have to do now to use the information of this form and create a new user is I have to go into the route I have to distinguish between the two cases so I can say um if request. method is equal to get then just do this and otherwise if the request method is equal to post then what I want to do is I want to create a new um a new entry in the database how do I do that first of all I get all the information from the form so request. form. getet name I do the same thing for age I do the same thing for job age job and then all I have to do is I have to create a new instance of person so I can say person is equal to person name is equal to name H is equal to H and job is equal to job like this uh what’s the problem here yeah of course we need to type cast this into an integer there you go and now this object here this python class instance this python object basically I can just add it to the database by saying db. session. add person and db. session. commit and that is it so I can just copy these two lines here as well so that I can get again the full database table and display it but that is all you need to create a new database instance so let me just rerun this run it open it and then I can say I want to have uh Sarah 29 programmer create there you go we have a new in in the database I can say uh John 89 clerk something like this there you go I can create Now new instances which are also of course in the database they’re not just in my flask application so I can actually select from people and you can see that they’re part of the database and this works not only with sqlite it works with um postgress so I can easily go ahead now since I have postgress configured I can say create uh DB Flash tutorial DB there you go created it and now I can change the connection string to be something else uh I can easily change it to let me just copy this comment this out and say that the string is now going to be postgress ql colon postgress the user postgress the password very creative at localhost Port 5432 SL flash tutorial DB now I can run the full application again or actually I need to first uh I think I need to to where is it I need to migrate so I need to say flask DB migrate class DB upgrades and then I can just uh run the application here so stop and rerun open of course it’s going to be an empty database but I can create new entries here as well there you go now I’m connected to my postgress database not to my sqlite database and I have a new database with a new table with new data um this is how easy it is to switch from one database to another one you can do the same thing with mySQL you just need to know how to configure the uh database of course installing post setting it up might be a little bit more complex but once you have a database running you can just easily change the connection string and everything St is the same I don’t need to adjust anything about the model here um yeah so that is the basic idea uh what we’re also going to do now is we’re going to get we’re going to create two more routes and the two more routes are going to be for getting details about a person and deleting a person so I’m going to say here down below Define delete and delete is going to be an app route which is going to be delete and then we’re going to pass a p ID so a person ID and this is only going to take the method want to keep it professional here delete so this endpoint will only accept the delete method and what we pass here is the PID so we delete a specific user with an ID and all we have to do in order to accompl accomplish this is we need to say person query filter and we need to specify which person are we looking for we’re looking for person with a p ID that is equal to P ID and for this person we want to delete it there you go that’s it and again the only thing we need to do is we need to commit the session like this and then we can return render template index HTML with uh probably we should go and say people equals person query all then we can say people equals people as simple as that so let me just reconnect to the MySQL not the MySQL to the sqlite database because we had some data there let me just rerun this um what I can do now is I can just go ahead and say slash delete one for example uh of course this doesn’t work because I’m using a get method when I’m doing it in the browser so we’re not going to do it in the browser we’re going going to do it directly uh as a JavaScript function so we have this method here uh this route here this function and what we need to do is we need to send a delete request from the front end so from the python uh from the HTML file so we’re going to index and for each entry that I have here I’m going to add a button or a link we could say and this button or link I’m actually going to do it I’m going to make it a button uh this button is going to call a JavaScript function that takes the ID of the specific person and deletes it so we’re going to say here button the onclick is going to be equal to delete person and the parameter here is going to be the person. PID that is what this button does and the text is going to be just delete so for every person we have a button that has an onclick event which calls delete person with the ID of the specific person in this row now we need to Define this function so we’re going to say script type text JavaScript and we’re going to define the function delete person with PID as a parameter and what we need to do here is we need to fetch so we need to send a request we’re going to say I want to send a request to URL for delete I think this is what we called it right where is it routes delete and we can say also that the uh or actually we should use quotation marks here uh we can also say that the PID is equal to P ID because that is a URL parameter we need to pass it here and then we’re going to say plus P ID um and I’m going to say here that the function is going to be or actually the method is going to be uh Delete now please excuse that I’m looking at my second monitor a couple of times I’m not a JavaScript fan so I have to double check my code here um but this is what we do we sent a delete request to this URL endpoint and what we do then is we if it was successful we get the response and we forward it to the if statement if response is okay then we’re going to just say window location reload so that we can reload the page and see what happens uh so we can see the changes and otherwise we’re going to log into the console an error message console error failed to delete item with PID and we’re going to display the P ID here and finally of course we’re going to say catch if we have any errors here we’re going to say what we want to do is console error error during fetching P ID or let’s just do it like this error during fetching and then we can print the error message as well so I hope this works let me just indent this properly but the whole Magic happens actually here we’re fetching the URL for delete and we’re sending uh we’re using a delete method to do that uh yeah so that’s basically it let’s see if this works now let’s open up the application and let’s press delete there you go it deletes the entries from the database I can create some entries here delete oh actually doesn’t work when I just posted so let me just load the page again delete there you go so the entries are now gone from the database and you can also right click inspect and see that the delete button actually contains the ID so delete person 4 delete person 2 depending on the row so this is how you delete the object now finally what we want to do is we want to also display some more details so we want to say app route details and want to get the details for a specific person so for this we’re going to also get here the p and we’re going to define the details method that takes the P ID and all we’re going to do here is we’re going to load the person object from the database and we’re going to show the information so we’re going to say person equals person query filter where the person P ID is equal to the P ID from the URL and we get the first of these it’s always going to be one since the p ID is unique but in case we have many we’re just going to do uh we’re just going to get the first one and we’re now going to render actually the details HTML which is going to be a new one and the person is going to be equal to person like this and here now we’re going to just copy paste the index we’re going to call it detail. HTML I think I use just detail right details actually okay let’s just call it detail then um and here now what I’m going to do is I’m just going to say [Music] person and then person P ID and I can list some information something like name going to be person name H is going to be person H and job is going to be person job like this and the only thing that we need to do now is we need to add a button or actually this time we’re going to use an anchor tag so we’re going to use a link uh for each individual person here we want to have a link to the details page so a ATF is going to be uh URL 4 details and the P ID is going to be equal to person uh person do p like this and we’re going to say that the text for this is going to be details that should be enough to go to The Details page of the respective person and that’s it basically this is how you work with databases in flask this is how you can migrate how you can use any database basically the important thing is again to avoid circular Imports this is one way to do it with a factory pattern you have a create app you have a register uh routes meth method but that is one way to do it you just have to swap out the connection string here and you can use any database you like as long as you set it up properly you define models you migrate them with flask DB migrate flask DB upgrade and that is how you work with databases in flask all right so we’re going to learn how to implement a user authentication system for our flask application in this video today and for this we’re going to continue working on the application from last time remember the structure was slightly different because we had a separate run file which calls the create app function which is defined in the app py file where we use this sort of factory pattern in order to avoid circular Imports and basically all we’re going to do in this video is we’re going to add a class or we’re going to replace the class depending on what you want to do uh you can either replace person and create a user class or you can just add a user class you can have multiple classes as well and we’re going to build an authentication system around this user class so we’re going to be able to log in a user we’re going to be able to register or sign up a user and we’re going to be able to keep a user logged in and see which user is sending a request so that we can um you know show different content depending on the type of user or depending on the exact user that is viewing a certain endpoint so for this we’re going to need an external python package called flask login and we’re also going to install another one called flask bcrypt and the reason we install flask bcrypt is because when you have a user uh and you have user information in the database like a username and a password usually you don’t want to store the password in clear text in the database you want to store a hash of the password in the database and the good thing about a hash is it’s a one-way street so you can take a password you can hash it you get something that is very hard uh to reproduce almost impossible to reproduce with a given input string but you cannot reverse it in any way so you cannot decrypt it it’s not encryption it’s hashing uh and this is what bcrypt basically does so what we’re going to do first now is we’re going to install the packages we’re going to open up the command line and we’re going to type pip or pip 3 install flask-login and flask Das bcrypt like this and once you have this installed we’re going to go to our appy file and we’re going to import from flask login we’re going to import the login manager on and from flask uncore bcrypt we’re going to import bcrypt now let’s go ahead and create a user class now in my case here just to keep it simple and to have a better overview I’m going to remove the person class however you can do everything we do in this video and keep the current functionality from last video so you can actually keep uh all the routes all the models that you have and you can just add a user model but for the sake of Simplicity I’m going to just have one class here so we’re going to say class user and this is obviously going to be a DB model but it’s also going to have something else and for this we need to import report from flask login the user mix in this is something that we’re going to add here to The Inheritance so we’re going to say user mixin here in the parenthesis and then we’re just going to do the same thing as with a person we’re going to say table name let me just zoom in table name is going to be equal to users and then we’re going to say uid is equal to DB column DB integer and primary key equals true and then username is going to be a DB column DB string nullable is going to be equal to false then we are going to say password is also a string nullable false the RO is also going to be a string I’m going to keep it simple here no enm or anything it’s going to be nullable though and then we can say something like description you can add whatever you want here this is basically a user profile so table name is users actually we don’t want to do a comparison here we want to actually assign this uh description is going to be equal to DB column DB string as well and then what we’re going to do is we’re going to Define again the representation Dunder method we’re just going to return here a formatted string maybe with some angle brackets here and we’re going to say user and the user is going to be actually sorry this is a string I want to do user and in in here what we want to do is we want to show the username so self. username and maybe the role as well self. roll all right and one more thing we want to implement a method get ID which is just going to return self U ID just so we can access users by ID easily so that is our user class now of course we need to do the same thing with migration and upgrading so we need to open up a terminal we need to navigate to the directory that we’re currently working at which is here and then I need to say flask DB init or actually this is going to actually not in it we need to use uh first of all we don’t need to use in it because we already did it we need to use um migrate and upgrade but also we need to First of course sanitize all the code we need to remove everything that uses the person uh model so we can replace this here by user uh we can basically get rid of all this so we can just say uh return something here we can also get rid of the detail HTML in the index we can get rid of almost everything actually let’s get rid of everything and then here we don’t really have anything here we have just a model so now it should probably work flash DB migrate then you can see here remove table people added table users and then flask DB upgrade to actually make changes there you go so one thing that you need to understand about flask login is it doesn’t Implement any login procedure it doesn’t Implement any logic whatsoever when it comes to how you want to log in whether you want to do it with a password whether you want to do it with a token whether you want to do it without any uh secret or any any security measure at all all that flask login does is it locks you in it keeps you locked in it handles the user that is currently locked in and it locks you out how exactly you do that is up to you so you basically just use the login manager to say now you’re logged in now you’re logged out and now this is the currently loged in user how or when you log in a user is up to you so you need to implement all the logic with comparing the password hashing the password and so on so we have this models py file now this is just a user and what we’re going to do now in the application so in the app why is first of all since we’re working with sessions here this is what we’re doing behind the scenes we’re working with sessions we need to again Define a secret key so app. secret key as we did it already in the session management is going to be equal to something of course here you want to generate a good secret key I’m just going to use some sample key here some key and then what we want to do is we want to create a login manager so the login manager is going to be equal to login manager and we also want to say login manager init application we pass the application and now what we want to do is we want to Define um a certain we want to Define for the login manager what it means to load a user so what we do is we say and here now we Define a method inside of a method so when you just say uh let’s say the the method or the function is going to be called load user based on a given ID the logic here is to say return user query get uid and for this of course we need to import up here from Models import user otherwise we cannot do that now the important thing is this is now just some function here we need to say that this function is actually how the login manager loads users so we need to give it an annotation here login manager. user loader like this this basically now means said when the login manager loads a user it does it like that it gives you a user based on a uid that is how it’s done um what we also want to do afterwards here is we want to create a bcrypt object so bcrypt is going to be equal to bcrypt and we’re going to pass app here um as a parameter and the important thing now is that we also want to pass the bcrypt object to the register route so we pass here bcrypt to register routes which is remember this function here uh so we pass bcrypt here and we need to do that because of course we need to Hash passwords when we create users and also hash them when we log in users so that is important now we’re going to leave appy for now we’re going to add something later on but now let’s go ahead and try to just Implement a very basic login so no password no fancy stuff just an endpoint where I can go and I can log in a user and another one where I can log out the currently logged in user very simple uh for this let’s go ahead and Define just a simple endpoint let’s call it login um and then a p ID or uid actually so I can just go to an endpoint and when I go to that endpoint I can just log in a user how do I do that uh well all I have to do basically is I have to call the login user function and this is a function provided by flask login so we can say from flask login import log in user I also have log out user which I’m going to import I can also get information about the currently locked in user so current user and I can later on this is I’m going to import it uh now but we’re going to use it later on we can also say that for certain endpoints a login is required so we’re going to import these four things login user logout user current user and login required so all we’re going to do here now is we’re going to Define this login function with pi ID or actually uid as a parameter here and this function will just log in a user so we’re going to say login user uid done that’s it that’s how you log in a user and then we can return success and let’s say for the index page what we’re going to do is we’re going to return current user username as a string so we just want to know what is the username of the current user this is what the index um endpoint gives us and then I can copy this and I can say I want to have also a log out log out endpoint lock out without any ID I’m just logging out the current user and for this we’re going to just say lock out user very simple nothing too fancy let’s run the application and see what happens so first of all I have of course the problem that there’s no uh logged in user so what we’re going to do is we’re going to say for the sake of Simplicity we’re just going to use a try except or actually let’s do it properly let’s say if current user is authenticated I think that is the proper Boolean here we’re going to do that otherwise we’re going to just return no user is logged in let’s do it like this let’s go back no user is logged in now let’s go to slash login oh actually I don’t have a user so let’s first of all before we do anything go to the database and select everything from users you can see we have no users so what we’re going to do is we’re going to say insert into users and here we want to have username password values and then I’m going to just say neural 9 the p password is going to be 1 2 3 4 5 I can run this then I can run this and you can see now I have this user so let’s go back let’s run this and then let’s go SL login one now what’s the problem here login user user is active string has no attribute is active what’s the problem here let me just double check l in user oh of course sorry uh what we need to do actually I didn’t uh write this properly what we need to do is we cannot just log in a user based on the ID we need to log in a user object so what we need to do is we cannot just pass the U ID we need to first get the user that has this uid so user query get uid and then we can pass the user and log in the user so let’s run this again or actually it’s still running Let’s Go slash login one success now let’s go back to index there you go neural 9 is logged in as you can see now I can go to SL logout success let’s go back and no user is logged in so this works you can see that there was no password checking there was no hashing all flask login does is it allows me to log in a user to log out a user and to work with a current user and do some stuff with it but it doesn’t say what the authentication process actually has to be this is what we have to implement ourself so what we’re going to do now is we’re going to just create a basic login system here so we’re going to return render template here I’m just going to say index HTML is going to be the start page nothing too fancy we’re also not going to do any post requests here so just a simple endpoint um and then what we want to do is we want to have a sign up we want to have a login and a log out so we’re going to say app route and here we’re going to say sign up methods are going to be obviously get and post because we need to get the form and then with the form we can sign up and here we’re going to do now if request method is equal to get then we’re going to return render template and the template is going to be be sign up. HTML we don’t have it yet otherwise if the method is equal to post we’re going to do some stuff uh same is going to be true for login so I’m going to just copy that and I’m going to replace this here I’m going to change this to login we’re going to change this to login and we’re going to also load the login HTML now login and signup are going to be very simple HTML files they’re just going to have some basic form with username and password and that’s basically it um of course you can also add for the sign up maybe the other fields if you want to I’m not going to do it here now it’s not really complicated to do that you just add more Fields uh the important thing you need to consider is the hashing so let’s say or actually let’s go ahead and first create the signup so for the sign up uh we literally just need sign up page we literally just need a form that has an action equal to URL for signup method is going to be equal to post and the fields here are just going to be type text name username placeholder username required equals required copy change the type to password change the name to password and change the placeholder to password and then a simple sign up button input type submit value sign up that’s quite simple and that’s also what we’re going to have in our log in page so actually this is when we copy pasted login HTML um this is going to be the same thing the only difference is we’re going to go to login here and the text is also going to be login and here login page now maybe you want to add some breaks here for design reasons here as well but that’s basically it we’re done with the HTML part the interesting part is now how do we actually create a user how do we actually have the password and for this we’re going to go to the routes again and here now if it’s a post request we’re going to get username and password from the form so request form get username request form get password password and now the important thing is you don’t want to store the password in the database you want to store the hash of the password in a database so what we do is we Hash a password we say hashed pass password is equal to bcrypt do generate password hash of password and then what we do is we say user equals user username is equal to username password is equal to hashed password now and then all we have to do is we have to say DB session at this new user and then DB session commit the session and then we can just redirect for this we need to import redirect of course we can just redirect to and we need URL 4 here as well can redirect to index for example um which is going to show the current user or you can also redirect to a profile page if you want to it doesn’t really matter you redirect somewhere where you’re going to see some uh information that is specific to the user in our casee the index HTML file uh will display the user so here what we’re going to do let’s do it right away we’re going to say um if current user is authenticated we don’t even need to pass it if that is the case we’re going to do something otherwise we’re going to do something else and then we’re going to do end if down here and what we’re going to do here is heading of size three hello current user username and otherwise I’m going to just do hello like this so we can easily see if there is a user locked in or locked out maybe we should add also two links here pointing to URL for [Music] login like this and then we should also have one for sign up and maybe also one for log out there you go all right so this is how you create a new user this is done this is the signup process now how do we log in very easy we do the same thing we get username and password from the form we hash the password so we can actually go and copy paste this so we get username and password from the form uh we hashed the password and then we compare the hashed password uh that was hashed now from the user input to the hashed password from the database and if it’s the same we’re going to log in the user so we’re going to say user equals user query uh and then we’re going to use filter because now we’re not going to just get the ID we’re going to say the username has to be equal to the username passed in the form I want to get the first um the first entry we’re going to assume it’s Unique maybe we should set that up in the model but I’m just going to get the first user now and we’re going to say okay if the password of this user the hash password is the same as the hash password here we’re going to lck in the user and we’re going to do that here by saying if bcrypt check uncore password hash user password and password actually we don’t need a password hash here I’m going to do it like this um if that is the case we’re going to say login user and we’re going to return render template index.html and otherwise we’re going to return failed just like this okay so that is the login process again just repeat we sign up by getting a form providing username password hashing the password creating a user with the hash password in a database committing the session showing the index uh maybe we should also redirect here and not just render template I think that’s better uh for the login what we do is we get again username password We compare is there already a user with this username if yes get him does the password hash match and if yes log in the user otherwise just say failed no user was logged in and then finally we’re going to have log out which is just going to log out user and we’re also going to just redirect to index here and keep it simple so I think this should already work let’s see if it works we’re going to run it and now I have sign up log and log out let’s go ahead sign up let’s say I want to have a user mic with password password sign up there you go now I’m not logged in as you can see I’m just getting a hello here I can log in now as Mike with password login hello Mike log out hello log in uh now for neural 9 it’s not going to work because we didn’t have a hash so maybe I want to create uh another one John here and John will have the password 1 2 3 4 5 sign up there you go log in John 1 2 3 4 5 there you go log out and now if I try for example John with some other password I’m going to get failed and if I look into the database you will see that except for the one that I created manually here in the database you can see that the password is always a hash not the clear text password so even if someone hacks a database they’re not going to see the passwords that is important of course for security reasons all right so that’s almost everything but I want to show you something else I want to show you how we can protect certain endpoints uh or at least require for certain endpoints that the user is authenticated so let’s say I have an endpoint Here app route let’s call it secret yeah let’s call it secret def secret is going to be the function and here we just going to return my secret message this is what we get at this end point nothing nothing uh fancy here and of course what you can also do is you can also check for roles you can say if the current user uh Ro is equal to and then you can say admin only then show that otherwise return no permission but I’m not going to implement this now this is very simple you just have to set the role when you sign up or on an edit page um but then you can also check for rle you can do whatever you want here but the only thing that we want to do is we want to require a login so what we can do is we can say add login required and you want to put this below the app definition uh before the route definition here so app route Secret login required and now we can also go to index and add a link here to secret secret and then let’s go and run this now I’m not logged in if I try to go to secret I get this default message unauthorized the server could not verify that you’re an authorized uh that you’re authorized to access this URL if I log in now as mik what was the password I think password log in I’m now Mike secret my secret message okay so when I’m logged in it works um now as you saw when I’m not logged in I get this default error message so I can log out secret unauthorized how can I change that how can I change the behavior of this redirection if I’m not authorized um it’s actually quite easy to do that we just have to go to appy here and we have to add a function and this function will be a call back for this uh unauthorized uh scenario so we’re going to say here that the method is called or the function is called unauthorized callback and we’re going to decide what happens when uh what happens when I’m not unauthorized when I’m not authorized when I’m unauthorized to uh visit an endpoint because I’m not logged in what I’m going to do in this case is I’m going to to do redirect URL for index like this and of course we need to import this redirect URL for and in order to associate this with a login manager we need to again add a decorator login manager unauthorized Handler and um yeah that’s basically it so now when I’m not logged in I’m going to be redirected to index so if I try to go to secret you can see I’m ending up at index if I log in mikic password login secret it works and I can of course also do something else I can also just return some string here custom Behavior so it’s really up to you what you want to do I can log out secret custom Behavior so you can decide that but yeah this is how you build an authentication system in Python flask using flask login and using flask bcrypt all right so we’re going to learn how to work with blueprints and flask in this video today and this is going to make our applications much more professional and much more modular the main idea behind blueprints is that we take the functionality of our program we take our application and we split it up into multiple different components or blueprints which are for the most part independent of one another now of course you can still reference them uh between each other you can still interact with them so you can redirect from one blueprint to another one for example but the idea is that I can work on blueprint a you can work on blueprint B and we don’t have to really uh change the same files we don’t have to constantly interact with one another to merge some uh differences because I’m working on the files of blueprint a you’re working on the files of blueprint B and maybe occasionally we have to adjust some things because I changed the function signature or the name of an ENT point or something but for the most part we can work on these separate Blueprints and then all of them are combined into a central application so you can have one blueprint for a to-do list application uh or a to-do list blueprint uh or section you could say you can have one for a calender you can have one for a habit tracker you can have one for a login page or for authentication in general uh that’s the basic idea and then you can merge All of These Blueprints into a central application and this is just much more structure and uh everything is much more modular and professional now because of that we’re going to do everything from scratch here because we’re going to have a different directory structure and the first thing we’re going to do is we’re going to create a directory I’m going to call this now blueprint app call this whatever you want this is going to be our flask application and outside of this directory I want to run or I want to create a run py file and this is important because we’re going to use this as a package so right away I’m going to say init dot soore nitpy is going to be placed in that directory to make it a package because in all the files we want to have absolute paths we want to say blueprint app do blueprint name do uh module do something whatever you want to import you always want to use the absolute name here of the package blueprint app this is going to be our application now inside of this application I’m going to have an appy file this is going to be our Central File where all of this stuff is going to be merged and created and here what we’re going to do is we’re going to say from flask import flask obviously we’re going to also import URL 4 or actually I don’t think we need that we don’t need URL 4 and I also don’t think that we need redirect we’re just going to import flask uh we’re going to also import from flask SQL Alchemy import SQL Alchemy because of course we’re also going to work with models here so each blueprint will have its own model file models file and also its own routes file so we’re going to have everything that we have in an application we’re going to have in a blueprint other than maybe the database connection itself uh and then from flask migrate we’re going to import migrate so we do the same thing as before we create our database uh object here and then we Define our create app uh function and what we’re going to do here is we’re going to do the same thing as before create a flash application let me just zoom in a little bit create a flask application uncore name uncore the template folder is going to be templates now this is another thing each blueprint will uh each blueprint will have its own template uh folder so app is going to be that app config even though I don’t think we need to have a secret key um but yeah we need to have of course a um a database connection so actually this is not like this app config like this and then the field is SQL Alchemy database URI I’m going to set this equal to sqlite and then three * SL current directory SL test db. DB or call this whatever you want we can call this for this video today blueprints do DB for example um and I don’t think we need the secret key so we’re going to skip that and we’re going to say DB init application app and what we want to do then is here in this section we’re going to uh import and register all blueprints which we don’t have yet so we don’t have any blueprints yet but here we’re going to merge everything together and once this is done we’re going to say migrate is equal to migrate app DB and we’re going to return the app and in our run file this is also not we’re just going to import that from blueprint app.app import create app and then flask app is going to be equal to create app and if uncore uncore uh name uncore is equal toore maincore uncore then we want to do flask app run poost is going to be 00 0 debug equals true there you go so this is our run file you can see we use the absolute path here as well from blueprint app app and um that is our app file here here we’re going to merge everything but we don’t have anything to merge yet so what we’re going to do is we’re going to create our first blueprint and let’s actually just use a uh to-do list blueprint as an example here so we’re going to create now a directory which I’m going to call uh todu this is going to be our to-do blueprint and our to-do blueprint will also or or actually will it be a package let me just double check yeah it will be a package um we’re going to also add an init file here as well to make it a package just keep it empty this is just a file that needs to be present and here now we can create the two files routes py and models py and this is going to be the structure of each blueprint so I can create another one here I can create the blueprint people for example and I will do the same thing I can copy these files I can put them in here uh of course the code is going to be a different one later on but we’re going to have models and routes and then I can make another one we’re going to do three blueprints in this video today uh which I’m going to call Core core basically to just be the homepage the default blueprint which just displays an index page um and here I’m not going to have any models but I’m going to have also routes and I’m going to have anit py file all right so these are now three blueprints but we don’t really have or these are going to be our three blueprints but we don’t have them yet so what we’re going to do first is we’re going to create uh the toce uh routes file here so we’re going to say from flask import request render template the usual stuff uh redirect URL 4 and then what’s new now blueprint with a capital B this is a class blueprint um and then we also want to sa from and now we need the absolute path now this is something important if for some reason your development environment doesn’t show you that this is possible so if I say from blueprint app import DB if that doesn’t work if it somehow um says that this is you know an invalid path or something chances are you have to right click your directory at least in pie charm for example and you have to mark the directory as sources rout then it should work um just if you have the problem in case you have the uh problem and then if if it doesn’t apply right away you might have to invalidate the caches and restart the application and maybe we will have to do this here as well but for now it works so from blueprint app. blueprints do too. models import and here now I’m going to create a uh to-do model so this is nothing new this is just from blueprint app. app import DB class is going to be to-do it’s going to be a DB model we did that already nothing new here table name is going to be equal to uh toos and the fields are going to be the T ID the to-do ID basically it’s going to be a column it’s going to be an integer and it’s going to be the primary key then we’re going to say um that the to-do title is going to be equal to a column it’s going to be a string and it’s not going to be nullable and then we’re going to just copy this I’m going to do the same thing for description but it’s going to be nullable and then maybe done is going to be DB column DB Boolean and it’s also not going to be nullable because it’s either going to be true or false uh and then we can just uh Define a representation Dunder method here so we can just return some stuff like angle brackets to do and then we can use it to do title and whether it’s done or not and of course you want to have this as an F FST string here uh and then we need also get ID even though I’m not sure if we need that or if this was just for the user not sure right now let’s just add it here won’t hurt um and this is now our to-do model which we want to import here to work with it and the functionality itself is not going to be too fancy we did all of the stuff that we’re going to do in this blueprint now we already did so I’m going to go through it quite uh quite quickly the new thing here is that we now are going to create this as a blueprint so we don’t say app equals flask what we do is we say Todo equals blueprint and now we have to name the blueprint it’s going to be todos we’re going to pass here uncore uncore name uncore uncore and we’re going to define a template folder which is going to be templates the same way we did it for um for the application so this is what we do for an application here we just add a blueprint name and this is what we’re going to register now later on in our app py file so this is the blueprint and I can do the same thing now to dece instead of app. route to do. Route and the default route here is going to be slash and we’re going to say that we want to have an index and uh all we want to do here is we want to get all the to-dos from the database so to-do query all and then return and we’re going to render a template now what’s important here is um the structure or the convention the best practice way to do it is to create a directory templates here like this and then inside of it to use the same name of the blueprint again so to-dos templates to-dos like this and here now we place our um index HTML file for example now this brings us to another point we have a base template now let’s let’s just return an empty string for now to not have an error here um we want to use a base template for all the different Blueprints and because of that we’re going to create Also let’s close the blueprints here we’re going to create here in the application itself a directory templates and this templates directory will contain the base HTML template base HTML now this one I’m going to copy because I don’t want to waste too much time writing code that we have already written before so that is that we have again just our simple uh actually we don’t need this because we don’t have bootstrap and we also don’t need this uh but this is basically our blueprint we have uh or not blueprint our template we have here the base uh template with the title and the content block and then we just fill it up with um the other HTML files and here now what I’m going to do is I’m going to just extend so I’m going to say here extends base HTML nothing new here we did that before also again I’m going to fill the block title end block the title is going to be todu and then we’re going to fill up the block content and we going to do end block and what we want to do now for the index routee is we just want to get all the to-dos and then we want to say return render template and here now we need to say to-do /index HTML because remember we have a todu directory in the templates directory itself and we pass people equals people uh sorry not people to-dos equals to do like this now this object we can now use again here and display so we can say unordered list and then I can do four to-do in [Music] todos and four and I can just use list items here to show all the toos individually of course so that is a simple index route and then uh just so we have another endpoint here as well we’re going to use a create endpoint so we’re going to say Tod do. route we’re going to say the endpoint is slash create and uh we’re going to allow for methods get and post we going to say create like this and we’re going to say if request method is equal to get we’re going to just return an HTML file otherwise if request. method is equal to post we going to do something else so here I’m just going to return uh render template and I’m going to return H2 do create. HTML which we don’t have yet so I’m going to copy paste the index HTML I’m going to call it create I’m going to delete all this here um and I’m going to have a simple form that I can use here so I’m going to say H1 create too form again I’m rushing through this because all of this we have already done this is just a repetition the new thing is the blueprints now so I’m going to say here URL 4 uh Tod do. create and method is equal to post and then we’re going to have our field here so we’re going to have input type text which is going to be the title of the to-do so the name is going to be title the placeholder is going to be title and required is going to be equal to required then we’re going to say here input type uh text [Music] description come on description description not required and then we’re going to have a check box with the name done and here we’re just going to say in the end done and finally input type submit and the value is going to be equal to create all right so this is going to be our form and all we have to do now is we have to get the attributes title is going to be equal to um request form get title it’s mandatory so we don’t have to check if it’s there or not and for the description we’re going to say um request. form get description and for done we’re going to say it’s true if done is in request form keys so if the checkbox is checked it’s going to be part of the keys otherwise wi not so we want to set it to false if not um and we want to set also the description to null if it’s empty so we’re going to say description is equal to description if description is not equal to an empty string otherwise it’s going to be none so that is that and then we’re just going to create a new to-do like this we’re going to say that the name is equal to name the description is equal to description and done is equal to done and then then all we have to do is DB session add Todo DB session commit and of course we don’t need name we need Title there you go and then we return a redirect to and now this is also important when we do URL 4 now we need to say it’s not index it’s Todo index because we might have another index and another blueprint and that’s a different one of course so everything you see here except for maybe this blueprint line is stuff that we already did I think in two videos and also this is not not new and this is also not new so all this is already something that we have done before also the model now what’s new is how to get this into the application and how we do that is we register the blueprints so we do that in the create app function we just go ahead and say from blueprint app.app uh not app sorry blueprints do toos routes import um Todo now Todo is not a file to-do is our to-do blueprint that we defined up here this is what we want to import and this is also what we want to register so we have to say now app. register blueprint and we register our to-do blueprint and the important thing now is you want to uh you want to uh associate a prefix with it so URL prefix because you will have multiple of those and what I want to do here for example is just SL toos what this means is that in order to get to my index here I don’t have to say just slash I have to say to-dos slash and to get to create I cannot just go to URL SLC create I have to go to URL SL tocreate that is what the prefix is for uh now I’m not going to run the application yet we’re going to finish all the blueprints before we look at this and the good thing is that all of this can be easily just copy pasted at least for the person uh or for the people blueprints I’m going to delete all this and I’m going to just copy paste everything here uh so from here to no just just this stuff here copy and paste now somehow it doesn’t work so let me do that into files Explorer toce seems to be a bit buggy now it works there you go um and all we have to do now is we have to adjust the obvious parts so for example the model is not going to be to-dos or to-do is going to be person the table name is going to be people it’s not going to be a t ID it’s going to be a p ID it’s going to be a name instead of a title um and it’s going to be an AG which is going to be an integer instead of the description and it’s going to be a job um it’s going to be a job instead of a done and it’s going to be a Str string and it’s going to be down here a person and the person will have a name and H like this and it’s going to be a return P ID so that is how we Chang the model for the routes of course what we need to do is we need to change that it’s not the todu blueprint it’s the people blueprint it’s not the name Todo it’s the name people um it’s also not import from to-do models it’s import from people models and it’s going to be import person let me just adjust my chair it’s making some noises here uh it’s going to be the person model uh it’s not going to be add to doce route it’s going to be add people route down here as well um and here it’s not going to be to doce equals to do query it’s going to be people equals person query all and it’s going to be not to do/ index it’s going to be people slash index and it’s going to be people equals people we of course also have to rename now here this name it’s not going to be people templates to do so it’s going to be people templates people and um I think this is now done down here we’re going to do also people create HTML and here of course we need to also get the different field so it’s going to be get name it’s going to be AG is equal to request form get H and we have to type gas this into an integer again rushing through it because we already did it job is going to be equal [Music] to job and we’re going to say that this is going to be job job is going to be job if job is not empty otherwise none here we’re going to say person is equal to person and here we’re going to say name equals name H equals H and job equals job I’m going to add the person and we’re not redirecting to todu index even though we could do that here um we will do to we will redirect to people index uh now this should already be okay now we only have to change these two things we need to change this to people here we need to change this to person in people we need to change this to person and then for create we have to adjust a little bit more first of all again people create person then people create and then here we want to have [Music] name name then we want to have input type number H H then we want to copy this which is going to be job job job and just submit there you go so this should be it now we have our second blueprint what do we do to register it we go to appy we say from blueprint app. blueprints people. routes import the people blueprint and then register to blueprint people with a prefix SL people so we have in both files here you can see we have index and create index and create and they have the same uh pattern here but they’re different because they have different prefixes now finally what I want to do is I want to um implement the core blueprint which is not going to be super fancy it’s just going to be a simple HTML file uh that is rendered by default um so we’re going to go here we’re going to create also here a uh templates directory with another core directory in it and we’re going to copy here the index and we’re going to also copy the routes just so we don’t have to write every basic stuff from scratch but what we’re going to do now is we’re going to say that the blueprint is called core for not people and we also don’t need to import any models here so we’re just going to call this core and we’re going to have core route which is going to be index and this is just going to render the core index HTML but we’re not going to pass any objects and that is going to be our blueprint that’s it we don’t even need a database so just like this and we also don’t need all the Imports we just need render template and blueprint and our index file will do nothing but just uh link to the two other Pages just so we have a landing page a homepage so a h reference is going to be URL 4 and here now we can say todos index toos like this and then we can say here people index for people and that is actually all I want to do here I think maybe we can add a heading H1 homepage or something and we can say here core something like this and now all we have to do is we have to register this and we’re done um so since this is going to be our default default page I’m going to say from blueprint app blueprints core uh routes we’re going to import core and now I’m going to register this and it’s going to have no URL prefix just a slash so this is going to be our default index so to say now of course what’s important is we need to create the database so let’s go ahead and navigate to our current directory let’s go to blueprint app let’s do flask DB init no module named blueprint app blueprints why is that the case oh I think this is one thing that I forgot to do I wanted to place all of them in into a blueprints directory just to have a little bit uh more of an overview so blueprints is going to be a directory and I’m going to copy or I’m going to move core people introduce into this directory now I did this in my prepared code which is why I did the Imports like that blueprint app um and then blueprints core routes and not just blueprint app core routes uh but now it should work so we do we do here flash DB init flash DB migrate Flash DB upgrade and once this is done we can go into our run py file we can run it we can go to our application here and we can uh click on to do now to do is empty uh oh one thing that I wanted to do maybe this would be um useful is we can go to templates we can go to index and we want to have a link that links to URL 4 todos create I can copy this into the people index as well just so we don’t have to use the URL bar to make these changes so let’s restart the application go here to doce create and now I can say test whatever done create stuff stuff not done create there you go then we can go back we can go to people create person there you go so you can see this works and this is how we connect All These Blueprints you can see the URL patterns here people create and then if I go back to dos and then to do create so this is how we integrate All These Blueprints and this is the core blueprint here so yeah this is how you work with blueprints and flas this is how you make your applications more modular and professional all right so finally we’re going to learn how to deploy our flask application to an actual server on the internet and we’re going to also learn how to containerize our application using Docker in order to do that now when it comes to deploying an application there are multiple ways in which it can can be done for example you can also just copy paste all the files upload them to a Linux server install all the dependencies and run the application this is also an option you can use Docker you can use Docker in combination with some cloud service there’s not one correct way to do it what we’re going to do in this video is we’re going to containerize our application using Docker we’re going to upload the docker image to a Linux server which I have rented for this video uh we’re then going to load the docker image on the server we’re going to run it there and then the application is running on the server without us having to install any dependencies without even having to install python we just need Docker on the server and that’s it now if you want to follow along you will need to have some or if you want to replicate the results you will need to have some server that you can work with so you can either do it locally you can open up a virtual machine if you don’t have an actual server on the internet you can rent a server maybe you can find some free alternative I’m using a paid server that I’m paying for monthly uh but you will need to have some SSH access to a Linux server if you want to follow along if you want to replicate otherwise you can just watch and and learn how it’s done so the application that I’m going to deploy today is going to be the blueprint uh the blueprint application from last video so we’re not going to add any new code here we’re just going to take this application and deploy it now since we didn’t do it properly in the last video since we didn’t use a virtual environment we’re going to create one now just so you see why it’s important to have a virtual environment here so I’m going to open up a terminal down here I’m going to navigate to current and I’m going to uh do the following here I’m going to say python 3-m vnf dovm I’m going to create a virtual environment called vnf then I’m going to say source. vnf bin and activate as you can see now I’m using the environment and if I try to see which packages I have installed you can see I have no pip packages installed here so what I’m going to do here because we need it for the application is I’m going to say pip 3 install flask flask um SQL Alchemy and flask migrate and then this is going to install all the packages now why do we need that because we don’t need the virtual environment for Docker we’re not going to uh to add this to Docker we’re not going to add the virtual environment to Docker why do we need that um because now if I have been working on this for maybe months I will have all the packages relevant for this project in this virtual environment and I can do pip three freeze and I can see all the packages with the versions that I have to make this work so I want to have these exact versions to have the exact behavior of my application so what I can do is I can say pip free uh pip three freeze and then requirements.txt and now what I have here is a requirements file with all all the packages and all the versions that I need uh to make it work on any system basically this is the exact configuration I have in my virtual environment with which it works now for the sake of Simplicity what I’m going to do is I’m going to delete um first while I’m going to delete this I’m going to delete the database itself and I’m going to delete the migrations just so I can start from scratch so the application is still here we still have all the blueprints all the files but we don’t have any data already in there so we’re going to deploy an empty application without a database um now what do we need to do in order to turn this into a dock container what we need is we need to have a so-called Docker file so I need to go up here to current I need to right click and I need to say Docker file and this Docker file now will have the instructions that are necessary um to to build the image to build the docker image so the first thing I want to do is I want to specify the python version so I’m going to say from and then I’m going to say python colon 3.10 I’m going to use slim and Buster here so this is the python version that I’m going to use here 3.10 this is the one that I used uh during deploy uh during development as well and now we need to say okay what exactly has to be done to make this application work first of all let’s define a working directory let’s call the working directory flask app like this um what we want to do here is we want to copy the requirements txt file so we want to say copy requirements txt and the file should be requirements txt in the container in the docker container as well once I have requirements txt uh in the container what I want to do is I want to run the following command pip3 install dasr requirements txt now if you don’t know that pip install – R installs the dependencies from a requirements txt file so it’s going to install all these packages with these versions with these exact versions now once I have all the dependencies installed I can just go ahead and copy all the files um of the application so I can just do copy everything to everything so or current directory to the current directory on the server so copy everything that’s in this directory um and place it on the server as well now we don’t need the virtual environment we can delete that I think it has read only so I need to delete it in my uh my files applications here application here uh but we copy out all the files all the blueprints templates uh run file and and all that also the requirements file we copy all this uh into the container and then we change the work directory to flask app and then slash blueprint app now why do we do that we do that because we need to run some commands remember since we’re working with databases and we don’t have the database here we need to run all these flask DB commands and we have to run them inside of this directory because if I run them here they’re not going to have any effect I have to run them in here where the appy file is located so I have to change the working directory and then I can say run flask DB init run flask DB migrate run flask DB upgrade and then I have to change back to flas because of course I need to run the following command Python 3 run py this is running our application and that is the docker file that we need to create our uh image for our application so what do we do we Define a python version We Define a working directory we install the requirements we copy all the files we go into the application we do all the flash DB commands we go back and we run the py file the the Run py file that’s basically what we need to do here now in order to actually turn this into an image now we need to use our command line so I’m going to open up my terminal here I’m going to navigate to the directory here where the docker file is located and now we need to use Docker in order to build um the image now the important thing is that you need to have doer installed you need to have Docker running in the background the docker Damon has to be active so in case of Docker desktop you just need to run the application then the docker Damon is going to be up I’m not going to spend any time here now uh going through the installation process of Docker or showing you how to uh you know get Docker onto your system first of all it’s not that complicated second of all I think I have a video on this channel already where I do that I’m only going to show you how you can actually uh go through the steps uh that are necessary for deployment so I expect you to have Docker already on your system um so what we’re going to do here is we’re going to say Docker built– Tac and we can call this for example blueprint Docker or something like this uh and we need to pass uh a a DOT here because this means that we’re using the current uh the current uh directory for this Docker um this Docker process so there you go you can see it did all the steps it ran all the commands and the docker image is written so what I can do now is I can list a Docker images that I have using Docker images but in my case I don’t need to do that because I know uh the docker image name that I provided Docker Tac which is blueprint Docker so I can say Docker run- d-p now this is important we want to map Port 5000 depending on which Port you used to Port 5000 so the port 5000 in the docker container should also be the port 5000 on this machine that I’m running this on and then blueprint docker so I run this and now as a result of that I should be able to go to Local Host 5,000 and see my application is running and I should be able to do all the stuff that I was able to do before as you can see my application is running and it’s running as a Docker container so I can now say uh Docker PS what is running you can see here old Lama seems to be running and this is also running so I can just say Docker stop and I have to provide the container ID which is this one I think it’s enough to just say something like this that it recognizes which one I’m talking about uh and now if I try to reload you can see it’s down it’s offline basically so we do have our Docker image um we do have our Docker image ready now what we need to do is we need to upload this Docker image to um to the server and for that we need to first save it somewhere we need to save the docker image into a tar file so what we’re going to do is we’re going to say Docker save – o and now let’s call this blueprint Docker doar and what I want to store here is the blueprint Dash Docker image so this is going to take a while and then we’re going to create this tar file there you go and this is now the file that I want to deploy or that I want to upload to my server this is the whole thing this is my whole whole application as a Docker image so in my case here I do already have an SSH connection to my virtual machine now how do you get this file onto the server it depends on how you want to do that maybe you have some FTP access uh the simplest way to do that is to do that is to use SCP so SCP is basically just let me just zoom in a little bit here SCP is this command here you can also use tldr to see what SCP does it basically can just upload a file it can upload whole directories uh all you have to do is you have to say SCP then the file that you want to upload in my case blueprint uh Docker dotar and then you have to specify the uh host and user so in my case it’s root at and then the server host uh I’m not sure if I’m going to show this here maybe you see it right now uh maybe I’m going to censor it but I’m going to just enter here um um I’m going to enter my host and then you want to specify after the host name colon and then slash uh the path where you want to store this now in my case I’m here on my server in the root directory so I want to store it at root and then slash and then also the same name Blue Print Docker tar so this is how you do that in my case it’s going to ask me for a password now and it’s going to upload the file as you can see see it’s uploading the file to the server now and once this is done I’m going to be able to use that file on the server so I think I should already be able to see it it’s being uploaded here um and then all we have to do is we have of course we need to have Docker installed on the server as well again go to Docker installation guide to see how to do that it’s just adding uh the repository and then installing some dependencies it’s not too complicated um and what you want to do now when this is uploaded let me just close this here what you want to do now is you want to say Docker load dasi blueprint doer. tar and then I have the blueprint Docker image on the system and I just have to say Docker run uh and then blueprint Docker or actually not not just run sorry we need to say Docker run and then what we did before we need to say Das d-p we want to map again 5,000 to 5,000 uh and then blueprint Docker like this and now you can see it’s running and I can go to my um to my server which is public which is on the internet now this is not local anymore and I can use the application I can create people there you go I can use the application the flask application is now deployed on an actual server using a Docker container and this is how you do that you just need to have have a server you need to have Docker as I said again what you could do is you can use SCP to just upload all the files and you can then install all the dependencies using Pip this would also work probably but that’s a more convenient way to do it so that’s it for today’s video I hope you enjoyed it and I hope you’ll learn something if so let me know by hitting a like button and leaving a comment in the comment section down below and of course don’t forget to subscribe to this Channel and hit the notification Bell to not miss a single future video for free other than that thank you much for watching see you in the next video and bye for

    By Amjad Izhar
    Contact: amjad.izhar@gmail.com
    https://amjadizhar.blog

  • Kolkata and Partition: A Conversation

    Kolkata and Partition: A Conversation

    This text comprises a conversation between two individuals, likely a filmmaker and an interviewee. The discussion centers on Kolkata and the partition of India and Pakistan, exploring the lasting impact of British colonialism and the resulting societal divisions. The speakers reflect on the complexities of identity, communal harmony, and political realities in the aftermath of partition, drawing parallels between historical events and contemporary societal issues. Their conversation highlights the enduring pain and lingering consequences of this historical period.

    Kolkata: History, Culture, and Memory

    Kolkata is described in the sources as a city with significant historical, cultural, and emotional importance. Here’s a breakdown of its significance:

    • Historical Importance: Kolkata was once the capital of British India [1, 2]. The city’s infrastructure, including buildings, roads, and train systems, reflects the story of British rule [1]. The British also established the world’s first supermarket in Kolkata, known as New Market [2]. The city’s history also includes being a site of assembly for the British [2].
    • Cultural Significance:Kolkata is portrayed as a city with a diverse population where people of different backgrounds and religions live together and celebrate each other’s festivals [1].
    • The city is described as having a unique culture, with a variety of languages and issues [3].
    • Kolkata is also associated with the arts and cinema, with references to old Indian films [2, 4].
    • The city has a rich culture, with a unique blend of spices and dishes [5].
    • Emotional Significance:For some, Kolkata holds a deep emotional connection and is considered a “love city” [1]. It is also referred to as a city that “beats in my heart” [1].
    • The city is remembered for its humanity and the ability of its people to connect with others [4].
    • The city is a place of memories, and there is a wish that the quality of life there could be as good as “home grown chicken as good as daal” [2].
    • The city is remembered as a place where Mother Teresa did her service [2].
    • Significance related to Partition: Kolkata is also mentioned in the context of the partition of India, with discussions about the suffering endured by people there [4]. The city is also mentioned as a place that Gandhi went to when attempting to prevent Hindu-Muslim conflict [6].
    • Symbolic Significance: Kolkata is a place of great interest and love, with some people having interests and loves that are fulfilled by the city [4]. It is seen as a place that was home to a variety of people who lived together peacefully until the British rule [5].

    In summary, Kolkata is presented as a city with a rich history, a diverse culture, and a deep emotional connection for many, particularly those with ties to India or the pre-partition era. The city’s significance extends from its historical role as the capital of British India to its cultural importance as a melting pot of diverse communities.

    The Partition of India and Pakistan: Trauma, Blame, and Lasting Consequences

    The partition of India and Pakistan is portrayed in the sources as a deeply traumatic event with lasting consequences, stemming from hasty British decisions and the exploitation of existing tensions [1, 2]. Here’s a breakdown of the key aspects discussed:

    • The Partition’s Impact:
    • The partition resulted in immense suffering, with both Bengal and Punjab being divided and the nation being “torn into pieces” [1].
    • The immense suffering experienced by the people during the partition is emphasized, with the claim that “no one else had to bear” as much [1].
    • Families were displaced and continue to face difficulties in traveling between the two countries [1].
    • The division caused lasting pain, and the effects are described as reaching “till the veins” and being present until “doomsday” [1].
    • The emotional toll is significant, with the speaker stating their “heart does not allow” them to celebrate the division [2].
    • British Role and Responsibility:
    • The British are blamed for the hasty nature of the partition [1].
    • The partition is described as a result of British self-interest, as their power and army were weakening [1]. They were under pressure to leave and did so without a proper plan [1].
    • The British are accused of making two major mistakes: ending the Mughal government and partitioning India. The British are blamed for humiliating and punishing Bahadur Shah Zafar and for the way they left the country, creating long-term issues [2].
    • The British are criticized for creating a system that led to corruption and division, and for creating a system in which people have to bribe others for their needs [3].
    • The British are seen as having a policy to “earn their political bread” by keeping different groups troubled [2].
    • Underlying Tensions and the Two-Nation Theory:
    • The seeds of division were sown when the British started ruling and tried to create India from their own perspective [3].
    • The “two-nation theory,” which posits that Hindus and Muslims are separate nations, is identified as a key factor in the partition [4].
    • Some people on both sides of the divide started to believe in the two-nation theory which increased the religious tensions between Hindus and Muslims, contributing to the division [4].
    • The Muslim League, which was based in Dhaka, is mentioned as an organization that was not influential across all of India at the time of the partition [5].
    • The Nature of the Violence:
    • The violence is described as indiscriminate, with no distinction between Hindus, Muslims, Punjabis, or Sikhs, with the claim that “the English will burn your houses” [5].
    • The violence was also characterized by the demolition of Hindu and Sikh Gurudwaras [5].
    • There is a strong sense of injustice and a critique of how the violence was exploited for political gain [5].
    • Alternative Views and What Could Have Been:
    • The speaker reflects on the possibility of a united India with democracy, implying that it would have been a better alternative [6].
    • The speaker suggests that if the British had stayed and trained the local people, there would not have been a need for partition, implying that the partition was not beneficial and caused devastation [6].
    • The speaker says that the partition happened without the consensus of the people, because of the British, and was not done with democratic principles [3].
    • The speaker suggests the British “were fools to let India and Pakistan become independent”, but rather should have set up a plan for a democratic separation, in order to avoid the pain of the division [3].
    • Relevance of Individuals:
    • Gandhi’s efforts to prevent Hindu-Muslim conflict are acknowledged, although ultimately he was not able to prevent the violence. He went to Kolkata to protest the Hindu-Muslim fighting [5].
    • Allama Iqbal’s realization that India would become independent is mentioned, as is his concern about the consequences of independence [4].

    In summary, the partition of India and Pakistan is portrayed as a tragic event caused by the hasty and self-interested actions of the British, exploiting existing tensions between religious communities. The partition resulted in immense suffering, displacement, and lasting trauma that continues to affect the people and relationships between India and Pakistan [1, 2].

    British Raj: Legacy of Division and Discord

    The sources discuss the British colonial impact on India and Pakistan, emphasizing both the immediate and long-lasting consequences of their rule. Here’s a breakdown of the key aspects:

    • Infrastructure and Systems: The British are credited with establishing infrastructure such as buildings, roads, and train systems in Kolkata, which reflect the story of British rule [1]. They also established the world’s first supermarket, the New Market, in Kolkata [2]. The sources acknowledge that the British implemented systems and structures in India [1].
    • Political and Social Division:
    • The sources argue that the British sowed the seeds of division by attempting to create India from their own perspective [3]. They are blamed for implementing policies that exacerbated tensions between different religious and social groups [3, 4].
    • The British are seen as having a policy to “earn their political bread” by keeping different groups troubled [5].
    • The British are criticized for ending the Mughal government and expelling Bahadur Shah Zafar from the country in a humiliating manner [5].
    • The British are blamed for the hasty partition of India and Pakistan [6]. The partition is described as a result of British self-interest and a desire to leave without a proper plan [6].
    • The partition is described as causing immense suffering, displacement, and lasting trauma that continues to affect the people and relationships between India and Pakistan [6].
    • Economic Impact:
    • The sources suggest that the British created a system that led to corruption [3].
    • The British are blamed for creating a system in which people have to bribe others for their needs [3].
    • The sources compare British contributions to those of the Mughals, concluding that the British seem “totally useless in the competition” [3].
    • Cultural and Identity Issues:
    • The sources argue that the British created a system in which people are identified by name or religion which was not the case in India previously [7].
    • The British are blamed for the two-nation theory, which created a division based on religion and led to the partition [4].
    • The speaker argues that prior to the British rule, people of all religions and languages lived together harmoniously, and that it was the British who disrupted this balance [3].
    • Critiques of British Actions:
    • The sources contain criticisms of British actions and their long-term impact on the region.
    • The speaker suggests the British “were fools to let India and Pakistan become independent,” and should have had a better plan for separation [3].
    • The sources state that the British left without principles, and that the partition was not beneficial [3, 6].
    • The sources also state that the British were driven by self interest, were weak, and did not properly plan their departure [5, 6].
    • Differing perspectives: The sources include differing opinions regarding the British.
    • One viewpoint is that the British did good by providing training and opportunities to the people of India and Pakistan and that this is how they should be remembered [2, 3].
    • Another viewpoint criticizes those who hold the British in high regard, arguing that their policies and actions led to significant problems [3].

    In summary, the sources portray the British colonial impact as a complex mix of infrastructural developments and divisive policies. The lasting impact includes the partition, ongoing tensions, and the disruption of previously harmonious social structures. The sources emphasize the negative consequences of British rule, including the creation of corrupt systems, the fostering of religious division, and the failure to plan for a peaceful transition to independence.

    Personal Reflections and Historical Contexts

    The sources contain several personal anecdotes that provide insight into the speaker’s experiences and perspectives. These anecdotes often relate to broader themes such as friendship, the impact of historical events, and the speaker’s personal connections to specific places. Here are some of the personal anecdotes discussed in the sources:

    • Friendship and Shared Memories:
    • The speaker recounts a friendship with Faheem Akhtar, noting that they became friends in Kadamba garden and then were hosted by Faheem and his family in England [1]. This anecdote illustrates the importance of personal connections and shared experiences in the speaker’s life.
    • The speaker expresses gratitude for the time they spent with Faheem, and how their relationship has impacted the speaker’s life.
    • Personal Connection to Kolkata:
    • The speaker mentions having spent 26 years in Kolkata and considers it a “love city” that “beats in my heart” [1]. This demonstrates a deep emotional connection to the city.
    • The speaker expresses interest in Kolkata’s history and culture, particularly its connection to the British, and how it was the “assembly of the British” [2].
    • The speaker mentions that in 1985, they met a person in Muktsar who they had previously met in Kolkata [3]. This connection demonstrates how the speaker’s life is intertwined with the history and people they’ve met in different places.
    • Experiences with Partition:
    • The speaker describes their personal feelings regarding the partition, explaining that their “heart does not allow” them to celebrate it due to the immense suffering it caused [3].
    • The speaker shares that they had gone to live with unhappy people in order to help them after the partition, noting that this personal experience impacted them deeply [4].
    • The speaker explains that their marriage procession was based on their thoughts about the partition and that they had not thought about it before that, but were moved to do so by the event [5].
    • Personal Encounters and Observations
    • The speaker recalls seeing a picture of Mother Teresa on their pillow as a child, with the words “I am Mother” written below it [2]. This personal anecdote demonstrates the admiration the speaker held for her.
    • The speaker describes witnessing an incident where people were being chased away and their homes were being ruined, which led them to question the meaning of freedom [4]. This personal observation highlights the speaker’s empathy and critical perspective.
    • The speaker recounts seeing a video of a police officer behaving badly on the train and states that this behavior is an example of the type of behavior that is creating divisions in the country [6].
    • The speaker refers to the way that the British changed India so that people are judged by their names, implying that this was a very negative change, and was also a result of the British system [6].
    • Experiences of Living in England
    • The speaker mentions that they moved to England when they were 26 years old, and that they have been living there for 30 years [1].
    • The speaker mentions that the government paid for their social science degree, which then enabled them to work as a professional [1].
    • Other personal connections:
    • The speaker mentions that they are a “big gram eater” and had an interest in learning about the caste system based on that, and the things they learned about Calcutta from the book Ain-e-Akbari [2].
    • The speaker mentions that they are the son of a Syed, and therefore had a personal interest in the caste system [2].

    These personal anecdotes contribute to a richer understanding of the speaker’s viewpoints, highlighting their connections to places, people, and historical events, and how they feel about these things.

    British Colonialism and its Legacy in India and Pakistan

    The sources offer extensive political commentary, primarily focused on the British colonial impact, the partition of India and Pakistan, and the nature of democracy. Here’s a breakdown of the key political points:

    • Critique of British Colonial Rule:
    • The sources heavily criticize the British for their divisive policies and their role in creating the tensions that led to the partition [1-3]. It is argued that the British intentionally exacerbated tensions between religious and social groups to maintain their own power [1, 2].
    • The British are accused of ending the Mughal government and humiliatingly expelling Bahadur Shah Zafar [2]. This is presented as an example of the British acting unjustly and without respect for established rulers [2].
    • The sources claim that the British implemented systems that encouraged corruption [3].
    • The British are described as having left without a proper plan, leading to chaos and immense suffering [1]. The hasty partition is seen as a consequence of the British prioritizing their own interests over the well-being of the people [1].
    • The Partition of India and Pakistan:
    • The partition is portrayed as a catastrophic event caused by British self-interest and a desire to leave without principles [1]. It is noted that the partition resulted in immense suffering, displacement, and lasting trauma [1, 2].
    • The speaker believes that the partition was not a true representation of freedom and that it led to the unnecessary loss of life and property [2]. The speaker mentions that their heart does not allow them to celebrate the partition [2].
    • The speaker suggests that the British were weak and broke the back of the people. It is argued that they should have left with a better plan to avoid the resulting chaos [1].
    • Democracy and its Failures:
    • The sources offer a critical view of democracy, particularly in the context of India and Pakistan. The speaker argues that India is not a true democracy but rather a dictatorship [3].
    • The speaker notes that both countries have been trapped by the hatred created by the division and that neither country is a true democracy [4].
    • The speaker criticizes the idea of the two-nation theory, arguing that it was a political tool used to divide people and create unrest [5].
    • The speaker expresses concern that the current political climate is such that people are being identified by name and religion, which was not the case prior to the British rule [4]. They believe that this focus on identity is further dividing the people of both India and Pakistan [4].
    • The speaker suggests that people in power are using the idea of democracy to justify violence and oppression, by falsely accusing innocent people [6]. They state that instead of true democracy, they see abuse of power [4, 5].
    • The speaker questions whether the freedom that India and Pakistan achieved was worth the immense suffering and division that came with it [2].
    • Religious and Social Division:
    • The speaker argues that the British are responsible for creating divisions between Hindus and Muslims [3, 5]. They believe that prior to the British rule, people of all religions and languages lived together harmoniously [3].
    • The sources criticize the use of religion as a tool for political gain, noting that those who promote division often do so for their own benefit [5, 7]. The speaker also observes that people who incite conflict do not help those who are suffering but rather seek to gain politically from these actions [7].
    • The speaker notes that people are now being defined by their names and religion, which was not the case previously [4]. This is stated to be a negative consequence of British rule [4].
    • The sources highlight the suffering that individuals and communities have faced as a result of the political and religious divisions created [1, 2].
    • Other political commentary:
    • The speaker mentions that the Aligarh movement did not change the situation of India and Pakistan [4].
    • The speaker states that Pakistan was formed because of the idea that they should be separate, which goes against the way that people have lived in the area for centuries [3, 4].
    • The speaker notes that people with two-nation theories tend to create conflict rather than help [7].

    In summary, the political commentary in the sources is largely critical of British colonial rule and its lasting consequences. The speaker emphasizes the negative impacts of the partition, the failure of democracy to address the issues, and the ongoing religious and social divisions within India and Pakistan. The speaker does not present the British in a positive light, but rather presents them as self-serving and ultimately harmful to the region. They argue that the legacy of British rule continues to negatively impact the people and politics of both countries.

    Kolkata: A Personal History

    The speaker has significant personal experiences and connections to Kolkata, which they refer to as their “love city” [1]. Here’s a summary of the speaker’s experiences in Kolkata, based on the sources:

    • Duration of Stay: The speaker lived in Kolkata for 26 years [1]. This long period of residence has clearly shaped their perspective and emotional connection to the city [1].
    • Emotional Connection: The speaker expresses a deep emotional connection to Kolkata, stating that “Kolkata beats in my heart” [1]. This indicates a strong sense of belonging and affection for the city [1].
    • Multiculturalism: The speaker emphasizes that Kolkata is a place where “all the people live together, all the festivals of all the people are celebrated” [1]. They highlight that this inclusivity was a defining characteristic of the city, without any religious or cultural barriers [1].
    • British Influence: The speaker notes that Kolkata was the “assembly of the British” and served as their capital, and that the infrastructure there, including the buildings, roads, and trains, reflect the story of British rule [1].
    • Historical Significance: The speaker was interested in learning about Kolkata’s history, particularly its role as a capital during British rule [1, 2]. They note that the city’s infrastructure and buildings reflect this period [1]. The speaker also learned that the world’s first supermarket was made by the British in Calcutta [2].
    • Personal Encounters: In 1985, the speaker met someone in Muktsar who they had previously met in Kolkata [3]. This anecdote demonstrates how the speaker’s life is intertwined with the people and places they have encountered [3].
    • Cultural Perspective: The speaker sees Kolkata as part of the culture of India, which has a lot of variety [4]. The speaker is very interested in the culture of Kolkata, and is also interested in how it is perceived by others [1].
    • Historical Context: The speaker has a deep interest in the historical context of Kolkata, citing their interest in the book Ain-e-Akbari and how it explains the caste system, and particularly with how that information connects to Calcutta [2]. They have also been very interested in the history of how the British came to the city, and the impact of their rule there [1].

    These experiences in Kolkata have greatly impacted the speaker’s views and opinions as expressed in the sources. The city is not only a place of personal history but also a lens through which the speaker views broader issues of culture, colonialism, and identity [1].

    Kolkata and Lahore: A Comparative Reflection

    The speaker contrasts Kolkata and Lahore, highlighting their distinct characteristics and personal significance. Here’s how the speaker compares the two cities, based on the provided sources:

    • Multiculturalism and Inclusivity: The speaker emphasizes that Kolkata is a city where “all the people live together, all the festivals of all the people are celebrated,” indicating a high level of inclusivity and cultural harmony [1]. The speaker also mentions that in Kolkata, there are no specific identities that cause divisions, and that from the time that they were born to the time that they left the city after 26-27 years, all of the people lived together [1]. In contrast, the speaker does not offer this characterization of Lahore. Instead they refer to the “boxes” in Lahore, implying a city that does not share the same sense of unity as Kolkata [1].
    • Personal Connection: The speaker has a deep emotional connection with Kolkata, which they refer to as their “love city” and state that it “beats in my heart” [1]. This level of personal affection is not expressed for Lahore.
    • Historical Context: The speaker states that Kolkata was the “assembly of the British” and served as their capital [1, 2]. The infrastructure there, including buildings, roads, and trains, reflect the story of British rule [1]. The speaker notes that the British made the world’s first supermarket in Kolkata [2]. There is no equivalent discussion of the historical impact of the British in Lahore.
    • Contrasting Experiences: The speaker mentions that they lived in Kolkata for 26 years [1]. Later, they went to Lahore, and they mention witnessing the suffering of people there, especially related to the partition [3]. The speaker explains that when they have heard about the suffering that Hindu people have endured in Lahore, that they want to learn more about the people who die in buildings, and that their heart does not allow them to celebrate the division of the country. In this way, the speaker is relating how their experiences in Lahore are much different than their experiences in Kolkata, where they were not witness to this kind of suffering.
    • System of Justice: The speaker notes that the government gave them money to get a degree in social science, which they state allowed them to work in a professional job, and that this is something “very beautiful, Masha Allah, very awesome” [1]. The speaker states that these systems of justice are “not the same as in Calcutta” [1]. The speaker does not elaborate further about the differences between the system of justice in Lahore vs. Kolkata.
    • The Impact of British Rule: The speaker implies that the British rule in Kolkata, including the establishment of the New Market, was a significant development [1, 2]. Although the speaker critiques British rule generally, they don’t provide the same level of historical context regarding British rule in Lahore. However, they note that the British are responsible for the division between people in India and Pakistan [4].
    • Current Political Climate: The speaker notes that they believe that the current system of governance is making it so that people are judged by their names [5]. They suggest that this was a change that the British caused in both countries [5]. The speaker believes that this type of system is not in place in Kolkata [1], and they are very concerned about the political climate in both India and Pakistan [5]. They are very critical of the systems and policies that are in place [5].
    • Partition and Suffering: The speaker makes it clear that the partition had a profound impact on Lahore, stating that it was devastating for the people [3]. The speaker notes the suffering of the people in Lahore, and that they have gone to live with unhappy people as a result [3, 6]. They note that their heart will not allow them to celebrate the partition [6]. The speaker mentions that at the time of the partition, Bengal was broken into two parts, and the Punjab was also broken, which caused an immense amount of suffering [3]. The speaker also mentions that they believe that the British are responsible for the partition, because they left so hastily [3]. They do not refer to this kind of suffering specifically in Kolkata, and suggest that people there lived in harmony [1, 4].

    In summary, the speaker views Kolkata as a city with a rich history, multiculturalism, and personal significance, while they portray Lahore as a place marked by the trauma of partition and political and social divisions.

    Kolkata: A British Legacy

    The speaker in the sources indicates that the British played a significant role in shaping Kolkata, both in its physical infrastructure and in its social and political dynamics [1, 2]. Here’s a summary of the British impact on the city according to the speaker:

    • Capital of British India: Kolkata was the “assembly of the British,” and served as their capital [1, 2]. As the capital, it became a focal point of British administrative and colonial power, and the city’s development was directly influenced by British priorities and policies.
    • Architectural and Infrastructure Legacy: The speaker notes that the buildings, roads, and train systems in Kolkata reflect the story of British rule [1, 2]. This indicates that the British significantly invested in and shaped the city’s infrastructure. The British constructed the New Market, which the speaker notes was the world’s first supermarket [1, 2].
    • Social Impact: The speaker believes that the British influenced the way that the people of Kolkata live, and how they interact with each other. The speaker notes that in Kolkata, all the people lived together, and they celebrated each other’s festivals [1]. The speaker sees this as a very important part of the city’s identity, which was influenced by British rule [1].
    • Historical Significance: The speaker expresses an interest in the history of British rule in Kolkata. They have read about the history of Kolkata’s role as a capital during British rule. They connect their understanding of the British rule to how they view the city of Kolkata today [1, 2].
    • Partition: Although the speaker does not directly connect the British to the shaping of Kolkata at the time of the partition, they do express that they believe that the British caused the division of India and Pakistan due to the hasty way that they left [3]. The speaker is aware that the partition significantly impacted the region, and they believe that the British are at fault for this division.

    In summary, the speaker views the British as having a profound and lasting influence on Kolkata, shaping not only its physical landscape but also its social and historical context [1, 2]. The speaker’s perspective is critical, as they suggest that while the British contributed to the city’s development, their policies ultimately led to the division of the country [3].

    Calcutta: A City’s History and Identity

    The speaker’s interest in Calcutta’s history appears to stem from a combination of personal connections, a desire to understand the city’s unique identity, and a critical perspective on British colonial influence. Here’s a breakdown of what prompted their interest in Calcutta’s history, based on the sources and our conversation history:

    • Personal Connection and Identity: The speaker has a deep emotional bond with Calcutta, referring to it as their “love city” and stating that it “beats in my heart” [1]. This strong personal connection seems to have prompted an interest in learning more about the city’s past. Having lived in Calcutta for 26 years [1], the speaker’s desire to understand the historical context behind their own experiences in the city is a motivating factor.
    • Multiculturalism and Social Dynamics: The speaker is interested in the fact that, in Calcutta, “all the people live together, all the festivals of all the people are celebrated” [1]. They contrast this with other places and they seem interested in understanding how this dynamic came to be, and how this unique social dynamic was influenced by the city’s history. The speaker is interested in the fact that in Calcutta, there are no specific identities that cause division, and that from the time that they were born to the time that they left the city after 26-27 years, all the people lived together [1].
    • British Colonial Influence: The speaker notes that Calcutta was the “assembly of the British” and served as their capital, with the city’s infrastructure reflecting British rule [1]. This has sparked an interest in the impact of British colonialism on the city, including its architecture, infrastructure, and social systems. The speaker’s statement that “the buildings, the roads, the trains, the systems there, all show the story of the British rule in them” [1], shows the importance of British history to the speaker’s understanding of the city. The speaker is interested in the way that the British shaped the city, not only in terms of infrastructure, but also in terms of social norms [1].
    • Historical Texts and Accounts: The speaker mentions that they read a couplet about Calcutta and were interested in learning more about the city as a result [1]. The speaker mentions being interested in the book Ain-e-Akbari, and how that book discusses the caste system [2]. This suggests that the speaker’s historical interests also stem from a wider intellectual curiosity about the region and its history, especially as related to Calcutta [2].
    • Contrasting Calcutta with Other Places: The speaker compares the social harmony in Calcutta to the “boxes” in Lahore [1]. This contrast appears to have also heightened the speaker’s interest in understanding how the two cities came to be so different. This seems to have further motivated them to explore the historical factors that contributed to Calcutta’s unique identity.
    • The New Market: The speaker learned that the world’s first supermarket was made by the British in Calcutta [2]. This has contributed to their interest in the history of Calcutta.
    • Desire to understand the Partition: While the speaker does not directly connect their interest in Calcutta to the partition, the fact that they are interested in the suffering that was caused by the partition, and the role of the British in the partition may also be a factor in their interest in the history of Calcutta, and how it came to be a site of British rule [3].

    In summary, the speaker’s interest in Calcutta’s history is prompted by a combination of personal connections, the unique social and cultural dynamics of the city, and a desire to critically examine the impact of British colonial rule. The speaker seems motivated by the desire to understand how these historical forces have shaped the city they know and love.

    The 1947 Partition: A Tragedy of Unnecessary Division

    The speaker views the 1947 Partition with a great deal of sorrow and criticism, emphasizing the immense suffering it caused and questioning its necessity [1]. Here’s a comprehensive breakdown of their perspective:

    • Devastating Suffering: The speaker believes that the Partition resulted in an immense amount of suffering, stating that “the amount of suffering you had to bear and the amount of suffering we had to bear, I think no one else had to bear” [1]. The speaker expresses a deep sense of empathy for those who suffered, noting that the pain of the Partition “reaches till the veins” [1]. They also express that they want to learn more about the suffering that Hindu people have had to endure in Lahore, and that they cannot celebrate the division of the country because of the pain that they have witnessed. The speaker mentions that they went to live with “unhappy people” as a result of the partition, and that their heart will not allow them to celebrate it [2].
    • Unnecessary Division: The speaker questions the purpose and the necessity of the Partition, suggesting that it was a destructive event that tore the nation apart [1]. They state that “for freedom, dividing the country, ruining it so much, praying for these people… did freedom mean anything and it meant nothing” [2]. This suggests they believe that the division of the country was not a necessary component of independence.
    • Critique of British Haste: The speaker believes that the British were responsible for the hasty and poorly planned execution of the partition [1]. They believe that the British left because their “back was broken” and they no longer had the strength to rule, and that they left without establishing a proper plan. They believe that the British should not have left so quickly [1].
    • Personal Impact: The speaker’s personal experiences and observations in Lahore have clearly influenced their view of the Partition [1]. They mention seeing the suffering of people in Lahore and that their heart does not allow them to celebrate the division of the country [2]. The speaker notes that they went to Lahore to be with those who are suffering, which shows how deeply affected they have been by the devastation of the partition [2]. The speaker contrasts this with the peaceful co-existence of people in Kolkata, where the people lived in harmony [3].
    • Impact on Communities: The speaker emphasizes that the Partition caused significant disruption to communities, noting that “the families who have settled here are troubled, they are facing difficulty in coming and going” [1]. They believe that the partition caused long lasting disruptions to peoples’ lives, and that the pain and difficulty that people have experienced is still present today [1].
    • Critique of the Two-Nation Theory: The speaker questions the logic behind the Two-Nation Theory, which posited that Hindus and Muslims could not live together and needed separate nations. The speaker notes that the idea of dividing the nation based on religion caused people to view each other based on their identity rather than their shared humanity, stating that “the politics of Presto of dividing in the name of religion and presenting the two nation theory, all this started from there because when some people on both sides started believing in this They started talking like this is a Hindu, this is a Muslim…” [4]. The speaker notes that prior to the British rule, there was no conflict between people of different religions, and that the British are responsible for causing the division between people [5]. The speaker states that “before the British there was no issue” [5]. The speaker points out that the people who promote the Two-Nation Theory do not do anything to help those who are suffering, and that instead they incite more conflict [6].
    • Long-Term Consequences: The speaker suggests that the consequences of the Partition are ongoing, noting that “we have been trapped in the hatred of those” [7]. They express concern about the political climate of both India and Pakistan, and that the systems are causing people to be known by their name, rather than as individuals, and that this is a direct result of the policies that were put into place during the partition [7].
    • Missed Opportunity for Unity: The speaker notes that, despite the fact that they believe that the British should have stayed, that they should have left the region in a way that would have preserved the unity of the people [7]. They suggest that the division was not inevitable, and that the British left the region in a state of turmoil that resulted in lasting hatred and conflict [7].

    In summary, the speaker views the 1947 Partition as a profoundly tragic event, characterized by immense suffering, unnecessary division, and the long-lasting negative consequences that continue to impact the region [1]. They hold the British responsible for the hasty way that they left and for the division of the people based on religion [1, 5]. The speaker’s personal experiences, combined with their understanding of history, have led them to believe that the partition was a mistake [2].

    Kolkata, Partition, and the Shadow of Empire

    Okay, here is a discussion guide based on the sources and our conversation history, focusing on key themes and points raised by the speaker:

    Themes for Discussion

    • The Impact of British Colonial Rule:
    • How did British rule shape the physical and social landscape of Kolkata [1, 2]?
    • What does the speaker mean when they refer to Kolkata as “the assembly of the British” [1, 2]?
    • How did British rule contribute to the infrastructure of the city, such as the roads, train system, and New Market [1, 2]?
    • What is the speaker’s perspective on the long-term consequences of British rule on India [1-6]?
    • The Speaker’s Personal Connection to Kolkata:
    • What is the significance of Kolkata to the speaker [1]?
    • How has their personal history in Calcutta shaped their views [1]?
    • How does the speaker’s personal connection to Calcutta influence their interest in its history [1, 2]?
    • How does the speaker describe their love for Calcutta [1, 2]?
    • What does the speaker mean when they say that “Kolkata beats in my heart” [1]?
    • How does the speaker’s experience of living in Calcutta for 26 years affect their views [1]?
    • What is the speaker’s view of the multiculturalism of Calcutta [1]?
    • The 1947 Partition:
    • What is the speaker’s view of the 1947 Partition [3, 4]?
    • How does the speaker believe the Partition impacted the people of India and Pakistan [3]?
    • What role do they believe the British played in the Partition [3, 4, 6]?
    • What does the speaker mean when they say that the British left in a “hasty” way [3, 4]?
    • How does the speaker describe the suffering caused by the partition [3, 4]?
    • What are the speaker’s thoughts on the Two-Nation Theory [3, 7]?
    • What does the speaker mean when they say that “the amount of suffering you had to bear and the amount of suffering we had to bear, I think no one else had to bear” [3]?
    • How does the speaker’s personal experience in Lahore contribute to their views of the Partition [3, 4]?
    • What does the speaker mean when they say that “for freedom, dividing the country, ruining it so much…did freedom mean anything and it meant nothing” [4]?
    • What does the speaker mean when they state that “we have been trapped in the hatred of those” [8]?
    • Democracy and Governance:
    • What is the speaker’s perspective on the current state of democracy in India and Pakistan [6, 8]?
    • What is the speaker’s view of political leaders [4-8]?
    • How do they see the relationship between religion and politics in the region [3, 6-8]?
    • What is the speaker’s view of the systems that have been implemented by the governments of India and Pakistan [6, 8]?
    • What does the speaker mean when they say that India is not a democracy, but a dictatorship [6]?
    • What does the speaker mean when they say that “today people are knowing people by name” and that “this was not there in India earlier” [8]?
    • How does the speaker perceive the systems in place that allow for the abuse of the people [8]?
    • Historical Perspective:
    • Why is the speaker interested in the history of British rule in India [2, 4]?
    • How does the speaker’s interest in historical texts, such as the Ain-e-Akbari, influence their perspective [2]?
    • How does the speaker interpret the actions of figures like Bahadur Shah Zafar and Mahatma Gandhi [4, 5, 7]?
    • How does the speaker believe that the British used historical events to justify their rule [4, 5]?
    • What does the speaker mean when they say “before the British there was no issue” [6]?
    • The Role of Individuals in History:
    • What does the speaker think about figures like Mother Teresa, and Syed Ahmed Khan [2, 6]?
    • What is the speaker’s perspective on the role of individuals in promoting division or unity [7, 9]?
    • How does the speaker view figures who have a “two nation theory” [7, 9]?
    • What is the speaker’s view of the role that “criminals” play in society, and how do they define “criminal” [9]?
    • Social Justice and Humanity:
    • How does the speaker’s sense of social justice shape their views of the historical and political events they discuss [3, 4]?
    • How do they define the concept of humanity, and how do they believe that people have failed to uphold these ideals [1, 3, 7, 8]?
    • What is the speaker’s view of how society should treat those who are suffering [3, 8]?
    • What does the speaker mean when they say that “humanity has become lacking in us these days” [3]?
    • How does the speaker’s view of humanity influence their views of the British [6, 8]?

    Questions for Further Exploration

    • How do the speaker’s personal experiences and emotions affect their interpretation of historical events?
    • What are some of the main differences between the speaker’s view of history and other perspectives?
    • How does the speaker’s understanding of history influence their views of contemporary issues?
    • How might the speaker’s perspective challenge or confirm our own understanding of history and society?
    • What are some of the specific examples that the speaker uses to support their points, and what do these examples reveal about their perspective?
    • How does the speaker view the role of religion in the political division of the region [6-9]?

    This study guide is designed to encourage a deep and critical analysis of the speaker’s perspective, using their statements and observations in the provided sources as a starting point for a thoughtful discussion.

    A Critical Perspective on the Partition of India

    Okay, here’s a briefing document based on the provided sources and our conversation history, designed to give a comprehensive overview of the speaker’s perspectives on key topics.

    Briefing Document

    Subject: Analysis of Speaker’s Views on Kolkata, the Partition of 1947, and Related Issues

    Introduction This document provides a detailed analysis of the speaker’s viewpoints as expressed in the provided sources. The speaker offers a critical perspective on various topics including the legacy of British rule, the 1947 partition of India and Pakistan, the nature of democracy, and the importance of social justice and humanity. The analysis is based on the speaker’s statements, reflections, and personal experiences, with an emphasis on understanding their nuanced and often critical perspective.

    Key Areas of Analysis

    • Personal Connection to Kolkata
    • The speaker has a strong emotional connection to Kolkata, which they describe as their “love city” that “beats in [their] heart” [1]. They lived there for 26 years and it is a place they feel deeply connected to.
    • They emphasize the city’s multiculturalism, noting that people of all backgrounds live together and celebrate each other’s festivals [1].
    • They view Kolkata as a place where people co-exist peacefully, which contrasts with their view of the division and conflict they have witnessed in other places [1].
    • British Colonial Rule
    • The speaker acknowledges that the British made Kolkata their capital and developed its infrastructure, including buildings, roads, and the train system [1].
    • They note that the British also established the New Market, which they recognize as the world’s first supermarket [2].
    • While they acknowledge these contributions, they also criticize the British for their negative impact, particularly in causing the partition of India and Pakistan [1, 3].
    • They believe that the British ended the Mughal government and humiliated Bahadur Shah Zafar [4].
    • They also believe that the British were ultimately responsible for the division between people based on religion [5].
    • The speaker believes that the British were motivated by selfishness and did not make a well thought out plan for the end of their rule, and they left because they no longer had the ability to stay [3].
    • The 1947 Partition
    • The speaker views the Partition as a deeply tragic event that caused immense suffering and the unnecessary division of a country [3].
    • They describe the suffering as reaching “till the veins,” and express a deep empathy for those who experienced it [3].
    • They believe that the partition was a mistake, and that the division of the country was not a necessary part of independence [3].
    • They suggest that the partition created long-lasting problems, as families continue to face difficulties in traveling between India and Pakistan [3].
    • The speaker believes that the British were responsible for the hasty and poorly planned execution of the partition, and they should have left in a way that preserved the unity of the people [3].
    • The speaker notes that the suffering that resulted from the partition has caused them to feel that they cannot celebrate the division of the country [3].
    • Critique of the Two-Nation Theory
    • The speaker is critical of the Two-Nation Theory, which posited that Hindus and Muslims could not live together and needed separate nations [6].
    • They believe that this theory promoted division and caused people to view each other based on their religious identity, rather than their shared humanity [6].
    • They argue that there was no issue between people of different religions before the British rule [5].
    • The speaker states that people who promote this theory do nothing to help those who are suffering, and instead incite more conflict [7].
    • Democracy and Governance
    • The speaker expresses a critical view of democracy in India and Pakistan, suggesting that these are not true democracies but dictatorships [5].
    • They believe that the current political systems are causing people to be known by their names rather than as individuals, which is a negative outcome [8].
    • They express concern about the abuse of power by police and government officials, stating that this is a fundamental flaw in the systems [8].
    • The speaker also criticizes the way that governments use the idea of “democracy” to justify their actions [9].
    • Historical Perspective
    • The speaker is very interested in historical texts, such as the Ain-e-Akbari, and they use this knowledge to inform their perspective [2].
    • They express a critical view of historical figures, like Bahadur Shah Zafar, who they believe was wrongly punished by the British [4].
    • The speaker notes that the British used historical events to justify their rule, and that they did so by manipulating these events to achieve their own goals [5].
    • They believe that the root of many of these conflicts can be traced to the way the British altered the course of history [5].
    • The Role of Individuals in History
    • The speaker has a positive view of individuals who worked for peace and unity, like Mother Teresa [2].
    • The speaker is critical of people who promote division based on religion, and points out that these people never take any action to help those who are suffering [7].
    • They note that “criminals” are people of all religions and that they should not be seen as a reflection of their religion [7].
    • The speaker notes that people should be known for their humanity, rather than their religion or political affiliation [6].
    • Social Justice and Humanity
    • The speaker is deeply concerned with the suffering of ordinary people and emphasizes the importance of social justice and the need to protect human rights [3].
    • They believe that people have failed to uphold the ideals of humanity, as they have been divided by the political events of the time [3].
    • They are saddened by the lack of humanity that they have witnessed, and believe that the division of the region has caused people to lose sight of their shared humanity [3, 6].
    • The speaker feels that society has a responsibility to help those who are suffering [3].

    Conclusion

    The speaker’s perspective is marked by a deep sense of empathy, a critical view of colonial history, and a strong commitment to justice and humanity. They view the 1947 partition as a tragic event that continues to impact people today, and they believe that the British colonial rule played a significant role in this division. Their views are informed by their personal experiences, historical knowledge, and a profound concern for the suffering of ordinary people. They offer a nuanced perspective on the issues, and they are highly critical of the political systems that they believe are causing great harm. The speaker feels that people should be known for their humanity, and they deeply lament the loss of unity that was caused by the events that they have discussed.

    Kolkata, Partition, and Humanity

    Okay, here is an FAQ based on the provided sources and our conversation history, designed to give a comprehensive overview of the speaker’s perspectives on key topics.

    Frequently Asked Questions

    • What is the speaker’s connection to Kolkata?
    • The speaker has a very strong emotional connection to Kolkata, describing it as their “love city” that “beats in [their] heart” [1]. They lived there for 26 years and have fond memories of the city [1].
    • They highlight the city’s multicultural nature, where people of all backgrounds live together and celebrate each other’s festivals [1].
    • The speaker views Kolkata as a place of peaceful co-existence, which contrasts with the division and conflict they have witnessed elsewhere [1].
    • What are the speaker’s views on British colonial rule in India?
    • The speaker recognizes that the British made Kolkata their capital and developed its infrastructure, such as buildings, roads, and the train system [1].
    • They also acknowledge that the British established the New Market, which they note was the world’s first supermarket [1, 2].
    • However, they are critical of the British for their negative impact, particularly in causing the partition of India and Pakistan [3, 4].
    • The speaker believes that the British were selfish and did not have a good plan for the end of their rule, and that they left because they no longer had the power to stay [3, 4].
    • They criticize the British for ending the Mughal government and humiliating Bahadur Shah Zafar [4].
    • The speaker believes that the British are responsible for creating divisions between people based on religion [5].
    • What is the speaker’s perspective on the 1947 partition of India and Pakistan?
    • The speaker views the Partition as a tragic event that caused immense suffering and the unnecessary division of a country [3].
    • They describe the suffering caused by the partition as reaching “till the veins” and express empathy for those who experienced it [3].
    • They believe that the partition was a mistake, and that the division of the country was not a necessary part of independence [3].
    • The speaker also suggests that the partition created lasting problems, as families continue to face difficulties in traveling between India and Pakistan [3].
    • They believe that the British were responsible for the hasty and poorly planned execution of the partition, and they should have left in a way that preserved the unity of the people [3].
    • The speaker notes that the suffering that resulted from the partition has caused them to feel that they cannot celebrate the division of the country [4].
    • How does the speaker view the Two-Nation Theory?
    • The speaker is critical of the Two-Nation Theory, which argued that Hindus and Muslims could not live together and needed separate nations [6].
    • They believe that this theory promoted division and caused people to view each other based on their religious identity, rather than their shared humanity [6].
    • They state that there was no conflict between people of different religions before the British rule [5].
    • The speaker argues that people who promote this theory do nothing to help those who are suffering, and instead incite more conflict [7].
    • What are the speaker’s thoughts on democracy and governance?
    • The speaker expresses a critical view of democracy in India and Pakistan, suggesting that these are not true democracies, but rather dictatorships [5].
    • They believe that the current political systems cause people to be known by their names, rather than as individuals, which they see as a negative development [8].
    • They express concern about the abuse of power by police and government officials, stating that this is a fundamental flaw in the system [8].
    • The speaker also criticizes the way that governments use the idea of “democracy” to justify their actions [9].
    • How does the speaker use history to inform their perspective?
    • The speaker is very interested in historical texts, such as the Ain-e-Akbari, and they use this knowledge to inform their views [2].
    • They express a critical view of historical figures, such as Bahadur Shah Zafar, who they believe was wrongly punished by the British [4].
    • The speaker notes that the British used historical events to justify their rule, and they did so by manipulating these events to achieve their own goals [4].
    • They believe that the root of many of the conflicts can be traced to the way that the British altered the course of history [4].
    • What are the speaker’s views on the role of individuals in history?
    • The speaker has a positive view of individuals who worked for peace and unity, like Mother Teresa [2].
    • They criticize people who promote division based on religion, noting that these people never take action to help those who are suffering [7].
    • The speaker states that “criminals” come from all religions and that they should not be seen as a reflection of their religion [7].
    • The speaker believes that people should be known for their humanity, rather than their religion or political affiliation [8].
    • What does the speaker believe about social justice and humanity?
    • The speaker is deeply concerned with the suffering of ordinary people and emphasizes the importance of social justice and the need to protect human rights [3, 4].
    • They believe that people have failed to uphold the ideals of humanity, as they have been divided by the political events of the time [3].
    • They are saddened by the lack of humanity that they have witnessed, and believe that the division of the region has caused people to lose sight of their shared humanity [3].
    • The speaker feels that society has a responsibility to help those who are suffering [3].

    This FAQ provides an overview of the speaker’s complex and nuanced views on these important topics, based on the provided sources.

    India’s Partition: A Legacy of Division

    Okay, here’s a timeline of key events and periods discussed in the sources, based on the speaker’s perspective:

    • Before British Rule:The speaker states that before the British, there was no issue of division between people of different religions or languages [1]. People of all backgrounds lived together peacefully for centuries [1]. This is contrasted with the period of British rule.
    • British Colonial Rule:The British made Kolkata their capital [2, 3]. They developed infrastructure such as buildings, roads, and trains [2, 3].
    • The British also established the New Market, which the speaker notes was the world’s first supermarket [3].
    • The speaker believes the British attempted to create India based on their own perspective, which led to divisions [1].
    • The speaker says the British ended the Mughal government, humiliating Bahadur Shah Zafar [4].
    • 1926:The speaker mentions that the destruction began in Pindi, with the demolition of Hindu and Sikh Gurudwaras [5].
    • The speaker’s father died during this period [5].
    • 1946:August 16, 1946: The speaker references the Direct Action Day and the compulsions felt by Allama Iqbal, who realized the implications of India’s impending independence [6].
    • 1947: Partition of India and Pakistan:The speaker states that the British hastily partitioned India and Pakistan [7].
    • This partition resulted in immense suffering [7].
    • The speaker expresses a strong belief that the partition was a mistake, and that it should not have happened [7].
    • The speaker states that families continue to face difficulties traveling between India and Pakistan [7].
    • Post-Partition:The speaker suggests that the political systems in India and Pakistan have become like dictatorships [1, 8].
    • The speaker believes that people are now known by their names or religious affiliations, rather than their individual humanity [6, 8].
    • They criticize the abuse of power by the police and government officials [8].
    • The speaker notes that the hatred created during the partition continues to affect people today [8].
    • The speaker states that the divisions created by the British and the partition are still relevant in the current situation in India and Pakistan [6, 8].

    This timeline reflects the key events and periods discussed in the sources, as seen through the speaker’s perspective. The speaker sees British rule and the partition as a turning point that introduced conflict and division into a previously peaceful society.

    A Critical View of British Raj in India

    The speaker has a complex and critical view of the British Raj’s impact on India, acknowledging some developments while highlighting significant negative consequences [1-3].

    Positive aspects of British rule mentioned by the speaker include:

    • The British made Kolkata their capital and developed its infrastructure, such as buildings, roads, and train systems [1].
    • The establishment of the New Market in Kolkata, which the speaker notes was the world’s first supermarket [2].

    However, the speaker is primarily critical of the British for the following:

    • Creating divisions: The speaker believes that the British tried to create India from their own perspective, which led to divisions between people of different religions [3]. The speaker says that before the British, people of all religions and languages lived together peacefully [3].
    • Ending the Mughal government: The speaker is critical of the British for ending the Mughal government and humiliating Bahadur Shah Zafar [4].
    • The Partition: The speaker believes the British were responsible for the hasty and poorly planned partition of India and Pakistan in 1947, which caused immense suffering [5]. They believe that this partition was a mistake, and that it should not have happened [3, 5]. The speaker feels that the British left because they no longer had the power to stay, and they did not leave in a way that preserved the unity of the people [5].
    • Selfishness: The speaker accuses the British of being selfish, stating that their actions were motivated by their own political gain [4]. They believe the British did not have a good plan for the end of their rule [5].
    • Long-term negative impact: The speaker notes that the divisions created by the British continue to affect people in India and Pakistan today [3, 5]. They believe that the political systems in India and Pakistan have become like dictatorships, which is a negative outcome of British influence [3].

    The speaker’s overall perspective is that the British Raj had a largely negative impact on India, despite the infrastructure development and other systems that they put in place [1, 2]. They believe that the British created divisions, ended established governments, and caused the tragic partition of India and Pakistan, and that these issues are still causing problems today [3-5].

    British Rule in India: Two Critical Mistakes

    The speaker identifies two major mistakes made by the British [1].

    • First, they opposed the Mughals and ended their government, expelling Bahadur Shah Zafar from the country in a humiliating manner and punishing him despite the fact that he was not a terrorist [1]. The speaker believes that the British should have praised Bahadur Shah Zafar rather than imprisoning him [1].
    • Second, the British acted out of selfishness, which resulted in the partition of India and Pakistan. The speaker asserts that the British did not leave with a good plan for the end of their rule, and they left because they no longer had the power to stay [1, 2]. The speaker notes that the British did not leave the European Union without a plan and should have done the same in India [1].

    Kolkata’s Multicultural Harmony

    The speaker describes Kolkata as a city with a unique and cherished multicultural environment [1]. They emphasize that in Kolkata:

    • People of all backgrounds live together, and celebrate each other’s festivals [1].
    • This co-existence is presented as a norm, as the speaker lived in Kolkata for 26 years [1] and remembers the city as a place “where there is no identity” in the sense that people of different backgrounds blend together [1].
    • The speaker views this aspect of Kolkata as a model for how different groups can live together peacefully [1].
    • They suggest that this is in stark contrast to the divisions and conflicts that they have witnessed elsewhere, particularly after the partition of India and Pakistan [1, 2].

    The speaker’s description highlights Kolkata as an example of harmonious multiculturalism, where diverse communities coexist and celebrate their shared humanity [1].

    The Partition of India: A Legacy of Suffering

    The speaker views the 1947 partition of India and Pakistan as a major mistake with devastating consequences [1]. They believe that:

    • The British were responsible for the partition, carrying it out hastily and without a proper plan [1]. The speaker feels that the British were motivated by selfishness and left because they no longer had the power to stay [2].
    • The partition caused immense suffering for the people involved [1]. The speaker states that the amount of suffering endured during the partition was unlike anything else, and they do not believe that the suffering has ended [1].
    • The partition broke the country into pieces [1]. The speaker states that Bengal and Punjab were divided and the nation was torn apart [1].
    • Families continue to face difficulties traveling between India and Pakistan [1]. The speaker feels that families who settled on either side of the border continue to face hardship related to the difficulties of traveling back and forth between the countries [1].
    • The partition was a major source of conflict [1]. The speaker states that the hatred created during the partition continues to affect people today [3].
    • The speaker believes the partition should not have happened [1]. The speaker wishes the British had not divided the country [4].

    In summary, the speaker views the 1947 partition as a tragic event that resulted from the mistakes and selfishness of the British, causing immense suffering and creating lasting divisions [1, 2]. The speaker wishes the British had not divided the country and believes that this event was one of the worst things that the British did in India [4].

    By Amjad Izhar
    Contact: amjad.izhar@gmail.com
    https://amjadizhar.blog

  • Al Riyadh Newspaper, March 10, 2025 Ramadan Activities, Charity, GDP Growth

    Al Riyadh Newspaper, March 10, 2025 Ramadan Activities, Charity, GDP Growth

    These Saudi Arabian news excerpts from March 10, 2025, cover a diverse range of topics. A major focus is on Ramadan-related activities, including charitable campaigns exceeding 740 million Riyals, the King’s Iftar program providing meals and dates, and the 18th annual Charity Book Exhibition in Riyadh. Other prominent subjects include economic updates, such as a 1.3% GDP growth, increased cement sales, and Aramco’s oil pricing adjustments. The issue also reports on regional and international affairs, including discussions on Gaza, Ukrainian-American meetings in the Kingdom, and oil market fluctuations. Finally, the sources touch upon local developments like a university achieving top ranking in scientific research, environmental compliance efforts, Ramadan preparations in various cities, and updates in sports leagues.

    Study Guide: Saudi Arabia in March 2025

    This study guide is designed to help you review your understanding of the provided news excerpts from the Saudi Arabian newspaper Al Riyadh, dated Monday, March 10, 2025 (10 Ramadan 1446 AH).

    Quiz: Short Answer Questions

    Answer the following questions in 2-3 sentences each, based on the provided source material.

    1. What was the main topic of the “Word” column on page 16?
    2. What international event related to Ukraine was reportedly going to take place in Jeddah? What were some of the key issues expected to be discussed?
    3. What was the reported amount of donations raised so far by the National Campaign for Charitable Work? How was this campaign initiated?
    4. According to the article on page 3, what were the two main programs being carried out by the Ministry of Islamic Affairs during Ramadan? How many countries were involved in each?
    5. What academic achievement did Prince Sultan University reportedly attain in the 2025 Times Higher Education World University Rankings by Subject? What specific area was highlighted?
    6. What government body issued 1289 permits during January and February 2025? What was the purpose of these permits?
    7. What historical event related to Mecca is discussed on page 10? What was the immediate outcome of this event?
    8. According to Tahani Abdullah Al-Khayal’s article, what significant shift has occurred regarding women in Saudi Arabia since the launch of Vision 2030? What statistics support this claim?
    9. What was the overall trend in sales and production for Saudi cement companies during February 2025 compared to February 2024? Which company reportedly had the highest increase in sales?
    10. What initiative has the “Tirmim for Development” association in the Makkah region undertaken since 2022? What is their broader goal beyond just housing?

    Quiz: Answer Key

    1. The “Word” column on page 16 discussed Saudi Arabia’s growing international role and trust in resolving conflicts and crises. It highlighted the Kingdom’s balanced international relations, strategic neutrality, and efforts to establish global peace and stability under the current leadership.
    2. A meeting between the United States and Ukraine was reportedly planned to take place in Jeddah. Key issues expected to be discussed included regional security, trade, economic cooperation, the conflict in Ukraine, and collaboration in the energy sector.
    3. The National Campaign for Charitable Work reportedly surpassed 740 million riyals in donations. This campaign was launched following the approval of King Salman bin Abdulaziz Al Saud through the “Ihsan” platform.
    4. The two main programs were distributing dates to fasting individuals and providing iftar meals. The date distribution program covered 102 countries, while the iftar program served fasting people in 61 countries.
    5. Prince Sultan University reportedly achieved the first position in the 2025 Times Higher Education World University Rankings by Subject for the quality of its scientific research. Its performance in this area was noted to be at 90.5%.
    6. The National Center for Commitment to the Environment issued 1289 permits during January and February 2025. These permits are essential for facilities to enter the market, ensuring their commitment to environmental standards and work requirements.
    7. Page 10 discusses the re-establishment of Umayyad control over Mecca in 73 AH following a decisive battle led by Al-Hajjaj bin Yusuf Al-Thaqafi by order of Caliph Abd al-Malik bin Marwan. This marked the beginning of a new phase focused on restoring Umayyad authority and rebuilding Mecca after a period of conflict.
    8. Since the launch of Vision 2030, the role of women in Saudi Arabia has reportedly experienced qualitative leaps, moving beyond slogans to a tangible reality. Women’s participation in the labor market increased from 17% in 2017 to 37% in 2023, exceeding expectations.
    9. Overall, both sales and production for Saudi cement companies reportedly increased during February 2025 compared to February 2024. “Saudi Cement Company” reportedly had the highest increase in sales at 46%.
    10. Since 2022, the “Tirmim for Development” association in the Makkah region has been undertaking a comprehensive approach to develop places and individuals by improving housing for needy families. Their broader goal extends beyond just physical renovation to enhance the social, psychological, and economic stability of these families, aligning with Vision 2030.

    Essay Format Questions

    Consider the following essay questions and develop a structured argument for each, drawing evidence from the provided source material.

    1. Analyze the key aspects of Saudi Arabia’s foreign policy as presented in the “Word” column and the report on the US-Ukraine meeting in Jeddah. What principles guide the Kingdom’s international engagements, and what role is it attempting to play in global and regional affairs?
    2. Discuss the significance of the National Campaign for Charitable Work and the Ramadan programs of the Ministry of Islamic Affairs in the context of Saudi Arabia’s social and cultural values. How do these initiatives reflect the Kingdom’s leadership’s approach to social responsibility and religious observance?
    3. Evaluate the progress and future potential of women’s empowerment in Saudi Arabia based on the statistics and perspectives presented in Tahani Abdullah Al-Khayal’s article. What factors have contributed to this progress, and what are the broader implications for Saudi society and its Vision 2030 goals?
    4. Examine the economic trends in the Saudi cement sector as reported in the article on page 7. What factors might be influencing these trends, and what do they suggest about the broader economic activity and development within the Kingdom?
    5. Discuss the initiatives and objectives of the “Tirmim for Development” association in the context of Saudi Arabia’s Vision 2030. How does this organization contribute to the Kingdom’s broader goals of sustainable development and improving the quality of life for its citizens?

    Glossary of Key Terms

    • خادم الحرمين الشريفين (Khadim al-Haramayn al-Sharifayn): Custodian of the Two Holy Mosques, a title used by the King of Saudi Arabia signifying his role as the protector of Mecca and Medina.
    • ولي العهد (Wali al-‘Ahd): Crown Prince, the designated successor to the King.
    • رؤية 2030 (Ru’yah 2030): Vision 2030, a strategic framework launched by Saudi Arabia to diversify its economy, develop public service sectors, and position the Kingdom as a global leader.
    • قمة الجامعة العربية (Qimmat al-Jami’ah al-‘Arabiyah): Arab League Summit, a meeting of heads of state of the Arab League member countries.
    • حملة العمل الخيري (Hamlat al-‘Amal al-Khayri): Charitable Work Campaign, a national initiative to encourage and organize charitable donations and activities.
    • التصاريح البيئية (Al-Tasarih al-Bi’iyah): Environmental Permits, official authorizations issued by environmental regulatory bodies for facilities to operate while adhering to environmental standards.
    • أمراء مكة (Umara’ Makkah): Princes of Mecca, referring to the historical rulers and governors of the city of Mecca.
    • تمكين المرأة (Tamkin al-Mar’ah): Women’s Empowerment, the process of enabling women to have control over their lives and exert influence in society.
    • الإسمنت (Al-Ismant): Cement, a basic ingredient of concrete.
    • الإفطار السيار (Al-Iftar al-Sayyar): Mobile Iftar, a project providing ready-made meals to travelers at iftar time during Ramadan.
    • الرائد (Al-Ra’id): Pioneer, leader, or leading.
    • جيولوجي (Jiyuluji): Geological, relating to the study of the Earth’s physical structure and substance, its history, and the processes that act on it.
    • نزوح (Nuzuh): Displacement, the state of being forced to move from one’s home or country.
    • المخيمات (Al-Mukhayyamat): Camps, often referring to refugee camps or temporary settlements.
    • إعادة الإعمار (I’adat al-I’mar): Reconstruction, the process of rebuilding or restoring something that has been damaged or destroyed.
    • المستوطنات (Al-Mustawtanaat): Settlements, often referring to Israeli settlements in occupied Palestinian territories.
    • التنمية المستدامة (Al-Tanmiyah al-Mustadamah): Sustainable Development, development that meets the needs of the present without compromising the ability of future generations to meet their own needs.
    • القطاع الثالث غير الربحي (Al-Qita’ al-Thalith Ghair al-Ribhi): The Third Non-Profit Sector, comprising organizations that are neither government nor for-profit businesses.
    • الركود الأخير (Al-Rukud al-Akhir): The Latest Recession, referring to a recent period of economic decline.
    • المارد (Al-Marid): The Giant, often used metaphorically to describe a powerful entity or potential.

    Saudi Arabia: Global Diplomacy, Charity, and Domestic Progress

    Frequently Asked Questions about the Provided News Articles

    1. What was the main focus of the Saudi delegation’s meetings and activities mentioned in the articles? The Saudi delegation, led by Crown Prince Mohammed bin Salman, focused on international diplomacy and conflict resolution. This included mediating in the Russia-Ukraine crisis by maintaining communication with both Moscow and Kyiv, hosting Ukrainian President Zelenskyy, and preparing for political discussions between the United States and Ukraine in Jeddah. The Kingdom’s efforts aim to achieve lasting peace in the region and globally, reflecting its strategic neutrality and balanced international relations.
    2. What was the “National Campaign for Charitable Work” and how much did it raise? The “National Campaign for Charitable Work” in its fifth edition, launched with the approval of King Salman bin Abdulaziz Al Saud, is an initiative to support charitable work and its impact on society. It gathers donations from businesspeople, institutions, and individuals through the “Ehsan” platform. In its initial phase, the campaign received donations exceeding 740 million Riyals, with significant contributions from the Crown Prince and other high-ranking officials, demonstrating the leadership’s commitment to philanthropy.
    3. What was the outcome of the meeting between Ukrainian and American officials in Saudi Arabia? The articles indicate that a high-level Ukrainian delegation met with an American team in Saudi Arabia for discussions. While the specific outcomes weren’t detailed, the meeting aimed to discuss and agree on necessary decisions and steps regarding the Russia-Ukraine conflict. Expectations suggest potential progress on political dimensions, and the meeting was considered significant for the relations between the participating countries, focusing on regional security, trade, and economic cooperation. Issues like the conflict in Ukraine and energy cooperation were likely on the agenda, potentially leading to new alliances and cooperation.
    4. How is Saudi Arabia supporting Muslims internationally during Ramadan, according to the articles? During Ramadan 1446 AH, Saudi Arabia is implementing programs to distribute dates and provide iftar meals to fasting Muslims across three continents. The King’s programs are executed by the Ministry of Islamic Affairs, distributing dates in 102 countries and iftar meals in 61 countries. These efforts aim to meet the needs of Muslims globally and reflect the Kingdom’s commitment to supporting them in their religious, social, and community needs. Examples include a handover ceremony in Azerbaijan, providing five tons of dates to over 40,000 beneficiaries, and similar initiatives in Kenya and the Maldives, reaching hundreds of thousands of individuals.
    5. What initiatives are being undertaken in Medina during Ramadan to enhance the experience for visitors? The Ministry of Interior is intensifying its efforts to enhance security and manage crowds in the Prophet’s Mosque in Medina during Ramadan 1446 AH. Various security and service sectors are implementing comprehensive plans to ensure the safety of visitors, provide humanitarian support, and offer services. Additionally, the Medina Municipality is enhancing its services by deploying over 8,000 personnel to oversee cleanliness, food safety, and manage street vendors, ensuring a healthy environment for visitors. An innovative “ambulance scooter” service has also been launched to provide rapid medical assistance within the Prophet’s Mosque and its surroundings.
    6. How does the article portray the progress of women’s empowerment in Saudi Arabia in line with Vision 2030? The article highlights significant advancements in women’s empowerment in Saudi Arabia since the launch of Vision 2030. It emphasizes that empowering women is not just an option but a reality reflecting the Kingdom’s ambition to build a modern society that utilizes the potential of all its citizens. The participation of women in the labor market has increased substantially from 17% in 2017 to 37% in 2023, exceeding expectations. Saudi women are now active in various fields and achieving unprecedented accomplishments, driven by a strong political will and continuous support.
    7. What were the key points discussed regarding the global oil market and OPEC+ decisions? The articles discuss the volatility and uncertainty in the global oil market, influenced by OPEC+ decisions to increase production and concerns about oversupply amid potentially slowing global economic growth. The impact of potential US tariffs on major oil suppliers and retaliatory tariffs from countries like Canada are also highlighted as factors that could increase energy costs and negatively affect oil prices. Additionally, political efforts to resume oil exports from Iraq through Turkey have faced setbacks. OPEC maintains a forecast for increased global oil demand in 2025 and 2026, while the International Energy Agency suggests demand might peak within the decade due to the transition to cleaner fuels.
    8. What are the main developments concerning the Israeli-Palestinian conflict discussed in the articles, particularly regarding Gaza? The articles detail ongoing efforts to reach a second phase of a ceasefire agreement in Gaza, with Hamas reportedly agreeing to an independent aid committee to manage the Strip. Israel sent a delegation to Doha for further negotiations, despite reports of no significant progress yet. Key sticking points include the release of Israeli hostages and the withdrawal of Israeli forces, while Hamas insists on remaining in control of Gaza, the complete withdrawal of Israeli forces, reconstruction efforts, and financial aid. The situation in the West Bank, particularly East Jerusalem, is also tense, with a significant increase in the demolition of Palestinian homes by Israeli authorities. In Jenin, Israeli military operations have caused casualties and displacement. A controversial proposal by Donald Trump regarding the future of Gaza and its population transfer has been met with regional and international rejection.

    Saudi Arabia: Diverse Charitable Initiatives

    Based on the provided sources, there is no direct mention of a specific campaign explicitly named “National Charity Campaign”. However, the sources do highlight numerous instances of charitable activities, humanitarian aid, and social support initiatives undertaken in Saudi Arabia. These reflect a broader commitment to charity and helping those in need.

    Here are some examples of charitable actions and related concepts mentioned in the sources:

    • Humanitarian Aid for Ukraine: The Ministry of Foreign Affairs in the Kingdom expressed its welcome for the planned meeting between the United States and Ukraine in Jeddah. The Kingdom affirmed its continuous efforts to achieve a lasting peace in the Ukrainian crisis and has hosted numerous meetings over the past years. These efforts included providing humanitarian and medical aid, as well as food assistance. This demonstrates the Kingdom’s commitment to peace and stability and providing aid to those affected by conflict.
    • Efforts in the Gaza Strip: Saudi Arabia has shown enthusiasm for holding a second phase of negotiations regarding a ceasefire agreement in the Gaza Strip. Hamas expressed its commitment to the terms of the agreement, including the need for aid to enter the sector without restrictions. The Kingdom appears to be supporting efforts towards humanitarian relief in this context.
    • Support for Vulnerable Groups: The Prince of Al-Qassim participated in an iftar with orphans and people with disabilities in Buraidah. This act reflects the leadership’s concern for these groups and their well-being.
    • Support for the Elderly: A memorandum of understanding was signed between the Al-Qassim Governorate and the General Directorate of Technical and Vocational Training to support the Wafa Oasis Association for the Elderly. This aims to enhance cooperation, exchange expertise, and highlight the role of both parties in promoting social responsibility towards the elderly.
    • Ramadan Charity: During the month of Ramadan, the Kingdom organizes programs to distribute dates to fasting people in various countries. This initiative, under the patronage of the Custodian of the Two Holy Mosques and the Crown Prince, signifies the Kingdom’s care and support for Muslims around the world.
    • Charitable Associations: A meeting in Tabuk will include a visual presentation about the achievements of charitable associations in the region during the past year, and will honor the associations that won the Tabuk Charity Award. This indicates the recognition and support for organized charitable efforts within the Kingdom.
    • Culture of Giving: The “Ya Habi Lakum” event in the Eastern Province, part of the “Wa Yabqa Atharuhum” initiative, aims to promote a culture of giving and celebrate its pioneers.
    • Community Initiatives: The “Markaz Al-Balad Al-Amin” initiative in Mecca aims to enhance the exchange of opinions and experiences to boost investment and development services. While not solely a charity campaign, it fosters collaboration for the betterment of the community.
    • Sustainable Development through Charity: One article discusses a developmental project focused on sustainably addressing social issues, including the rehabilitation of dilapidated housing for low-income families. This highlights a strategic approach to charity that aims for lasting impact and social and economic stability. It emphasizes collaboration between various sectors, including government and civil society, to provide comprehensive solutions for beneficiary families.

    While these examples showcase a strong tradition of charitable work and various initiatives within Saudi Arabia, the sources do not provide specific details about a unified “National Charity Campaign.” If you have more context or a specific timeframe for this campaign, providing additional sources might help in offering a more precise discussion.

    Saudi Arabia Local Product Growth and Economic Diversification

    Based on the sources, there is significant information regarding local product growth in Saudi Arabia, particularly focusing on the expansion of non-oil activities and the overall growth of the Kingdom’s Gross Domestic Product (GDP).

    According to the report from the General Authority for Statistics, the real GDP achieved a growth rate of 1.3% during 2024 compared to the previous year. Notably, this growth was driven by a 4.3% increase in non-oil activities and a 2.6% rise in government activities, while oil activities saw a decrease of 4.5%. This highlights a clear trend towards diversification and the growing importance of local, non-oil production.

    Looking at quarterly figures, the real GDP grew by 4.5% in the fourth quarter of 2024 compared to the same quarter of the previous year, with growth across all economic activities. Specifically, non-oil activities grew by 4.7%, oil activities by 3.4%, and government activities by 2.2% on an annual basis during the fourth quarter of 2024. This consistent growth in non-oil sectors demonstrates a positive trajectory for local product expansion.

    The cement sector also provides an example of local market growth. During the first month of 2025, sales of Saudi cement companies in the local market increased by 9.1%. This improvement is attributed to progress in the real estate sector and major projects, aligning with the Kingdom’s Vision 2030. Furthermore, cement production rose by about 12.3%, and exports increased by 5.3% during the same month. This indicates a strengthening of the local building materials industry, contributing to overall economic growth.

    Saudi Vision 2030 is explicitly mentioned as a driving force behind this economic growth. The report states that the positive growth rates of most economic activities in 2024 are in line with the objectives of Vision 2030 to achieve a prosperous economy reflecting the success of the vision’s programs and major legislative reforms.

    The Kingdom’s success in economic diversification is further emphasized. There is a focus on increasing non-oil revenue sources by activating important sectors such as tourism and mining, leveraging the strong digital infrastructure. The growth of the Public Investment Fund’s assets and the increasing contribution of non-oil GDP to the total GDP (from 18.7% in 2016 to 50% in 2023) are concrete indicators of this diversification.

    The halal food industry is another area with significant local and global growth potential. The sources discuss the increasing demand for halal products from Muslim consumers living in non-Muslim countries, pushing global markets to cater to these needs. Factors contributing to the global spread of halal food include globalization, ease of trade, increased health and quality awareness among both Muslims and non-Muslims, and the rising number of Muslims worldwide. Future opportunities for the halal food industry include innovation in halal products (such as plant-based options and cosmetics) and halal tourism, suggesting potential for local businesses to capitalize on this growing market.

    Furthermore, the achievements of Saudi universities in registering patents and the high quality of scientific research at institutions like Sultan University point towards a growing local capacity for innovation, which is crucial for long-term product development and economic growth.

    In summary, the sources indicate a positive trend in local product growth in Saudi Arabia, primarily driven by the expansion of non-oil sectors in line with Vision 2030. This is evident in the overall GDP growth, the strong performance of non-oil activities, the expansion of industries like cement, and the potential of sectors like halal food. The focus on diversification and innovation further supports the prospects for continued local product growth in the Kingdom.

    Ramadan Iftar: Charity, Community, and Cuisine

    Based on the sources, the concept of Ramadan Iftar Tables is highlighted through various mentions of breaking fast during the holy month.

    • Charitable Giving during Ramadan often involves providing iftar. The National Charity Campaign, although not explicitly detailed in the sources [previous conversation], aligns with the spirit of giving seen in Ramadan, which can include supporting iftar for those in need.
    • Leaders participate in iftar with vulnerable groups. The Prince of Al-Qassim is mentioned participating in an iftar meal with orphans and people with disabilities, sharing a meal and having fatherly conversations with them. This illustrates the importance of iftar as a communal and caring event, especially for those who may be less fortunate.
    • The Kingdom organizes programs to provide iftar internationally. The Custodian of the Two Holy Mosques sponsors programs to distribute dates and provide iftar meals to fasting individuals in numerous countries across the globe during Ramadan. This demonstrates a broader commitment to supporting Muslims during Ramadan by facilitating the breaking of their fast.
    • Specific foods are strongly associated with the Ramadan iftar table in Saudi Arabia. The samboosa is highlighted as a traditional dish that is essential to the Saudi iftar spread. It is so significant that it is considered an appetizer that never disappears from the Ramadan table, with a proverb even mentioning its importance. This emphasizes the cultural and culinary significance of certain foods during iftar.
    • Decorations and symbols signify the arrival of iftar. In Ha’il, the squares are decorated with Ramadan-themed figures, including the Ramadan cannon, symbolizing the time for iftar. This indicates the public recognition and celebration of the time when fasting ends and the iftar meal begins.

    In summary, the sources portray Ramadan iftar tables as central to the observance of the holy month, emphasizing charity, community engagement with vulnerable populations, the provision of meals on both local and international levels, the importance of traditional foods, and public signals marking the time for iftar.

    East Jerusalem Housing Demolitions: Israeli Policy and Impact

    Based on the sources, the discussion of housing demolition policy is specifically focused on the actions taken by Israeli authorities in East Jerusalem. The sources do not contain information about housing demolition policies in general or in Saudi Arabia.

    Here’s what the sources indicate regarding housing demolitions in East Jerusalem:

    • Demolition as a Tactic of Control: The demolition of Palestinian homes by Israeli authorities is described as a key tactic to control the Palestinian population and alter the demographic structure of occupied Jerusalem. This is linked to efforts to increase the number of Jewish settlers in the area.
    • Reasons for Demolition: Demolitions are often carried out under the pretext of building without a permit. However, the Israeli organization “Bimkom” points out that Palestinians are often not permitted to build, contributing to a housing crisis.
    • Examples of Demolitions: The sources mention the demolition of the home of Ibrahim Shehadeh and his family in the “Jabal al-Mukaber” neighborhood in East Jerusalem. Shehadeh had been threatened with demolition since 2018 and received a formal demolition order in December 2024. He was given three weeks to evacuate.
    • Advancement of Settlement Projects: Simultaneously with demolitions, the Israeli government has advanced plans for new Jewish settlement projects in East Jerusalem, potentially leading to the construction of thousands of new settlement units. These projects were previously stalled but were reportedly revived and legalized following President Trump’s inauguration in 2017.
    • International Perspective: The United Nations and the international community consider East Jerusalem occupied territory.
    • Consequences of Demolitions: The demolitions are described as part of an ongoing housing crisis for Palestinians in East Jerusalem. The organization “Bimkom” argues that unless fair housing for Palestinians is considered, these demolitions will continue.
    • Expansion of Settlements: The Israeli government is actively seeking to expand settlements in East Jerusalem to change the demographic balance in favor of Jewish settlers. Several large settlements surrounding Jerusalem are mentioned.

    In summary, the sources highlight that the housing demolition policy discussed is specific to the actions of Israeli authorities in East Jerusalem, viewed as a tactic to control the Palestinian population and expand Jewish settlements in occupied territory. The sources do not provide any information regarding housing demolition policies outside of this specific context.

    Saudi Football League, International Players, and Club Privatization

    Based on the sources, there is extensive discussion about football league competition, particularly focusing on the Saudi Professional League (“Roshen”). The sources also touch upon the performance of Saudi players in international leagues like the Italian Serie A and the English Premier League, as well as international club competitions like the AFC Champions League.

    Here’s a breakdown of the information provided:

    Saudi Professional League (“Roshen”):

    • The competition in the Saudi Professional League (“Roshen”) is described as intense, with closely positioned teams at the top.
    • After the fourth round, the league was considered exciting, with many expecting a strong contender for the title.
    • Al-Ittihad, led by star player Karim Benzema, showed strong performance, leading for several rounds and reaching a nine-point lead at one point. They maintained a strong level with significant fan support, reaching 58 points and competing for the Custodian of the Two Holy Mosques Cup. However, they have since drawn against Al-Khaleej and lost to Al-Akhdoud, failing to capitalize on opportunities to distance themselves from their rivals.
    • Al-Hilal is in second place, four points behind Al-Ittihad with 54 points. Despite internal tension between the coach and fans, injuries, and participation in the AFC Champions League, they remain title contenders. Al-Hilal has recently benefited from rivals dropping points, closing the gap on Al-Ittihad. They are also preparing for a crucial second-leg match in the AFC Champions League after losing the first leg against Pakhtakor in Uzbekistan. The team needs fan support to raise morale and secure victory.
    • Al-Ahli, returning from Asia with a significant away win against Al-Rayyan in Qatar, drew against Al-Khaleej. These dropped points allowed Al-Hilal to close the gap.
    • Al-Nassr also drew with Al-Shabab, further contributing to the tightening competition at the top.
    • Al-Qadisiyah is mentioned as a strong team in the league, and their coach did not succeed in the first-leg cup match but believes they can win the return leg with the support of their fans and home advantage.
    • Other teams mentioned include Al-Najma, led by Portuguese coach Mário Silva and featuring players like Algerian defender Billal Aouadhiya, and Al-Adalah, coached by Slovakian Martin Solva and with players like Nigerian Antwiwaa Erkuombei. Their head-to-head record shows eight wins for Al-Adalah, eight for Al-Najma, and four draws in their 20 previous encounters.
    • Matches between Abha and Al-Jabalain, and Al-Ittihad Jeddah and Abha are also mentioned, highlighting the ongoing league fixtures. Al-Jubail defeated Al-Najma.

    Saudi Players in International Leagues:

    • Saud Abdulhamid returned to AS Roma’s starting lineup in the Italian league. Despite limited opportunities, he provided a crucial assist in a 4-1 victory, becoming the first Saudi player to assist a goal in Serie A. He also started in a Europa League match against Sporting Braga and scored, becoming the first Saudi to score in the Europa League.
    • The English Premier League is mentioned with Manchester United drawing against Arsenal, potentially paving the way for Liverpool to win the title. Manchester City defeated Nottingham Forest, while Chelsea also won.

    Saudi Club Privatization:

    • There are discussions about the privatization of Saudi football clubs, divided into two main paths.
    • The first path involves the transfer of ownership of Al-Ahli, Al-Ittihad, Al-Nassr, and Al-Hilal to royal entities.
    • The second path involves the Public Investment Fund (PIF) acquiring Al-Qadisiyah, Al-Orobah, Al-Derai’yah, and Al-Elm.
    • A second phase will offer 14 clubs for privatization to investors, with this step in its final stages.
    • The success of the initial privatization steps is noted, with Al-Qadisiyah and Al-Orobah being promoted to higher leagues after acquisition by PIF-related entities.
    • Concerns are raised about the exclusion of historically significant clubs like Al-Shabab, Al-Ettifaq, and Al-Riyadh from these initial privatization steps.

    Footballing Opinions and Analysis:

    • An opinion piece discusses Al-Hilal’s performance and their coach’s delayed corrections, leading to dropped points.
    • Another piece expresses happiness with the positive changes in Saudi football due to the privatization efforts.

    In summary, the sources provide a snapshot of the intense competition within the Saudi Professional League, highlighting the performances of top teams like Al-Ittihad and Al-Hilal. They also note the progress of Saudi players in international leagues and the significant ongoing process of privatizing Saudi football clubs.

    By Amjad Izhar
    Contact: amjad.izhar@gmail.com
    https://amjadizhar.blog

  • Angular .NET Full Stack: Inventory and Customer CRUD Tutorial

    Angular .NET Full Stack: Inventory and Customer CRUD Tutorial

    The tutorial provides a comprehensive guide to building a full-stack web application using Angular 17 and .NET Core. It focuses on implementing CRUD (Create, Read, Update, Delete) operations for inventory and customer management. The tutorial demonstrates integrating Bootstrap for styling and utilizes SQL Server for data persistence. Key concepts covered include routing, data binding, HTTP requests, and the use of stored procedures. The explanation offers step-by-step instructions, from setting up the Angular components to creating the .NET Core API and interacting with the database, including UI enhancements for an improved user experience. The final implementation focuses on achieving real time updates for data being shown in the UI.

    Angular 17 & .NET Core Full Stack Application Study Guide

    Quiz

    1. What are the two prerequisites needed to begin building an Angular application according to the video?
    2. Explain what the command npm install -g @angular/cli does and why it’s important.
    3. When creating a new Angular application using the command ng new [application-name], what is the first question asked and why is this relevant to web development?
    4. What is the command code . used for in the context of this tutorial?
    5. Describe the significance of the src folder in an Angular application, particularly mentioning the index.html and app folders.
    6. What does the command ng serve do, and what benefit does it provide during development?
    7. Explain how bootstrap can be integrated into an angular app.
    8. Explain how the NG generate component command can add to the folder structure of an app.
    9. Explain how routing works in an angular app.
    10. Explain how to submit data from an Angular app to a .NET Core API.

    Quiz – Answer Key

    1. The two prerequisites are Node.js, which can be downloaded from nodejs.org, and Visual Studio Code, which can be downloaded from the Visual Studio Code website; these tools are required for running and developing Angular applications.
    2. The command npm install -g @angular/cli installs the Angular CLI (Command Line Interface) globally on the system; this allows you to use Angular commands like ng new to create and manage Angular projects.
    3. The first question asked is which stylesheet format you want to use (e.g., CSS, Sass); this is important because it determines how you’ll style your Angular application.
    4. The command code . opens Visual Studio Code from the command prompt, automatically loading the current directory (the Angular application folder) into the editor.
    5. The src folder contains the source code of the Angular application; index.html is the top-level HTML file, and the app folder contains the components and logic for the application, the code actually displayed.
    6. The command ng serve builds the Angular application and starts a development server, automatically reloading the browser whenever changes are made to the code.
    7. Bootstrap is installed through the command npm install bootstrap –save. The Javascript and CSS files of bootstrap are integrated into the angular.js file.
    8. The command NG generate component [path]/[component name] creates a new folder within the folder designated by the path variable, and then adds a folder with all of the component files into this folder.
    9. Routing allows for traversing to particular pages without reloading the entire application, keeping the main template intact; it requires defining routes in app.routes.ts and using routerLink in HTML templates.
    10. Data is submitted from an Angular app to a .NET Core API using the HttpClient module; this involves creating a data structure, defining the API URL, and using the post method to send the data, subscribing to the result to handle the response.

    Essay Questions

    1. Describe the process of setting up a full-stack application using Angular 17 for the front end and .NET Core for the back end, including installation of prerequisites, project creation, and initial configuration. Explain common problems and what to do when errors occur.
    2. Explain the significance of components and routing in Angular applications, detailing how they contribute to creating a modular and navigable user interface.
    3. Outline the steps involved in integrating Bootstrap into an Angular application and utilizing its CSS classes to style the user interface, focusing on the benefits of using a CSS framework.
    4. Discuss the implementation of CRUD (Create, Read, Update, Delete) operations in an Angular application, covering the front-end logic, back-end API calls, and database interactions.
    5. Compare and contrast the different approaches used for creating and managing dialog boxes in the Angular application described in the tutorial, highlighting the advantages and disadvantages of each method.

    Glossary of Key Terms

    • Angular CLI: A command-line tool for creating, managing, and building Angular applications.
    • Node.js: A JavaScript runtime environment that allows you to run JavaScript on the server-side.
    • npm (Node Package Manager): A package manager for JavaScript that is used to install and manage dependencies for Node.js projects.
    • Component: A reusable building block of an Angular application that encapsulates HTML, CSS, and TypeScript code.
    • Routing: A mechanism for navigating between different views or pages in an Angular application without reloading the entire page.
    • Bootstrap: A popular CSS framework that provides pre-built styles and components for creating responsive and visually appealing user interfaces.
    • .NET Core: A cross-platform, open-source framework for building modern web applications and APIs.
    • API (Application Programming Interface): A set of rules and specifications that allows different software systems to communicate with each other.
    • CRUD Operations: The four basic operations performed on data: Create, Read, Update, and Delete.
    • Model: A class that defines the structure and behavior of data in an application.
    • Data Binding: The process of connecting data between the component class and the HTML template in an Angular application.
    • Two-Way Binding: An ability to have data flow two ways, from HTML to the component code, or from the component code to the HTML.
    • HttpClient: An Angular module that allows you to make HTTP requests to a server to retrieve or send data.
    • JSON (JavaScript Object Notation): A lightweight data-interchange format that is easy for humans to read and write and easy for machines to parse and generate.
    • Dependency Injection: A design pattern in which objects receive other objects that they depend on (dependencies) instead of creating them themselves.
    • Intellisense: A code completion feature in IDEs like Visual Studio Code that provides suggestions and assistance while coding.
    • TypeScript: A superset of JavaScript that adds optional static typing, classes, and interfaces to improve code maintainability and scalability.
    • SPA (Single-Page Application): A web application that loads a single HTML page and dynamically updates the content as the user interacts with the application.
    • Localhost: A hostname that refers to the current computer being used.
    • REST API: An API that conforms to the constraints of REST (Representational State Transfer) architecture, enabling interaction with resources through standard HTTP methods.
    • Course: A set of HTTP response headers that are required to allow cross-domain communications.
    • JavaScript: A high-level, often just-in-time compiled programming language that conforms to the ECMAScript specification.
    • HTML: The standard markup language for documents designed to be displayed in a web browser.
    • CSS: A style sheet language used for describing the presentation of a document written in a markup language such as HTML.
    • DOM: A programming interface for HTML and XML documents.
    • Stringify: Converting objects to string format.
    • ASync: Describes one or more processes that do not occur at the same time.
    • Varchar: Variable length character string data type.
    • Integer: A numerical data type representing an integer.
    • Void: When a function does not return a value.
    • Json: A minimal, readable format for structuring data.
    • DB: Short for database.
    • TS File: The Typescript file for an angular component, where program logic is kept.
    • HTML Template: The HTML code associated with a component that is displayed in the application.
    • Module: The imports and exports used in a component.

    Angular 17 and .NET Core Full Stack Tutorial

    Okay, here’s a detailed briefing document summarizing the provided transcript, focusing on the key themes, ideas, and important facts, along with relevant quotes.

    Briefing Document: Angular 17 and .NET Core Full Stack Application Tutorial

    I. Overview

    The transcript details the construction of a full-stack web application using Angular 17 for the front-end and .NET Core for the back-end API. The tutorial walks through setting up the development environment, creating Angular components, integrating Bootstrap for styling, implementing routing, performing CRUD (Create, Read, Update, Delete) operations, and connecting the front-end to the back-end API.

    II. Main Themes and Key Concepts

    • Setting up the Development Environment: The tutorial begins by emphasizing the necessary prerequisites for Angular development. This involves installing Node.js and Visual Studio Code. “For building the angular application you have to make sure that you have prerequisites installed on your system so first of all you’ll have to go to this particular website nodejs.org and download the execut ible file for installing nodejs on your system”. The Angular CLI (Command Line Interface) is installed globally using npm install -g @angular/cli.
    • Angular Project Creation and Structure: The tutorial demonstrates how to create a new Angular project using the ng new command, specifying the project name (e.g., ng new hoc-gadget-shop) and stylesheet format (CSS). The importance of the src folder and index.html file as the top-level HTML template is highlighted. “If you take a closer look over here you’ll see that SRC folder is there and this is the folder that you want to focus on right now we have index.html file so how you can understand is that this is the top tier file of HTML template whatever is rendered in the browser this it is being rendered at the top level from here”.
    • Component Creation: The tutorial explains the concept of components in Angular and how to generate new components using the ng generate component command. It demonstrates creating an “inventory” component within an “app-components” folder. “For generating the new inventory component what we’ll have have to do is we’ll go to the solution and stop the running process with control c as I told before we’ll give the command NG generate component app components slash inventory”
    • Routing: The routing module is discussed as a mechanism for navigating between different components in the application without full page reloads. The tutorial uses routerLink in the HTML templates and configures routes in app.routes.ts to associate paths with specific components.
    • Bootstrap Integration: The tutorial demonstrates how to integrate Bootstrap for styling the application. This involves installing Bootstrap using npm install bootstrap –save and including the Bootstrap CSS and JavaScript files in the angular.json file. The tutorial then uses Bootstrap components like navbar and form elements. “npm install bootstrap save by using this command I should be able to successfully integrate bootstrap in my application”.
    • Data Binding: The tutorial explains how to bind input fields to variables using two-way binding (ngModel) and how to display data on the UI. Two way data binding is used to access the input fields. “You might already be aware about two-way binding and that is what we are going to perform here for that so I’m just giving the data structure just giving it some default values we have product ID product name available quantity it could be zero and then we have reorder Point”
    • CRUD Operations: The tutorial covers the implementation of CRUD operations:
    • Create: Submitting a form to create new inventory items or customers and saving the data to the database.
    • Read: Fetching data from the database and displaying it in tables on the UI.
    • Update: Editing existing data and updating the database with the modified values.
    • Delete: Removing data from the database.
    • .NET Core API Development: The tutorial guides the creation of a .NET Core Web API to handle the back-end logic. It covers creating API controllers, defining models, connecting to a SQL Server database, and implementing stored procedures for data access.
    • Database Interaction: The tutorial covers saving the inventory data into the database table through a store procedure.
    • Front-End to Back-End Communication: The tutorial demonstrates how to connect the Angular front-end to the .NET Core API using HttpClient. It shows how to make HTTP POST, GET, PUT, and DELETE requests to interact with the API endpoints. The integration of HTTP client to post the data for the HTTP method post to the server. “In this we’ll use this HTTP client post the data and we have to pass the URL so we’ll have to define the URL over here as well”.
    • Asynchronous Operations: The tutorial utilizes RxJS observables and the subscribe method to handle asynchronous HTTP requests.
    • CORS Configuration: The tutorial addresses Cross-Origin Resource Sharing (CORS) issues by configuring the .NET Core API to allow requests from the Angular development server (localhost:4200).
    • NG Bootstrap: Demonstrates usage of NG Bootstrap to create Dialog boxes and other components for user input. Includes installing ng-bootstrap using NPM. “using NG bootstrap for creating a dialog box that would be displayed once the user clicks on delete button”.
    • Dialog Box/Modal Implementation: Implements using NG Bootstrap to create Modal Dialogs, for user confirmation on Delete operations or inputting data to Add/Edit records.
    • Disabling Form Fields: Provides examples of how to disable form input fields using the disabled attribute in the Angular HTML template.

    III. Important Facts and Code Snippets

    • Angular CLI Command: ng new <app-name> (to create a new Angular project).
    • Install Bootstrap: npm install bootstrap –save
    • Command to generate new Angular components: NG generate component app components slash inventory
    • Run Angular application: NG serve
    • Include Bootstrap CSS in angular.json: (Example path) “node_modules/bootstrap/dist/css/bootstrap.min.css”
    • Include Bootstrap JS in angular.json: (Example path) “node_modules/bootstrap/dist/js/bootstrap.bundle.min.js”
    • RouterLink Syntax: <a routerLink=”/inventory”>Inventory</a>
    • HTTP Post: this.http.post(API_URL, body, httpOptions).subscribe(…)
    • CORS Configuration in .NET Core: (Snippet from Program.cs)
    • builder.Services.AddCors(options => {
    • options.AddPolicy(MyAllowSpecificOrigins,
    • policy =>
    • {
    • policy.WithOrigins(“http://localhost:4200&#8221;)
    • .AllowAnyHeader()
    • .AllowAnyMethod();
    • });
    • });
    • Example SQL Insert Statement in .NET Core:SqlCommand cmd = new SqlCommand(“SP_saveInventoryData”, conn);
    • cmd.CommandType = CommandType.StoredProcedure;
    • cmd.Parameters.AddWithValue(“@productID”, requestDto.ProductID);
    • // … other parameters
    • cmd.ExecuteNonQuery();

    IV. Potential Gaps/Areas for Further Exploration

    • Error Handling: The tutorial provides basic console.log for error handling. A more robust error handling strategy, including displaying user-friendly error messages, could be explored.
    • Validation: Form validation is mentioned, but the tutorial does not dive deep into implementing specific validation rules. Client-side and server-side validation techniques could be explored.
    • Authentication/Authorization: The tutorial lacks any discussion of authentication or authorization. Implementing user authentication and role-based access control would enhance the security of the application.
    • Testing: The tutorial does not cover unit testing or end-to-end testing. Adding tests would improve the reliability and maintainability of the application.
    • State Management: For larger applications, a more sophisticated state management solution (e.g., NgRx, Akita) might be beneficial.
    • More Complex UI Elements: The tutorial uses basic Bootstrap components. Integrating more advanced UI libraries or custom components could be explored.

    V. Conclusion

    The transcript provides a comprehensive guide to building a full-stack web application using Angular 17 and .NET Core. It covers the fundamental concepts, tools, and techniques necessary to create a functional CRUD application. While there are potential areas for further exploration, the tutorial provides a solid foundation for developers looking to learn these technologies.

    Angular 17 and .NET Core Full Stack Guide

    FAQ on Building a Full Stack Application with Angular 17 and .NET Core

    • Question 1: What are the prerequisites for building an Angular 17 application?
    • Answer: Before building an Angular 17 application, you need to have Node.js installed on your system. You can download the installer from nodejs.org. Additionally, you need a code editor such as Visual Studio Code. The tutorial uses Visual Studio Code, and you can download the installer for your operating system from the Visual Studio Code website.
    • Question 2: How do I install Angular on my system?
    • Answer: Once you have Node.js and Visual Studio Code installed, you can install the Angular CLI (Command Line Interface) globally using the command npm install -g @angular/cli in your command prompt or terminal. The tutorial mentions using Angular 17.
    • Question 3: How do I create a new Angular application?
    • Answer: To create a new Angular application, navigate to the desired folder in your command prompt or terminal and use the command ng new <application-name>. Replace <application-name> with the desired name for your application (e.g., ng new HGadgetShop). During the creation process, you’ll be prompted to choose a stylesheet format (CSS is recommended), and whether to enable server-side rendering.
    • Question 4: What is the basic structure of an Angular application?
    • Answer: A newly generated Angular application has a specific structure. The src folder is where most of your application code resides. The index.html file is the top-level HTML file that is rendered in the browser, and it contains the <app-root> tag. The application component is the core component with its template (.html), TypeScript file (.ts), and CSS file. The app.component.html file initially renders the content you see in the browser.
    • Question 5: How do I run an Angular application?
    • Answer: To run an Angular application, navigate to the application’s directory in your command prompt or terminal and use the command ng serve. This command builds the application and starts a development server. It will provide a URL (usually localhost:4200) that you can open in your browser to view the application. The ng serve command also watches for changes in your code and automatically reloads the browser when changes are detected.
    • Question 6: How do I integrate Bootstrap into an Angular application?
    • Answer: To integrate Bootstrap, first stop the running Angular application with Ctrl+C. Then, install Bootstrap using the command npm install bootstrap –save. After the package is installed, you need to include the Bootstrap CSS and JavaScript files in the angular.json file. In the styles array, add the path to node_modules/bootstrap/dist/css/bootstrap.min.css. In the scripts array, add the path to node_modules/bootstrap/dist/js/bootstrap.bundle.min.js.
    • Question 7: What is routing in Angular and how does it work?
    • Answer: Routing in Angular allows you to navigate between different “pages” or components within your application without reloading the entire page. To implement routing, you need to use the <router-outlet> tag in your main template (e.g., app.component.html). This tag acts as a placeholder where the content of the routed components will be displayed. You define the routes in the app.routes.ts file, specifying the path and the corresponding component. You then use <a routerLink=”<path>”> in your templates to create links that navigate to the specified routes. Additionally, you need to import RouterModule in your app.component.ts file.
    • Question 8: How do I perform CRUD (Create, Read, Update, Delete) operations in a full-stack Angular and .NET Core application?
    • Answer: To perform CRUD operations, you’ll need to create corresponding APIs in your .NET Core backend (e.g., using HTTP POST for create, GET for read, PUT for update, and DELETE for delete). In Angular, you’ll use the HttpClient service to make HTTP requests to these APIs. For example, to create a new record, you’ll use HttpClient.post() to send data to the create API. To read data, you’ll use HttpClient.get() to fetch data from the read API. The responses from these APIs can then be used to update the UI. Stored procedures are generally created for these processes in SQL Server.

    Angular Routing: Navigation in Single-Page Applications

    Angular routing is a concept that allows navigation between different pages or components in an Angular application without reloading the page. Here’s a breakdown of how it works, according to the sources:

    • Purpose Routing enables traversal from one page to another while keeping the main template intact. It helps in displaying HTML structures provided in a particular component upon clicking a specific item, like navigating to an inventory component.
    • Key Components:
    • Router Outlet: In the main template (e.g., app.component.html), the <router-outlet> tag designates where the content of the navigated component should be displayed. After the nav bar, any HTML template can be displayed through this outlet.
    • Router Link: In the HTML template, routerLink is used to specify the path to navigate to when a link is clicked. Instead of href, routerLink is used, along with the path.
    • Route Configuration: The app.routes.ts file defines the paths and their corresponding components. It consists of an array where each object maps a path to a component.
    • Configuration Steps:
    1. Set up the main template: Ensure app.component.html is the main template. After the nav bar, include <router-outlet>.
    2. Define paths: In app.routes.ts, specify the path and the component to be loaded for that path. For example:
    3. // Example route configuration
    4. { path: ‘inventory’, component: InventoryComponent }
    5. Link to routes: In the HTML, use routerLink to point to the defined paths. For example, in the HTML structure, point the routerLink to the path defined in the routes file.
    6. Import Modules: Import RouterModule in app.component.ts. Also, import the specific component.
    • Benefits Angular routing offers the benefit of traversing from one page to another without reloading the page.

    .NET API Development with ASP.NET Core

    A .NET API, as described in the sources, involves creating a web API using ASP.NET Core to handle requests from an Angular front end and interact with a database. The process includes several key steps:

    • Project Setup Create an ASP.NET Core Web API project, potentially within the same directory as the Angular project. The source mentions using Visual Studio for this.
    • Controller Creation Add an API controller to handle incoming requests. The source uses an empty API controller template and names it InventoryController.
    • Function to Process Requests Define a function within the controller to accept and process requests from the Angular application. This function should:
    • Return an ActionResult.
    • Have a descriptive name, such as SaveInventoryData.
    • Use the [HttpPost] attribute to handle HTTP POST requests.
    • Include a return statement (e.g., return Ok(“inventory details saved successfully”)).
    • Database Connection Establish a SQL connection within the function to interact with the database. This involves:
    • Importing necessary libraries.
    • Defining a connection string.
    • Creating a SQL connection object.
    • Stored Procedure Execution Call a stored procedure to save or retrieve data. This involves:
    • Defining a SQL command object.
    • Specifying the command type as a stored procedure.
    • Setting the command text to the name of the stored procedure.
    • Opening and closing the connection.
    • Executing the command using ExecuteNonQuery for data manipulation or ExecuteReader for data retrieval.
    • Model Definition Create a model (class) to represent the data being passed between the Angular application and the API. This class should:
    • Reside in a “Models” folder.
    • Have properties that match the fields being sent from the front end.
    • Be used as a parameter in the API function to accept the incoming data.
    • Parameter Passing Pass the data from the model to the stored procedure. This involves:
    • Specifying the parameter name in the SQL command.
    • Providing the value from the model for each parameter.
    • CORS Configuration Configure Cross-Origin Resource Sharing (CORS) to allow requests from the Angular application, which typically runs on a different port. This involves:
    • Adding the AddCors service in Program.cs.
    • Defining a CORS policy that allows requests from the Angular application’s URL (e.g., http://localhost:4200).
    • Using the UseCors middleware before UseAuthorization in Program.cs.
    • Testing Test the API using tools like Swagger to ensure it’s working correctly. This involves:
    • Running the application and navigating to the Swagger endpoint.
    • Providing sample data and executing the API.
    • Verifying the response code and data.
    • Checking the database to confirm that the data has been saved or retrieved correctly.
    • Data Retrieval To retrieve data, a similar process is followed using HTTPGet and ExecuteReader. The data from the database is mapped to a Data Transfer Object (DTO) and serialized into JSON format for the response.
    • Data Updates and Deletion For updating and deleting data, HTTPPut and HTTPDelete methods are used, respectively, along with appropriate stored procedures and parameter passing.

    SQL Database Integration in Full-Stack Applications

    Based on the sources, here’s an overview of working with a SQL database in the context of building a full-stack application:

    • Database Choice: The tutorial uses SQL Server as the relational database management system.
    • Database Creation: A new database (e.g., GadgetShopDB) is created to store the application’s data.
    • Table Creation: Tables are created within the database to hold specific data entities. For example, an InventoryTable is created with columns like ProductID, ProductName, AvailableQuantity, and ReorderPoint. It is also mentioned to create CustomerDetails table.
    • Data Types: Appropriate data types are assigned to each column based on the type of data they will store (e.g., INT, VARCHAR, DATE).
    • Primary Key: A primary key is defined for each table, usually with an identity (auto-incrementing) property to ensure unique and non-null values.
    • Stored Procedures: Stored procedures are created to perform specific database operations.
    • Purpose: Stored procedures encapsulate SQL queries and provide a more secure and efficient way to interact with the database.
    • Naming Convention: A naming convention (e.g., SP_SaveInventoryData) can be followed to define stored procedure names.
    • Parameters: Stored procedures accept parameters as inputs, which are used in the SQL queries within the procedure.
    • Types: Different stored procedures are created for different operations such as:
    • Saving data (e.g., SP_SaveInventoryData)
    • Getting data (e.g., SP_GetInventoryData)
    • Updating data (e.g., SP_UpdateInventoryData)
    • Deleting data (e.g., SP_DeleteInventoryDetails)
    • Refresh: It might be necessary to refresh the database after creating a table for the objects to be valid.
    • SQL Queries: SQL queries are used within stored procedures to perform the actual database operations.
    • INSERT: Inserts new records into a table.
    • SELECT: Retrieves data from a table.
    • UPDATE: Modifies existing records in a table.
    • DELETE: Removes records from a table.
    • WHERE Clause: Used to filter records based on specific conditions.
    • Data Retrieval: When retrieving data, the data types from the database might need to be cast into appropriate types for use in the application.
    • Integration with .NET API: The .NET API interacts with the SQL database by calling stored procedures and passing parameters.
    • Connection String: A connection string is used to establish a connection to the database.
    • SQL Connection: The .NET code uses SQL connection objects to connect to the database and execute commands.
    • Data Transfer Objects (DTOs): DTOs are used to transfer data between the API and the database.
    • Key Considerations:
    • Security: Using stored procedures helps prevent SQL injection attacks and improves database security.
    • Performance: Stored procedures can improve performance by reducing network traffic and pre-compiling SQL queries.
    • Data Integrity: Constraints and data types enforced at the database level help ensure data integrity.

    Data Binding with ngModel Directive

    Based on the provided source, data binding is a technique used to link input fields in an HTML template to variables in a component’s TypeScript (TS) file. Two-way binding, in particular, allows changes in the input fields to update the corresponding variables in the TS file, and vice versa.

    Here’s how data binding is implemented and used, according to the sources:

    • Two-Way Binding Implementation Implement two-way binding by binding input fields to variables that are accessed on the component’s .ts file.
    • Variables: Create variables in the component’s .ts file to hold the data for the input fields. These variables can be part of a data structure or a model.
    • ngModel Directive: Use the ngModel directive in the HTML template to bind the input fields to the variables in the .ts file.
    • Name Attribute: It is also useful to give the input field a name attribute.
    • For example:
    • <input type=”text” [(ngModel)]=”inventoryData.productID” name=”productID”>
    • In this example, the input field is bound to the productID property of the inventoryData object in the component’s .ts file. Any changes made in the input field will automatically update the inventoryData.productID property, and any changes to inventoryData.productID in the .ts file will be reflected in the input field.
    • Displaying Bound Data: To display the data that is bound to the input fields, you can use string interpolation or other data binding techniques in the HTML template. For example:
    • <p>Product ID: {{ inventoryData.productID }}</p>
    • This will display the value of the productID property in the HTML. The stringify function converts the JavaScript value to a JSON string.
    • Considerations
    • For the data binding to work, the FormsModule must be imported into the component.
    • When binding to properties from the back end with different naming conventions (e.g., camel case vs. capital letters), ensure the property names match exactly in the HTML template to avoid binding issues.
    • Benefits
    • Data binding simplifies the process of synchronizing data between the UI and the application logic.
    • Two-way binding makes it easy to capture user input and update the UI in real-time.

    Angular, .NET, and SQL: Implementing CRUD Operations

    CRUD operations refer to the four basic functions of persistent storage: Create, Read, Update, and Delete. The sources describe the implementation of these operations in the context of building a full-stack Angular and .NET Core application.

    General Workflow

    1. Front-End (Angular):
    • The user interacts with the UI (e.g., filling out a form, clicking a button).
    • Data is bound to the UI elements using two-way data binding (ngModel).
    • An HTTP request is sent to the back-end API.
    1. Back-End (.NET API):
    • The API receives the request and processes it.
    • The API interacts with the SQL database.
    • A stored procedure is executed to perform the requested operation.
    • The API sends a response back to the front end.
    1. Database (SQL Server):
    • The database receives the request from the API.
    • The appropriate CRUD operation is performed on the data.
    • The database returns a result to the API.

    Operation Details

    • Create (Save)Angular: A form is used to collect user input. On form submission, the data is sent to the .NET API via an HTTP POST request.
    • .NET API: The API receives the data, creates a SQL connection, and executes a stored procedure (e.g., SP_SaveInventoryData, SP_SaveCustomerDetails) to insert the data into the database. A model is used to map the data to the stored procedure parameters.
    • SQL Database: The stored procedure inserts a new row into the specified table.
    • Once the data is saved, a success message may be displayed on the UI.
    • Read (Get)Angular: An HTTP GET request is sent to the .NET API to retrieve data. This is often done on component initialization (ngOnInit).
    • .NET API: The API receives the request, connects to the database, and executes a stored procedure (e.g., SP_GetInventoryData, SP_GetCustomerDetails) to retrieve the data. The data is mapped to a Data Transfer Object (DTO) and serialized into JSON format.
    • SQL Database: The stored procedure selects data from the specified table.
    • Angular: The JSON response is received and bound to the UI, displaying the data in a table or other format.
    • Update (Edit)Angular: A row is selected for editing, and its data is pre-populated in a form. An HTTP PUT request is sent to the .NET API with the updated data.
    • .NET API: The API receives the data, connects to the database, and executes a stored procedure (e.g., SP_UpdateInventoryData, SP_UpdateCustomerDetails) to update the data in the database. The stored procedure uses a WHERE clause to identify the record to update (e.g., based on ProductID or CustomerID).
    • SQL Database: The stored procedure updates the specified columns in the table for the matching record.
    • After a successful update, the table is refreshed to show the modified data.
    • DeleteAngular: A row is selected for deletion, and a confirmation dialog is displayed. Upon confirmation, an HTTP DELETE request is sent to the .NET API, including the ID of the record to be deleted.
    • .NET API: The API receives the request, connects to the database, and executes a stored procedure (e.g., SP_DeleteInventoryDetails, SP_DeleteCustomerDetails) to delete the data from the database. The stored procedure uses a WHERE clause to identify the record to delete.
    • SQL Database: The stored procedure deletes the specified record from the table.
    • After successful deletion, the table is refreshed to remove the deleted row.

    Additional Considerations

    • Stored Procedures: Using stored procedures is crucial for security, performance, and data integrity. They help prevent SQL injection attacks, improve performance by reducing network traffic, and enforce data constraints.
    • Real-Time Updates: After performing a CRUD operation, the UI is often refreshed to reflect the changes in real-time. This can be achieved by calling the “Read” operation after a “Create”, “Update”, or “Delete” operation.
    • User Experience: Displaying confirmation dialogs before deleting records and providing feedback messages (e.g., using alert boxes) enhances the user experience.
    • Data Validation: Validate data on both the front-end (Angular) and the back-end (.NET API) to ensure data integrity.
    • Error Handling: Implement proper error handling to catch and handle exceptions that may occur during the CRUD operations.
    • Asynchronous Operations: Use asynchronous operations (e.g., async/await) to prevent blocking the UI thread while waiting for the API to respond.

    By implementing these CRUD operations, the application enables users to manage data effectively through a user-friendly interface.

    Complete FULL STACK PROJECT | Angular | .Net Core | SQL

    The Original Text

    hi friends welcome back to our channel in this video I’m going to show you how to start building a full stack application for the front end we’re going to use angular 17 and for the back end it will be net code now first of all for building the angular application you have to make sure that you have prerequisites installed on your system so first of all you’ll have to go to this particular website nodejs.org and download the execut ible file for installing nodejs on your system so once you have it on your [Music] system you’ll open this file and as I already have node.js install this is the particular message that I’m getting but you’ll not get it you if you don’t have it already installed on your system you’ll have the setup completed and after the installation we’ll move on to the next prerequisite you’ll go to this particular website Visual Studio code and download for your particular OS the installer for visual studio code once you have this particular installation completed we are going to install angular on the system and how we do that we go to command prompt and give this particular command I press enter and the installation is in progress npm install Hy at angular CLI so this will make sure that the latest version of angular is installed on your system in this particular video when you are seeing it angular 17 is the version that we are using now this says is that 225 packages have been changed in 18 seconds so if you do not already have angular installed on your system it could have said the packages are added instead of changed once this is done what you can do is I already have a folder created over here in my system and in this particular folder I’m going to create the application that I require for my gadget shop and I’ll be giv giving it the name with this particular command NG new H gadget shop this is the application name that I am giving I press enter now what’s being asked is which style sheet format do I want to use and I want to use CSS so yeah basics of HTML and CSS You’ always want to know before beginning any angular project do I want to enable server side rering and static side generation no I do not want that so I press no the installation of the packages is in progress that means my application is being created great so I have got package installed successfully message over here that means the application generation has been completed and how I can make sure is that this is the folder that is created for my new application H gadget shop and what I’ll do is I’ll just change the directory over here that means that I have opened the command prompt inside that directory now I can give the command code dot this is the command that we use to open the visual studio code in from this particular application through command prompt now Visual Studio code should open and the application will be opened automatically in this so over here we have it the entire structure is ready for a newly generated application if you take a closer look over here you’ll see that SRC folder is there and this is the folder that you want to focus on right now we have index.html file so how you can understand is that this is the top tier file of HTML template whatever is rendered in the browser this it is being rendered at the top level from here and inside the body tag we have app hyphen root so this contains all of the HTML information that will be shown on the screen how do I make sure that what I am saying is correct I can show you over here by running the application so if I just open the terminal over here this is also open the power shell terminal we can see over here it says Powershell terminal so I’ll close this one and we can start working on this particular terminal which is inside the visual studio code it’s kind of easier to access I’ll run the application what I am doing is running the application through this particular command NG serve it is going to build the application first make sure that there are are no syntactical errors and then it’s going to give me a URL this is the Local Host URL that I have to open control and click the URL is opened Local Host colon 4200 and this is the entire information that is being rendered through index.html file but I see over here that I don’t have any tag related to what is being shown on the screen so how do I make sure that this is getting R rendered through app hyphen route through this particular app folder this is the component folder and this is the HTML structure related to it so if you’re already aware about the basics of angular it’s pretty easy for you but for the beginners who are going to learn angular this is the part where they can focus on and we see over here that this is the content that has to be replaced so whatever we are seeing on the screen is being rendered through tags from here from this particular app component and this is the TS file related to it so whatever typescript code we’ll be writing we’ll be writing over here in this file and whatever HTML tags we want to give whatever HTML template we need to provide to the application we’ll do it from here and the top tier file is index.html so I hope you have like understood the basic structure of the angular application and now to make sure that uh this is the correct file that we are referring to over here I’ll make a change I just type over here hello we already saw that in the browser we were seeing this your app is running I have written hello over here and saved it so after I saved it it says that page reload sent to client so this is a benefit of using NG serve command that it will automatically transfer whatever information you have changed whatever file you have changed to the browser you don’t have to reload the browser or rerun the application again and again after making your changes I’ll just open the browser again and over here we can see the changes so that has made sure that whatever information we are seeing over here it is being rendered through app. component right now but we want to make changes to this particular HTML template we don’t want it for our hoc gadget shop we’ll be using some bootstrap to enhance the look of the page so we’ll see how we are going to do that so first of all we’ll have to install bootstrap in angular application and how we’ll do that I press control+ C that will end the session that is running right now and now we have to type the command npm install bootstrap save by using this command I should be able to successfully integrate bootstrap in my application see this is the node modules folder and if I I expand it you’ll see that there is no folder named bootstrap I have to install it in the application to use it so that is why I have to run this command I press enter okay after running the query it says that bootstrap is integrated successfully into the application over here we can see that we have the folder now bootstrap in nodecore modules folder and we have to include the Javascript file and the CSS file of the bootstrap into the application how will we do that this is the angular.js file and over here if you scroll down you have online number 29 for me Styles mentioned and this is taking the styles from this particular file currently this is styles. CSS in the source folder so over here we have to mention the Styles as well as scripts and what will be the scripts it will include the JS file from the bootstrap folder this is the JS file that we want to include over here we’ll take the relative path nodecore modules bootstrap then we have this folder jsst strap. bundle. min.js so we have mentioned the JS file in the scripts so this is kind of global setting that we are making in the application and we’ll also mention the CSS file this is not JS it will be CSS strap do men. CSS in the CSS folder you can see this file over here so I have included in angular.js and now what we’ll do is we’ll make some changes in app. component. HTML we want to remove everything that is currently existing and I’ll just type this keyword hello over here to make sure that new changes are getting reflected I’ll do an NG serve to run the application again okay great so the application is running now and we see that all of the content that we were seeing earlier on the browser we’re not seeing now we are only seeing hello keyword that we have typed in app. component. HTML so what I want to do is I already have some HTML template for the landing page first of all what we’ll do we’ll add the header for our landing page so the template that I already have for the header I have referenced it from bootstrap website only so this is the one that we’ll be using and I’ll make the changes I’ll save it it says page reload send to C great I don’t have to reun the application again and again and you see over here that the new nav bar is coming this is the header that we want to have in our application what we can do is make some changes on this this is hoc gadget shop so I have replaced that nav bar with hoc gadget shop we’ll keep home as it is and then we could have admin over here this could be inventory and this could be customers I’ll just save it and we can check it also yes these are getting reflected inventory customers so you see this all of the changes are getting real time updated on our application whenever we are changing it and what I want to do is I can remove link and disabled as of now from the HTML template because right now we don’t need those I have kept the drop- down option available this is to make sure that you also understand how we use dropdowns in the Navar and saving this so I come over here we have inventory and customers so these are the options that we are primarily going to change so I hope you have all understood how we have integrated bootstrap successfully into the application and utilize the CSS over here for our landing page now what we’ll do is We’ll add a component for inventory so for generating the new inventory component what we’ll have have to do is we’ll go to the solution and stop the running process with control c as I told before we’ll give the command NG generate component app components slash inventory so why I have given Here app component SL inventory because what I want the command to do is create a new folder over here because I want to keep the newly created components in a different folder so here you can see that app components is generated through this command NG generate component app component / inventory and if you open this folder inventory is the new component over here we can see that it is created now we’ll start working in HTML file of the inventory component now in this inventory. component. HTML file we’ll be giving the HTML structure of the inventory component and how do we travel to this component because we know that currently app. component is working the HTML structure is showing whatever we have given over there but what I want to do is that on this particular item click the drop down that we have on the browser we want to go to this particular component inventory component right so how do we travel to this page and for that what we’ll be doing is we’ll be using routing so this is a very important concept for you to learn if you are not aware about routing concept already so please Focus here for the routing to work over here what we have to do is make this app. component. HT HTML like the main template of our solution so you have to understand that is app. component is like the main page which will be shown on all of the pages it will be uniform throughout the pages in the application and after our Navar we are going to write router hyphen Outlet so what we want the solution to do is whenever we are changing the pages after the nav bar whatever we are giving whatever HTML template we want to give it should be displayed through this particular router what I mean to say is this is the nav bar and we have multiple options we have inventory we have customers and then we have home so if I click on any of these whatever template I want to show it should be displayed through this router outlet and the router Outlet will be displaying whatever HTML structure I am providing in the particular component that is inventory component over here because this is the one that we are focusing on right now so what we want to do is when we click on this particular item it should show whatever content is being mentioned in this file in this inventory. component. HTML now for that what we have to do is we can remove the href from here we’ll make mention router link and then we have to give the path so over here I have mentioned the path but now what I have to do is Define this particular path and how do I do that we have to open ab. routes. TS so in the routes array we’ll be giving the path mention the path name this is the path that we gave in the HTML structure and then mention the component so we are going to use inventory component so the intellisense is working and that is why I am going to automatically use it and this has automatically imported it because the visual studio intelligence is working over here if it is not working for you then you have to import it manually through the given particular file structure that you have and then use it over here so now I’m saving it and then I am saving this particular file also app. component. HTML I have given the router link over here and I have mentioned router Outlet in this particular file only so what it should display is it should display whatever is mentioned in this particular file so let’s check if it is working or not we have have to run the solution for that okay so the solution is running but before we go to the browser through this particular URL what we have to do is we also have to include the component the inventory component and the router module in app. component.ts file so we’ll open that and over here we’ll write router modules that we are importing from angular / router and import it over here also and then we are also importing inventory component so the intellisense works and the import is all already mentioned here automatically if it is not working for you you can mention it manually also as I have said before I’ll just save this after saving we going to this particular URL opened I go to inventory great so the page says inventory works that was already mentioned in the HTML template of inventory component and we have come to this particular part that we gave in the routes file this is happening after we are clicking over here on the inventory option so I hope all of you have understood how routing is working in angular through routing we can go to any particular page we are not reloading the page as it’s the benefit of using angular and we are traversing from one page to another keeping our main template intact because you see over here that we have the nav bar and we are keeping our main template intact and still traversing from one page to another the main template is mentioned in app. component. HTML so after this what we can do is we can give the correct HTML template over here that we want want to have on this particular page so I’ll just paste that particular HTML template over here remove this inventory works and I’ll be saving this HTML file go to the browser on the link so this is the basic HTML template that I have used because um the whole project series is regarding angular and then at the back end we using net core and SQL for the apis we don’t want to focus on bootstrap as much but I do want all of you to understand how it works and how you can use the bootstrap integrated into your angular application you can use this HTML template if you’re building a basic project and even if you want to enhance the project you can use the advanced learnings of some CSS so over here we have the submit form for the inventory details that we want to capture and you see over here that I have already mentioned some static data in the HTML template in the inventory details table we are going to populate this particular data dynamically I’m going to do it with you through the series and all of this data will be shown dynamically and not directly from the static HTML template so that we are going to do but firstly what we are going to see is how to add a new row how to submit this particular form for the inventory details and add this Row in our table that is the first operation of the cred operations is to create create a row in the table so this is what we’ll be seeing now because if I am just choosing over here I’m mentioning something and this is the product ID that I have or I could use any particular product from the dropdown I want to save it so if I click on it currently nothing is going to happen that we have to build the functionality we have to build along the way and also what I want to do is add a row for this particular form where I’m mentioning the details of the text box also because currently we are seeing the text box but we are not seeing what it stands for so that is one thing that I’m going to add in the HTML template and then start with the create operation for this form okay so let me just go to inventory. component. HTML file and over here I’ll add the code for a row which will just describe the fields that we have on the form and I’ll save it and come back to the browser over here we are seeing the labels also for the fields and now what I want is an action being performed when I click on this submit button after filling some values so for that we have to consider this form and take all of this data and submit the form once the data is filled for that what we’ll do is I’ll have a function created on the TS file okay so here is the TS file related to this component now what I am saying is on submit this should be a function return type is void I don’t want anything to be returned and I just want to alert form submitted successfully and now how will the form know that this function is to be called when I am clicking on the button from the HTML file that link has to be done right so for that what we’ll do is just have an NG submit attribute and call the function so this is the function and currently we are not validating any field so I’ll just add a no validate attribute also saving it one more thing that we have to do is add an import of the form module so what we are saying is we are asking the this particular comp component to import the forms module and perform the submit action we are having it in Imports saving the file going to the browser now and now I click on submit so just an alert should come and here it is it says form submitted successfully that is the message that we had given over here if you see form submitted successfully right so So currently we are not showing any data which was entered in the fields we are not just considering any data that was entered in the fields I just wanted you to show how the form submission would work and now step by step we’ll go we’ll take the fields also into consideration so after that what we are doing okay so now for that what I’m going to do is bind this input field that we have not just one but all of the input fields to the variables that we’ll access on the component.ts file so you might already be aware about two-way binding and that is what we are going to perform here for that so I’m just giving the data structure just giving it some default values we have product ID product name available quantity it could be zero and then we have reorder Point okay so the values with colons instead of equal to okay so saving it and I want to take these variables for the two-way binding so this is the first input field that we have and I want to provide the model for it inventory data dot product ID and also give the name that is product ID I think this should suffice the next one we have is product name just confirming the name from the DS file yes it’s product name so using the third variable here available quantity and then there is the last one that is reorder point so just I’ll copy the name from here and use it okay so saving it now what I want is I just want to show this data also okay what I’m saying is that this is a Json right all of the data would be available in Json format for that I just want to use the stringify function and pass the in inventory data in it saving it so we’ll go to the browser over here what I’m doing is giving some random values I click on submit and you see that the alert box is successfully showing all of the fields that are present with their correct values in the Json format so this part is successfully achieved after this we’ll move on to the backend code for the API and create a link to submit the form and send it to the web API request okay so for that I have opened visual studio and we are going to select asp.net code web API clicking on next over here and what I am doing is in this particular location where we had created our angular project I’m going to create the web API project as well I want to give it a name so it could be it you see gadget shop API next and now what I want to do is just keep the selected options as such and click on create so it’s created the project for me and opened the solution over here we see the files also that are created under the controller folder this is the default controllers file that is coming what we are going to do we are going to add our controller file and that is going to be an API controller so I’m right clicking on the controllers folder click on ADD and add a controller over here so from the template we are going to select the API and we are going to select empty API controller over here I click on ADD and now I should be giving the name of the controller as well so over here it would be inventory controller clicking on ADD so here I have the f created and what we want to do is add a function over here what that function will do it is going to be an function which will accept the request from the angular project so so from the front end the request will come with the inventory details and this particular function will process it so it should be returning the action result it’s going to be index or let’s have it save inventory data that could be the name of the function and this is going to be an HTTP post request so I’ll give the attribute as such and let me just add a return statement otherwise the syntax tax error would keep on coming over here it’s going to return okay inventory details saved successfully so the basic purpose of this particular function is to process the web request that is coming from the angular application now for that we’ll have to create a SQL Connection in this function because the meth method is going to save the inventory data into the database table through a store procedure for that we’ll be creating a SQL connection over here we are getting a syntax error I’ll just import the required libraries it’s going to install the new package automatically Al and now in the SQL connection we can also mention the connection string here only while initializing so I’m giving the connection string over here and I already have the value I can give it over here okay so after this what we want to do is just log to our DB why I’m doing that before is because I want to be ready with my table and St procedure before I make a call from the net to the database now over here we have our databases and gadget shop database is the one that we are going to use for our application let’s create a new table in this database I’m just opening a new query and we’ll give the command create table it could be inventory table with all the fields that we are sending from the front end product ID giving it integer data type then we can have product name and it could obviously be a v care the reason is that we’ll be passing some string value from the front end although we are passing it as a drop down index but yes we should be saving it as a string only because the name Will justify the data type over here and the reorder point would be int again and we also had available quantity okay so these are going to be the fields and we can also have an index kind of field which will be identity integer of course and it could be a primary key so that it is never null and always having a unique value we’ll create the table and now we can also create a stored procedure what we want to do is we want to save the data and we can give it exact name that we have over here for the functionality Spore save inventory data so this is the kind of nomenclature that I follow to define a stored procedure and what parameters it will take is it’s going to take these parameters and we know that when we are passing a parameter or it is a variable we are defining a variable in the store procedure we’ll be giving it at theate prefix and then giving the name so this is the parameter that we are using basically four parameters these are the parameters that we are using and what we want to do is just take the parameters and save it in the table going to give the column names that we are saving into so we have written a insert statement mention the column names and then we’ll give the values that we are inserting what are the values over here we have these parameters so it’s going to insert a single Row in the table because we are not inserting multiple rows at the same time we’re just passing single rows and entering over here in the table and I think I have to add a parenthesis yes so it should work fine so you might be seeing that there is a syntax error that it it is giving it says that invalid object name the reason is because currently the database is not refreshed I have just created the table and then open the window for the SQL Editor to create a stored procedure so the database is not refreshed as such if I open it again it would work fine if I make a connection to the DB server again but uh I’ll just execute this particular store procedure if it says successfully completed or executed the command it’s working all fine and there is no error in the store procedure otherwise we’ll see if you’re getting an error so I’ll just execute it okay so command completed successfully that means the store procedure is created successfully and all is working fine there is no error as such so you could also face this issue that you have already created the table but it’s still saying the object is invalid in the DB but not to worry it might take some time it doesn’t take some time to refresh you have to make the connection again and then it works properly fine if the next time you’re opening the SQL Server management Studio again it will not show any error as such okay so let me just go to the net code and over here we have already defined the connection string now the next step is to define the SQL command we’ve already mentioned the SQL connection now we’re going to give the SQL command and how we are going to do it we have have to mention the command text it’s going to be the store procedure name then we have to give the command type command type dot store procedure and give the SQL connection as well connection here and then take the variable that we have already defined now for the command text we’ll have to give the stor procedure name exact store procedure name that we have over here and mention it in the string so now this is completed after this what we’ll be doing is opening the connection so let me just open the connection let me execute the command now it’s going to be an execute non-query because we are not performing any retrieval from the database right now we are just inserting the data and we also have to make sure that we are closing the connection because that is very important it’s connection do close now this is all fine we have mentioned the command text we have opened the connection and we have executed our store procedure and we have closed the connection but the main task was to pass the request to the database now for taking the request we’ll have to create a model that is passed to this function from the front end like we had created a data structure in the Json format on the angular application the same way we’ll have to define a class in this application also that will accept the request through this function so let me just add a folder in the solution and we’ll give it the name models over here I can add a class it is going to be inventory okay it just got loaded inventory request D2 so this is what we are giving the name to our model now we have this class and we can give the properties over here what parameters will be passed through this class first is going to be product ID second is going to be product name so it’s the benefit of having intelligence because it’s giving you suggestions as well now we don’t have product type but we have available quantity so that is the name that we are giving and then we have reorder Point okay so let me just mention this last property and now we can use this class I’m saving it we can do a save all and use this class in the request okay so for this also we have to import this library now we have to pass it to the SP as well so let me just add it to the parameters of the SP now here in this function we have to mention the name of the parameter and then give the value that we are trying to pass so first is the product ID this is the value that we are trying to pass to this parameter and then we have three other parameters as well product name available quantity and reorder point so the reorder point was this yes just confirming that the names are matching exactly with our store procedure because if they don’t match will’ll get an error while executing the function so let me just save all of it now we’ll just run the application to check if the web API is working fine I’ll just close this dialogue box because currently we’re not setting up slsl certificate we just want it to run on the local okay so the application is running now and over here we see the web API that we have created this was the default that was given by the net code and now we have this function as well this is a post method and over here it’s taking these parameters we can try it out also what I’ll do is I’ll just give some random values over here and and give values for all the parameters and click on execute 200 is the success Response Code and that is what we are getting the body has the custom message that we had given in the function so it’s all working absolutely fine by executing it we can see that but how can we make sure that it is working absolutely fine we have to go to this particular table and check if the data that we had passed from the request is it saved or not in the table because that is the whole motive over here to save the data into this particular table through the store procedure by making the connection from net core I on execute and over here we see one row is successfully inserted into the table so we have made the connection from the net code to the database now the next step is to make the connection from the angular application to the net code web API now in the angular code in inventory. component.ts where we are submitting the request we have to pose the data to the net code web API for that what we’ll do is just import HTTP client and we can have an HTTP client injection in this class now this we’ll be using to post the data for that what are the requirements ments to post the data we want to do it on the submission correct so here on submit function in this we’ll use this HTTP client post the data and we have to pass the URL so we’ll have to define the URL over here as well it’s going to be the API URL let me just Define it in the function itself for now and we’ll give it the value the value that we’ll be taking from and paste it in Visual Studio code okay so we have given the value now yeah it’s going to be let API URL then we have to mention the body correct so for the body we have to pass the inventory data so after passing the body of the request this is not mandatory but we can give the HTTP options as well so if you have some specific header values you can include it here okay let me just Define the HTTP options close this let HTTP options so let me give the headers here and and it’s going to be new HTTP headers and then we can give the UN content type as well value could be application SL Json because this is what we are going to pass I’ll save it and over here what we are going to do is once we have the post method ready we have to subscribe to it this is how it works we’re going to subscribe to this post method because this is not going to execute simultaneously as we are hitting on submit function we don’t want to wait for it to execute this is an asyn call that we are making and in the Subscribe we give the actions that we want to perform what should happen if there is an error the main task is to Define what should happen once it is completed so once it is completed we want to give the function here and this alert should only happen once the post request is completed so we’ll move it here now we have defined the post call in our angular code let me just save it and we have to make a change in the app.config as well over here we have to provide HTTP client this function we are defining in the providers and saving so what I’m going to do is just put a debugger over here okay to check if the call is being made to the backend API or not what request is coming but uh before that there is one more change that we’ll have to make if you focus over here on the URL you’ll see that this is Local Host colon 7019 is the port that we are using and in the angular application that is running it is 4200 so we’ll have to make changes for this net core web API to handle the course request now for that I’ll just stop the execution once and open the program.cs file to make the change as we see over here we already have some methods being called for the application so we also have to make the changes for different servers request that are being passed to this web API so I’ll begin making the changes Define a variable and give it a value underscore same name I’m taking over here for the text value and then we have the Builder right various functions of services are getting called and over here only we’ll have to call the add course function also so I’ll make the changes for that options do art policy give the name that will be the variable that we have just created and then for the Builder we have Builder with Origins okay so over here we are going to give the URL of the Local Host that we have so I’ll give the Local Host 4200 we had okay just switching on my numlock and then we can have I think one without the server name also this way we have defined we want to allow any header we want to allow any method and set is origin allowed some domains so after this one more thing we have to do before authorization we have to call another function that is use course and over here also we’ll be passing the variable that we have created now I’ll just save this over here we had the syntax error after this what we’ll do is we’ll run the application okay but one more thing as of now we don’t want to return any message from here we are just returning the okay status so I’ll run the solution now why I have removed the message I’ll be picking it up later in the lecture that we will be sending a Json rather than a string value from here so that is one thing that I’ll be explaining to you but as of now let’s just try to save the inventory details I’ll go to the application once go to the inventory page now I’m putting some random values okay I will select mobiles from here that is another product rather than airphones because that is the one that we had already entered now I click on submit what it should do is exactly it should come over here on the debugger because now you see that we have made the connection from the front end to the net application to the net core web API and when we are clicking on submit on the angular application it is pointing to this debugger now the flow is created and now I click on continue so you see we have got the alert that this particular form has been submitted successfully that means that once the post post call is completed that we had subscribed to the alert is showing this is what we were trying to do and it is successfully achieved so I click on okay how to confirm that our data is getting saved successfully we’ll need to go to the database and over here I’ll just execute it okay so the select statement is executed and we see over here that the data is successfully saved and over here for the product name you see that we are passing the index from the dropdown so that is what is getting saved but the row is successfully created from the application so we are able to achieve the save flow from the angular to the net core web API into the database after this what we are going to do is we’ll be getting the data from the database on our angular application because what you see over here in the table this is some static data correct this is not the data that we have saved in the table so we need to bring the data from the database to the application on the front end in angular so that is the get flow that is what we are going to achieve now but now what we’ll be doing is we’ll be creating the flow from the database to the angular to get the data that is in the inventory table to this table on the screen so let’s go to the database first over here we see that this is the table that we are trying to fetch the details for let me just create a procedure and the name will be SP get inventory data so after this in this sto procedures we simply have to add this select query because we are only trying to get the data from this table and there is no other query that is required over here I’ll click on execute it says commands completed successfully that the SP is now successfully created in this database we can also check it by going onto store procedures we have another SP over here that is SP Spore get inventory data now we’ll utilize it in the net code so let’s go to the visual studio and we can just take this code and create another API that is going to be a get API earlier one was HTTP post and this is HTTP get now what we are trying to do is get inventory data and we don’t want any parameters because we’ll be selecting the data from the table without any filter also so let me just zoom it a bit and after this we’ll also have to change the name of the SP we’ll take the name over here and use it on this command text we can remove all of this code because we are not trying to pass any parameter to the store procedure now what we are trying to do is we are trying to run the command that is going to be execute Reader Command and what we can do is we could have a SQL data reader give it a name and using this SQL data reader we will be creating a object so basically what we want to do is create a list of inventory dto from this SQL data reader and return it as as a result of this action so let me create another model because to avoid any confusion in the name I am creating another model even though the same properties would be there in the new model as well that were there in inventory request dto so the name can be inventory dto I’m saving it take the properties from inventory request Dil only and just have it in this So to avoid the confusion we have created a separate model because if we want to add some properties in the class in one of the classes we could do it in future without modifying another class so let me save this and use it over here we are trying to create a list of inventory D and when we are traversing through this particular loop I want to create a object as well that will be added to this list let let me just give it the name response and this would be added over here so what we are trying to do is inventory D do product ID is equal to convert dot to reader that is SQL data reader and the name of the column would be from here so if we just run this query we see over here that product ID is returned and product name available quantity reorder point so what we want to do is give the name of this column in our code because that is what this code is going to read the the whole table would be red in the code and we want to just take the name of particular column in single line so right now I’m binding the product ID so I will give it the name for each of the columns we have different name so I’ll give a separate name over here product name then over here this would be two string because product name is a string variable if you see over here the data type is string then we have available quantity and then we have reorder Point let me just match it reorder point and available quantity so yes you have to make sure that the names of the columns that you are giving through the reader they have to be the exact names that are there in the SQL because otherwise the data would not be mapped from the SQL data table to your object otherwise it would create an issue but if you give the exact name then it’s not going to be an issue and the code is going to work perfectly fine so over here you see that intelligence is giving me the suggestion as well that we want to add the dto into this list so we’ll just take the suggestion and we have successfully added our D to the response and now what we want to do is we simply want to use a Json convert serialize object and what we want to serialize is the response so it will send send the response that is the list of inventory dto as a Json now and let me just save it do a save all we’ll run the code again we can build it also once we’re trying to rebuild the solution so that there is no error in the code that could be checked from here if the rebuild is completed successfully it says one succeeded because we have only one project in the solution so it means that our code is going to work fine syntactically logically it’s going to work fine or not we will be able to know once we execute it so let me now just execute the solution and the API the get API that we added we are seeing over here on the screen as well it’s added over here and to verify if the db2 net core web API all that connection is working fine or not we just do a try it out from here and execute the API it’s not going to take any parameters so you see that parameters is also mentioned over here that we are not taking any parameters and now we see the response body this is a proper Json that we are getting we have two products one was the product name earphones and then second one was the drop down index that was added from the front end code from the angular application both of those records that were there in the table we see over here those are coming on the screen successfully over here in the response body so this connection is successfully established now we just need to add the code in the angular to get it on the front end application so we’ll go to the visual studio code and in this particular component inventory. component.ts what we have to do is whenever the component is initialized on that point only we are trying to fetch the details so over here we have to add a new function that is going to be NG on in it once the function is getting initialized what we want to do is we want to get some data right from the back end so we already have the URL of inventory API we can just make sure that the get API also has the same request URL so over here we see that the request URL Remains the Same if we are not not passing any parameters it would be a get call so let’s make the changes for get call using this HTTP client that we had used earlier and this is going to be a get call we don’t need to pass any headers or the body we just have to mention the URL and over here we’ll only need to have the response of this get method so what we can do is just have the data and create a function around it this data is going to be the response of this get method let me just add a new object that is going to be inventory details of type any now whatever is being returned from the API from the get API I want to just map it to this new object that I have created over here once this is done what I want to do is utilize it on the HTML page but before that let me just do one thing I’ll do a console log of whatever is being returned from the API on the web angular application let me just save the details so let’s go to the browser and just open the console window we’ll do a refresh of the page and now we see over here that we are getting the response from the database on the web application as well so whatever is being passed from the get method on the web API that we have created over here we are successfully getting it on the front end as well so that connection is successfully established now the main task is to just bind it to the table because currently this is all static data we just need to bind it to this particular table and then we’ll be getting the rows dynamically from the database and not from the static HTML template so we’ll go to the inventory. component. HTML file and over here I’ll just take this row and create a dynamic row over here then we’ll comment the static data that we have first let us just create the static row we have to use an ng4 for this let inventory of invent details so what is inventory details it’s this particular object that we have created on the component.ts file I’ll just paste it so that the exact name is matching over here and in this inventory details for each of the object we have to bind the property name the name that we are getting over over here so this is the product ID so we’ll just map it and after this product ID we can bind the product name as well and then we have available quantity with a capital A so you have to make sure that what whatever property name you are giving it is exactly matching with whatever data you are getting over here because this is the response from the web API and it is there in your inventory details object so let’s go to this HTML file and yes we have made the changes binded whatever dynamically we are getting on the row and how many rows will come the number of rows that are there in the inventory details the number of objects that are there those many rows will come in the table of this tag that we have so let’s save the changes but yes first let’s just comment out whatever static data that we had given earlier commenting it out and now saving the changes let’s go to the page again it should be reloaded yes because just after saving the changes we are able to see that the reload is done and over here we are getting whatever we had saved in the table that is successfully being fetched on the screen as well this is all Dynamic data this is not the data that we had given in the HTML template it’s all dynamically being fetched from the table to the angular application on the screen so we have successfully established the get flow as well I hope you have understood what whatever we have covered till now now what we’ll do is we’ll create the functionality of this delete button what if we want to delete a particular record from this inventory details table for that we’ll have to write what action we want to perform on this delete button it has to take the selected record and delete it from the table so let’s get to the flow of creating the delete functionality we’ll go to the database and and over here we’ll be writing the store procedure First We are following the same approach that we did for the get flow it is going to be delete inventory details and over here if we just check that in the table inventory table what key should we take to delete the record product ID would be the appropriate candidate to delete the record from this particular table that we are sending from the front end to back end what we’ll do over here is just take this query and it’s not going to be a select query it’s going to be a delete query we want to delete the record from inventory table where product ID this is going to be a filter so we should Define the filter as well the stored procedure is going to accept a parameter product ID of data type in and wherever the SQL is able to find a record according to this filter where product ID is equal to at theate product ID that is being passed to the store procedure that records should be deleted so this is the store procedure that we are creating for deleting the record let me just execute this it says commands completed successfully that means that the store procedure is created over here if I just refresh it you’ll be able to see a third store procedure for deleting the inventory details so now we’ll use this store procedure in our net core web API I’ll just stop the exec ution and take the help of the existing method to create a new method now added an extra curly braces now this is going to be a HTTP delete method and we don’t want to get inventory details we are simply trying going to delete them the stor procedure name we’ll be copying from here and we want to pass the parameter now to this sto procedure so we’ll just remove all of this reading code that we earlier had for get inventory details we don’t want to send any response just send the okay code as of now and the command would be execute non-query because we are not trying to read any data but before executing the command we have to pass the parameters it’s going to be the similar approach that we had followed while saving the data the name is going to be atate product ID this is the exact name that the SP is taking as a parameter and what should we pass over here this particular web API method would be accepting a product ID so this is what will be passed to the store procedure as well we’ll just save the changes and now I’ll execute the solution so closing the dialog box and we have to see if our new web API method is added or not while the solution is running so over here it is added this is a delete API that we have created and we can try it out also we have to pass the product ID over here so if we just check what data is existing currently in the table that we also can can see over here that these are the records in the table right so we want to delete let’s say the second one we can create it also from the front end so no problem as such I’ll just pass this particular value and click on execute so over here we are getting a code 200 that means the API is successfully executed and if we see now in the table so we are a able to see that the second record is deleted so that means that our API is working perfectly and now what we have to do is just add the flow from the front end to the net code web API so that we are able to delete the record from this particular page if I just refresh this now it should have only one record so yes it is having one record only and what we’ll do is just add some value over here so that we are able to see multiple records instead of only one so let me just click on submit it says form submitted successfully I click on okay and check the table if the data is inserted or not so yes we are able to see the record inserted over here and what you’ll be able to see is that the ID column is having value three the second row was deleted right and and after that as we have set it as an identity column the next row that would be inserted would take the sequential key only so the identity would just increment it by one and set it to three it will not be two so that is one thing I hope you all are aware about for the identity columns when they are set in the SQL and over here we are able to see that we have successfully inserted the record but what is not happening is that this table is not getting refreshed so this is a very good point that we have found while inserting the record again in the table that the table is not refreshing on the go when we are clicking on submit for that what we need to do is this is the NG on init function right this is getting the records from the table this is the second flow that we had created now when I submit the record in the table from the screen what I want is the table should also get refreshed on the go so for that we’ll take this method and once the post is completed once we have the alert we also want to refresh the page so that any new data that is inserted in the table it should reflect on the screen as well so now if we go over here and I just add add some random values again I click on submit okay and you see that the table is getting refreshed now because we have called the NG on init function and as it is only fetching the records as of now we are able to call it successfully otherwise we should have called another function which was just getting the details so so what we can do over here is for the reusability approach we’ll just add another function inventory details and this function will Define it over here because NG on in it was only calling this code that is why we could easily use it in the onsubmit functionality as well but if you have more code in the NG on in it if there are some more functionalities that you are performing over here then it is a better approach to have a separate function for getting the inventory details that you could use in NG onate and then this function can be called on submit as well over here so now I’ll just save the change over here and we’ll go to the screen make some changes that is add a new record and click on submit so everything seems to be perfectly working fine over here we are able to get the records while we are submitting we are able to get the latest table details as well after this now what we have to do is add the delete flow for that what we’ll be doing over here so this is an interesting point now we have already included bootstrap in our application and now we’ll be using NG bootstrap for creating a dialog box that would be displayed once the user clicks on delete button so when the user clicks on delete button what should happen is a message should be displayed over here on the screen so as to have a confirmation from the user that they really want to delete the record because it is a possibility that they clicked on it by mistake and we don’t want to just directly delete the record we want to confirm from the user that they are trying to delete this particular record okay so let us now add the functionality of this button what do we want to do in the HTML file on the delete button click we want to call a function whenever this function is clicked we want to open confirm dialogue this function can be called and over here we’ll Define the function so which dialog box will it open now for that what we’ll do is will create a new component and in the dialogue box we are going to utilize the model feature of NG bootstrap so let us just stop the execution for now and create a new component that can be named dialog box because I want to keep the HTML structure separate from this particular component that is why we are creating a dialog box component that could be utilized at multiple places according to the HTML structure that we have okay the HTML structure would go over here but we have to install the NG bootstrap as well so let us install NG bootstrap for this and this is the particular command that we are going to use so over here we are doing a save with Legacy Pi depths it is because we want to eliminate any risk of conflicts that might arise due to peer dependency that NG bootstrap would have and also we require another installation for this that’s that is for poer JS / code after we have installed both of them we’ll be using the HTML template that I have already reference from the NG bootstrap documentation over here in this component. HTML file and save it now we want to open it from here is that correct from open conf firm dialogue so for that we’ll be using model service we are going to inject model service using the NG B model and you see that the import is automatically done through intellisense I’ll save the change changes we are going to utilize this model service to open the model and in the function we have to pass the content that we want to open so this is going to be the dialog box component and once we just mention it over here it is automatically imported as well I’ll save the changes over here and in the dialog box component what we have to do is import NGB active model from NG bootstrap and then there is a function that we have called while we are clicking on okay so let me just give it the name confirm over here and this function we’ll just mention here over here we don’t need to perform any function but we do need to close the model so for that what we’ll be doing is on the confirm button on the confirm function that is being called from here we’ll just have a model do close so rather than directly closing it over here like this we are closing it in the TS file because later on we might need to add some functionality in this particular function so let’s just go to the browser now and over here we click on delete so you see the model is opening we have a dialogue box for the confirmation of deletion so this is working perfectly fine now how do we delete the data that is selected it’s not selected through a checkbox we are directly clicking on the button of a particular record so how do I make sure that that particular record is deleted so we’ll need to pass the product ID correct the product ID that we have over here we’ll need to pass it okay and we see that this product ID is the product name so let us just change that also in the inventory. component. HTML the product ID is the hash that we have over here and this is the product name so you see as you keep on making the changes you’re able to see what Perfections you can make to your application right so this is the product ID that we need to pass to theet code web API when I click on delete this particular record should be passed to the web API this 21 31 and how do I do that I come over here we already have the inventory. product ID right that is being displayed so we can simply take this and pass it on this function why I’m doing this because when we are opening the confirmation dialogue box a record should be made there should be a record of which product ID I had clicked on which product ID’s delete button I had clicked on so for that I’m passing the inventory. product ID as well from here and I have to capture it I have to capture it okay it’s not going to be int like in the net it’s going to be like this and this product ID can be maintained over here let me give it product ID to delete so as to clarify what is the use of this particular variable now as soon as I’m passing the product ID from the HTML page to this function I want to keep a record of it so when I’m opening the model ser service what should happen is the product ID to delete should be set as product ID that is passed from the HTML page I click on Save now once I have saved it let us just confirm if it is working all fine once I have made a record of which product ID is getting deleted so we can do a console log as well I come over here do an inspect go to console window I click on delete so you see we are getting the product ID 2131 and this is going to be passed to the backend API to be deleted now it should only be deleted once I click on okay if I click on cancel it should not be deleted am I right so for that what we’ll do is we’ll make a record of what is being sent from this D dialog box so how do we do that in this particular dialog box once we are closing the dialog box and we are only closing it on the confirm function and the confirm function is only called on the click of okay when we are clicking on cancel model. dismiss that is directly called from here and we are not confirming anything so on the click on confirm only we are performing this particular function and from here we want to pass some result that result would be let’s say confirm this is the result that we are passing from the okay button click I’ll save it and we need to capture this result as well so how do we do that over here we have to capture the result once we have got the result I want to perform some action what kind of action am I performing I’m going to delete the data so how do I do that but the question is not how there should be a condition that once we have got the result we are checking also that the result is is what we had expected so if data that we are taking from the result this data is being passed from here if the data that we are getting in the result and the property of the data that is event as I have mentioned here its value is equal to confirm so only if the prop property of the event is equal to confirm then something should happen so let’s do a console log over here as well confirmed to delete else delete not required so I saved it and let click on okay so you see this is being sent from the dialogue box event is confirmed and that is how we are able to get into this condition and it says confirm to delete also now that we think of it it will never go to the else condition why because we are not sending any other data any other result from here so this this particular condition would not be even satisfied because we have only called confirm functionality from the okay button and that is sending this particular response so it’s never going to go into the lse statement so that is how we will be able to specify whatever we want to do when the event is equal to confirm so now over here what we want to do is we want to delete the inventory details so this particular function let’s mention over here what we want to do in the delete functionality and this is going to be a this. delete inventory in this particular function we want to have the API URL that we’ll take from here okay let me just give some value as well so that we are able to check the URL okay so this is the URL of the request and I want to pass it in the HTTP client delete function API URL and then we could also utilize the HTTP options or I think we can skip it for now because this is just a delete function we want to subscribe to It Whatever data we have got we just want to do some action once we get the result but before that over here you see that this is a static value that is being passed in the URL but we cannot pass the static value we have to pass whichever row was selected for the deletion from here so how do we do that we are already saving it in this particular variable so we we will utilize this variable and because this is under the class scope and not just the function scope we can directly use it over here so whatever value is set over here when this function is called delete inventory we’ll be able to utilize the value in this URL okay so now once we are able to delete the data successfully after that what we want to do is get the refresh table from the database so we had created a function earlier that is what we’ll be utilizing over here and this particular function will be called once the data is successfully deleted so let me just save the changes and uh we’ll go to the browser now okay I click on delete for this particular record it says are you sure you want to delete it I click on okay and you see that the event was confirmed the data is deleted new refresh data we have got from the database as well that means the delete functionality is also working fine if I just add something over here I click on submit this is it and now I click on delete this is also working fine if I click on submit let me just click on submit again add a new row click on delete and click on cancel so you see that nothing is happening if we click on cancel it’s only deleting once I click on okay so this is how we have integrated the dialogue model from NG bootstrap into our application created the delete functionality with end to end flow from angular to net Cod web API till SQL and all of the data is being refreshed On The Go only okay so the save functionality and delete we have just seen that it is working all fine and we are able to read the data from the table as well let’s move on to the next functionality that is edit so we are going to update the data in the table for that let’s first move on to our net code we we create another web API I’ll just stop the execution of the solution and take the help of the existing code to write another web API this is going to be a HTTP put API and we want to update inventory data over here we are going to use inventory request dto so in this particular web API we’re going to accept the whole inventory request dto we just don’t want the product ID or the product name we are going to accept whole of the inventory request dto and save whatever is coming from the front end to the backend now this particular SP we’re going to create in database for first over here we have the table inventory table and this is the data in the table right so to select which of the particular column we need to use to update the data we’ll follow the same process that we had done in the deletion of the record we are going to use the product ID column over this column only we’ll be putting the wear clause and then update the record in the table let’s create a new store procedure create procedure the name is going to be update inventory data so if this particular table is to be used just let me select something from this table over here these are the columns in this table so what I’ll do is give the parameters names as well because we are accepting a single row only just like we did in save inventory data this is going to be integer product name it’s going to be Vare according to our table these are the data types that we are using then it’s available quantity integer again and then we have reorder point that is another integer column after this what we are doing over here is we are not selecting anything in this St procedure we are trying to update the table and in this particular store procedure we want to set the columns with new values right that are coming as input from the net code to the store procedure we have product name then we have available quantity then we have reorder Point these are the three columns that we are updating and which particular record we want to update that condition we’ll give through we clause on this particular column we have already selected this column we use this column while deleting the record as well so we are updating the record through this column only in the wear condition wherever the product ID is matching with the one that is being sent from the net code to the store procedure in DB we want to update that particular record so it is possible that uh one of the column is only changed with the new value we are trying to update all of the columns in one go because even if one of the columns is not changing we are still updating it with the old value only this is the product ID column that we are using for the wear Clause okay let me execute and now over here it says commands completed successfully that means the stor procedure is successfully created in the database we could also check from here so now you are able to see that we have this fourth stor procedure update inventory data let me use the name I’ll just copy and paste it over here this is the sto procedure that we are trying to call now and now what parameters do we want to pass to this particular sto procedure we have are passing product ID but it is not from a single input we want to use the inventory request and that product ID we are trying to pass to the store procedure then we have another three columns the one is product name we’ll use product name over here from the inventory request then we have available quantity the exact name we’ll use over here then we have reorder point so these are the four parameters that we are passing to this store procedure and we’ll keep the command as execute non-query because we are not trying to read any data from the DB we are only trying to insert the record also you have to make sure that whatever parameter names you giving over here these have to exactly match with the ones that are mentioned in the sto procedure because otherwise it will give you an error while the execution is in progress so the parameter names should exactly match with the parameters name over here in the store procedure now after saving let’s execute this solution okay now you see that we already had three existing web apis we have another one that is for put we have created it to update the record in the table and we can try it out also from here now let me just check yeah this is the current table data okay we already have some record so I’ll take this product ID and update it and the product name is three available quantity is this so let me just take available quantity and the reorder point also from the table now what I want to do is I want to update the product name it is three as we have seen in the table I want to update it to mobiles I’ll click on execute and you see we are getting 200 success code we can also verify from the table now I’ll run this query again okay so I hope that you are able to see that we have successfully updated this particular column product name all of the other values we had also given as they were old only those are coming as such but the product name is updated with the new value mobiles which was three earlier so our net core web API is working absolutely fine now we need to concentrate on the front end angular part to make the connection and execute the update API okay so let’s just go to the browser first over here what should happen when we click on edit from the front end application when I’m clicking on edit for this particular row all of these fields should be populated with the row data so the product ID text box the name drop down quantity available reorder Point all of these should be populated with whichever rows edit button has been clicked on so let’s just go to the solution for that ones okay we have to go to visual studio code and over here we see that the form which is there and the text box the drop down the two other text boxes both of these are binded with this NG model inventory data that is there on our component.ts file over here we have already made The Binding from this particular structure on this form so what should happen when we click on edit over here on this edit button click this particular inventory data should be populated with the row that is selected and how it would happen we’ll just write the code for that now so over here we are defining a new function when I click on edit it should populate form for edit now in this function which particular data structure should be sent to the component.ts file from HTML see over here we are traversing through inventory details in the for Loop right and each of the row is binded through inventory so this is the inventory detail that we will send to the component.ts file I’ll take the name from here for the function and in this particular component TS file we’ll write the implementation of this function this inventory we’ll just give it the type any as of now and in this component.ts file we have inventory data that we B to bind with this inventory we cannot simply bind this inventory data to the inventory that we are getting from the HTML we have to assign each of the fields in inventory data the correct value from inventory so how do we do that in inventory data the field names are like this product ID and in inventory we see on HTML that the names are like this product ID with a capital P so we’ll take the names from here and assign each of the fields this way after product ID we have product name and similarly we have product name in HTML like this next we’ll take the available quantity and bind it to available quantity in in inventory data then we have reorder point so you see that we have simply binded the inventory data from the HTML inventory that we are getting as input in this particular function I’ll just save the changes and on HTML also we are saving the changes now let’s go to the browser and check if our code is working fine in the second row I’m clicking on edit so what happened was I click on edit for the second row correct and all of the text boxes are correctly binded but it is not happening for the drop down and why is that because we were sending index to save at the back end from the HTML page we have an index associated in our drop-down with each of the values so this is an interesting point over here for the drop-down we have indexes given to our values in the each of the option associated with the text that we are showing in the drop down so now I’m just simply giving the value same as the text that we are displaying and then we’ll see if this is also getting binded correctly when we click on edit I come over here the page is refreshed I click on edit okay so the drop-down value is also getting perfectly binded now all of the fields are getting populated when I click on edit from this particular row if I just click on edit now here on the first row this is also working perfectly fine you see that all of the form data is getting prepopulated when I click on edit so I hope that uh this was an interesting point for all of you to learn about the drop- down control on the form that for the drop down options we have a value and the text that is displayed associated with each of the options we can keep it same also and we can give it indexes also that we had given earlier and earlier when we were trying to save the data value would only get saved to the backend table now we have kept the value same as the text of the options so that would get saved now as a string value now over here on the form you see that we are able to populate the data correctly but what happens if I just change thect product ID from here because currently in the table these two are the product ID values existing right and if I change the product ID only then what will happen I’ll not be able to update any of the record in the table because that product ID would not exist correct we already have the wear condition which is checking if the product ID is matching with the one that is being sent from the front end and if I’m able to change the product ID then there is no point of sending any data to the backend to update it will not have any record to update for that particular reason we’ll have to disable the product ID text box over here when we are trying to update the data and how we’ll do that we’ll come over here on the input that we have for product ID we’ll give the disabled attribute and this particular attribute will be set according to a variable that we’ll Define in the component.ts file so I’ll give it the name disable product ID input and we’ll take this variable and Define it over here in the component.ts file this would be set to call we don’t want to disable initially and then what we want to do is whenever I’m clicking on edit at that particular time I want to set it to true this is what should happen so whenever I click on edit from this page and the row is getting populated over here at that time I want to disable it so let’s just save this and we’ll save this also now we’ll go to the browser once I click on edit and you see this is not at all editable this is disabled I’m not able to update any value in the product ID text box so after this what we want to do is we want to change some values over here let’s say I want to just up update the quantity available I want to update the reorder Point as well and I want to submit it if I submit it the backend update web API should be called and for that we’ll have to change the submit functionality over here we already have a function for submit button now this is currently saving the data this is currently doing what it is calling ing the post method of the HTTP client but we want to update the data now so for that we’ll have to do an HTTP put but when should we do an HTTP put we should only do it in case we are trying to submit when the text box product ID is disabled so that is when we should update the data otherwise when it is enabled we should be saving the data as we were doing earlier so that is why we’ll have to put a check over here this dot disabled product ID input is equal to equal to True at that time we should simply call the put method otherwise we should save the data so this should work as it is let me just format the document okay so whenever the product ID field is disabled it would call the put method otherwise it would call the Post method so let me just save it and now we’ll go to the screen we’ll click on edit making the changes again and you see the values are different from which were given earlier in the table so I click on submit now and it says form submitted successfully I click on okay and you see as soon as I clicked on okay this is showing me the new values over here so this is working perfectly fine we can see it in the table also the values are updated but as we have already put a fetch call on this particular table when we are submitting so it shows me the new data in real time because when I click on okay the fetch call is instantly made to from the back end now we’ll just do some minor changes on the application just to enhance the look and feel of the application what we want is when we click on okay on the alert box we want that the form should be reset so for that what we’ll do is we’ll come over here in the code what we want to do is we see that we are calling this particular function get inventory details whenever we are deleting the data whenever we are saving the data right so over here in this function we want to make a change whenever we are getting the fresh data from the table at that time our inventory data this particular data structure that is being binded to the form control it should be just reset so we simply want to set it to the new values and after this we also have this disabled product ID input right this should also be set to false because in case we have edited some data this would be set to True from this particular function right and it would only be set to false when we have explicitly mentioned in some function and as we are calling this function every time we are trying to refresh the table we should set it to false so this should work now we’ll go to the browser I’m just adding some new data now okay and I click on submit so this should add a new row and you see that the form controls are also getting reset let’s just try to edit something as soon as I clicked on edit product ID is getting disabled I’m only able to change the values from here I click on submit and you see that the product ID field is also getting enabled as soon as I clicked on okay on the alert box because the refresh whenever it is happening for the table it is refreshing the form controls with the product ID input as well so all the crud operations for the inventory page are now completed we are able to save the data we’re reading the data from the table and that is all happening in real time because as soon as we are making any updates like save delete edit we are able to call the read functionality as well so I hope all of you have understood whatever part we have completed till now now after completing all the crowd operations for inventory we’ll move on to the next component that we were going to complete for this particular application we had created two options over here in the drop down inventory and customers so the inventory component is completed with all the crowd operations now we’ll move on to the customers component we’ll be creating a new component for this in our code as of now if I click on this option nothing is being displayed except the header that is given in the app. component. HTML file so what we’ll do is we’ll go to the visual studio code and try to create a new component for the customer I’ll just stop the execution and what I want to do is NG generate component in the app. components folder where we already have inventory component I am creating a customers component as well so you see that the customer component is created over here this is the HTML file for it and as of now it is showing customer works so in the app. component. HTML file we want to have a router link for customer as well we already had for inventory now we want to add for customer over here in the customer option I’ll be mentioning customer over here and in the app component.ts we also want to import customer component and here it’s saying add import I’ll save this after this in the routes. TS file what we want to do is we want to give another p path we already have given a path for inventory now we want to give the path for customer as well so the this path the value of this path is going to be the same that we have mentioned over here in the HTML file so I’ll just take this and paste it over here so that there are no differences in the two values and after that we have to mention the component that we want to use so over here it is going to be customer component so sometimes the import is just done automatically I have saved this and after mentioning the New Path what I want to do is I’ll just do an NG serve again so that our application is running and we’ll go to the browser through the link okay now I’m going to the customers option so you see over here it says customer works that means we have successfully added a new component in our application for customer and we have added the router link for it as well after this what we are going to do is take a static HTML template for the customer I already have it referenced from the bootstrap and we’ll use it over here we’ll be pasting our static HTML template and after this I’ll just save it to check if the changes are getting reflected in the browser or not so we have come to our browser and we see over here that now the page is showing the new template on this page we see that we have a button to add a new customer then pertaining to each of the row we have edit and delete actions so now what we’ll do is we’ll give the functionality for this button first for adding a new customer because if you see over here in the inventory we had given the form like this on the inventory page itself that we could add the new row from here through this form and submit it right but in the customers we have added a little modification the reason is that you’ll be able to choose whichever template you want to and we just have a variation in our application so now what we want to do is when we are trying to add a new customer a new popup should be shown with the customer form that is the basic approach that we are going to follow over here and for that what we want to do is add a new dialogue component in our application so let’s go to the visual studio code and I’ll just stop the execution again I want to add a new component in the app components it is going to be customer dialog so this is what I want to add to this application this is a new customer dialog box and over here we have the HTML file for it now in this customer dialog box called component. HTML file we’ll be giving the form template for the new customer I’ll be using the one that I have already reference from the bootstrap and let me just paste it over here okay so you see that we have some input controls for customer information and then we have a add button over here let me just save this now when should this dialog box open it should open when we are trying to add a new customer right so in this customer. component. HTML we have the button over here when we click on this button it should open customer dialogue this is the function that we want to give in the customer.com component.ts over here we are mentioning the function and for this we’ll be using the model service that we had used for inventory. component. HTML file when we were trying to delete the record so let me just have a private model service variable created for it and we are trying to inject NGB model and for the inject we want to import the core module the options would be mentioned over here now after this we want to use our model service to open customer dialog box component this is what we are trying to acheve let me just save it and let me save here also the changes that we have made for opening the okay let me just give it the name customer not custom it and over here also the name should be customer okay after this let’s just run our app application okay go to the URL and now when we are going to customers when we click on this add a new customer button you see that the dialog box is opening so this is working perfectly fine that we are trying to open a new customer form through this button this is is a different approach that we have used to open the customer form over here we can enter the information and then click on ADD after this what we’ll do is we’ll be working on the functionality for this add button that should be saving the new row in our database so let’s just go to the database and over here we’ll try to create a new table for customer and I can give it the name customer details okay now after this The Columns that we have on our HTML one would be customer ID then first name we’ll give it 5050 okay and then we have last name email date of registration so let me just give it registration date and it could be of date data type I think we had another the customer HTML we can just check phone number yeah this is the one that we want to add okay got something over here the email spelling I’ll just save the changes so you see when you just keep on going through your Cod again and again you’ll just find some changes that you want to make to make it better phone right it was phone we’ll give it Vare only and could be off let’s keep it 15 digit however we want to save later on with the code or not maximum is 10 though now we’ll create the table and now what I want to do is I want to create a stored procedure it should be save customer details we are trying to insert the data in this table and these are the columns right so we’ll just mention over here we have to remove the data type in the insert statement and after this we want to just take these values and have them as parameters over here so but here want to have the parameter names but these should have the data types so let me just copy from here once again your code helps you to write the further code faster and now I’m giving the parameter names yeah just a syntax error that over here they should come the parameters before as keyword and we want to insert all of these in the table so I’m taking the names from here only and let me just give the character and to add the brackets for the values okay and also you might be wondering that how did I give the at theate character before each of the variables in one go so you press shift and ALT and then you just drag the mouse so you’ll be able to add anything so you could just add any character or delete any character so it would work for all of the rows so this is something interesting that I had learned some time back while working on a project in the office now we just want want to execute this query to create the new procedure okay after this what we want to do is we want to work on the API so over here I’ll just stop the execution of this solution and now you see that we already had the inventory controller correct we were working on this one for doing all the crowd operations for our inventory component now what we want to do is we want to add a new controller and this is going to be an API controller let’s select the empty one and click on ADD now it will request the name so we are going to give the name as customer controller and you see over here it has already mentioned the route as well from the inventory controller we just want to take the help of the first method that we had for saving the inventory data correct now we want to do a similar thing over here we want to save the customer data so this is going to be save customer data and for this want to create a new DET going to be customer D customer request D and after that over here we’ll be mentioning the properties and is going to be then it’s going to be the first name after that it’s going to be last name so you see intelligence is very helpful then we have email so that we have phone and then we have registration date okay uh we can give it date time I’ll just save this and use this customer request D over here the SQL connection would remain the same but we have a different store procedure now this is save customer DET also uh what we can do is we can keep it the naming convention same so I’m just dropping the to procedure once and we’ll create it again and we’ll create it again with the name Spore okay now it says commands completed successfully so we can check over here that in the store procedure we should have this particular store procedure as well so you see that we have got the SP save customer details and now let’s just work on our API the name of the store procedure is this one we have to take it from here and there are multiple parameters that we are working with so those also we can take it from here only one is the customer ID then we have post name then we have last name this is the one that we can use over here after that we have [Music] email and then we have phone and registration date so you see these are the different parameters that we are sending to the store procedure through the request detail that we receive from the front end so that part we’ll be covering later but as of now we have completed the coding for our web API so let’s just save this and we’ll run this solution okay so the solution is running now so you see over here we have got our new controller customer and and we have created a post method for it for saving the new records in our database let’s just try it out we’ll give the customer ID some random value and some random values for the email phone number okay let’s just keep the registration date as it is and we’ll be executing this you see we have got a 200 success response but how do we verify it we’ll go to the database and execute the query to select the data from this table that we have just newly created so you see the new record is successfully inserted into the table and we have completed the flow from the web API to the database successfully now we’ll be working on the flow for creating the connection between the front-end application and the web API let’s go to the visual studio audio code now and over here in the customer dialog box component. HTML file we’ll need to add a new function that is triggered when we click on the add button similar to the one that we had done in inventory component on this form I’m going to mention NG submit and call a function on submit for this function we’ll be writing the code for but before we proceed to write the functionality of this function what we want to make sure is that all the form controls that we have on this page they are matching with the ones that are required to be send to the web API so over here we’ll come and click on add a new customer so you see that we have first name last name phone number registration date at email but we don’t have customer ID over here so I’ll add a new text box for customer ID and one more thing we are going to do we’re going to make the changes so that the date is entered through a date picker and not in the text box so let’s make the changes for that over here I’ll just just add a new column so I’m adding it next to the email for now and this is going to be customer ID or let’s do one thing what we can do is just change this particular form control to phone number over here name should be same as this is email would be email only and what I want is that the customer ID should come over here so I’ll take this I’ll be taking this and add it over here and this should be customer ID the same name is given in the label then this is first name last name phone number and email so this is all fine now we need to change the registration date right so what we’ll do is we’ll give the type for this particular control that is registration date as date and the class would be form control only so I think this is fine I’ll just save it okay it says on submit is not there so for now I’ll just remove this and we’ll add it again once we are writing the functionality okay we’ll go to the browser and over here you see that we have a new form now we have customer ID added because we need to send it to the database for the row to be added for a particular customer then this particular registration date we had a text box in place of the date picker now we have a date picker and through the calendar we can just enter the date over here then we have first name last name name phone number and email so this looks perfectly fine now we’ll be working on the functionality for this add button let’s go to the visual studio code again and over here I’ll just save this and add a new function also over here so that the error is remove on submit I’ll say save it you see the error is gone now so now we’ll just start working on the onsubmit functionality we’ll have a API URL that we need to give and I’ll just mention it over here before that we have to write the HTTP options this is similar to the process that we followed for in entry details HTTP headers then over here we’ll find the properties for it authorization in case you have a token that could be passed through this and then we have content type that should be application slash Json headers are defined and after this what we want to do is we want to call the Post method of customer API so I’ll just take the URL from here itself because I know that I only need to change the controller name the rest of the API URL would remain the same so over here in the API URL I only have to change the controller name that is customer now for calling the post method what we need to do is have HTTP client defined over here we are going to inject the h HTP client and for this particular error we’ll need to do an import of angular code after this what I want is I need to call the HTTP client and we need to post so we are trying to call the Post method that is all good but we still haven’t defined what we need to send to the backend API to be saved into the database for that we’ll need to Define an object over here that would be mapped to our HTML page and would take the data from the form to the backend API so let me just Define customer details over here and we have several properties that we need to send first is customer ID then we have first name last name registration date phone and Emig okay so this is all of the information that we would be sending but how do we bind the data from from the HTML to this particular TS file for that I’ll just save this once and we’ll just take the name of this object over here we’ll come to the customer dialog box component. HTML file here we need to bind it so this is going to be through NG model and the value would be customer details customer ID and then we have name property that would be same as the one that we have in the object so similarly we’ll be giving the NG model for all of the control this is for customer ID then we have have registration date let me give the correct name over here and then we’ll give the NG model binding for registration date so this needs to be changed and the name would be same over here so let’s do it for all of the controls first name then similarly it would be [Music] for first name this is phone number and these are the two have given the property as phone so that is what we are keeping over here let me just show you confirm it once on the TS file phone right correct over here think we have done the bindings for all of the controls I’ll just save it once okay so you see that as soon as I saved it some errors have come we have done the binding but we need to import over here forms module and common module I think this should fix the error yes okay now we’ll be working on the post functionality we want to send this data to our backend API this do customer details then we need to pass the HTP options and we are going to subscribe to this HTTP post method just doing a console log over here for error we again want to do a console log but once this is complete what we want to do is you want to write the functionality for completion of this post method we are going to give an alert box that gives the message customer details SA successfully and which details are saved that we can show through json. stringify by passing the customer details over here so the functionality is all good we’ll just save it once after this we will go to the browser try to enter new customer information give some random values let me just give some random values over here I’ll click on ADD and it says customer details successfully saved saved successfully that is the message that we had given and over here you see this is the object that we are passing to the backend API and now generally when we are developing an application for the end user we don’t show what particular data they have sent to the back end right because they don’t want to see a Json being shown to them in the message box this is for our convenience that we are able to see what all data has been sent and this is just for development purposes so I’ll click on okay but we need to confirm that all of the data that we were trying to send has been already saved in the database once we have got the alert box so for that we’ll just go over here and I’ll click on execute so you see whatever data we sent this was all random data we just sent some random values from the front end and those are all saved successfully into the database so the save functionality is working perfectly for the new component that we have created that is customer we can start working on the get flow of the application but first of all we’ll go to the browser and check at which particular point we want to retrieve the data so the get flow should happen as soon as I click on the add button the first thing that would happen is I would receive a message that the customer details are saved successfully after that the popup should close that is one more thing that we have to add and once once the popup is closed this table that we see on the browser it should be updated with the new record in the table that is there in DB so we have to add the get flow as soon as we click on the add button and after we receive the successful response and whenever this page is loading so let’s say I’m coming to customers this page right currently we are seeing some static data so this should not happen we should be able to see whatever data is there existing in our DB so we have to add the get flow at two places so let’s see how we’ll do that but first of all we have to complete the flow for add functionality once we have gotten the successful response we want to close the dialog box for adding a new customer and we want to do it in the complete function so for that we’ll be giving the model do close functionality but first of all we’ll have to define the model model over here through inject I want to inject NGB active model and this we’ll be using over here this do model Dot close and once this is closed we’ll be taken back to the customer page over here so now let’s try it I’ve saved the record I’ll give some random values marks phone number let me just give a random date I’ll add it says customer detail saved successfully click on okay and you see that the model is closed and we can confirm that the data is saved by executing this particular query so you see a third record has been entered after this let’s try to create the get flow from the table we’ll be creating a procedure get customer details just following our naming convention so adding Spore and then simply we have to select the customer details in this store procedure I click on execute it says commands completed successfully that means the store procedure is created so if I just try to check in the store proced procedures over here it is added now so let’s go to our web API solution stopped the execution and just taking the help of already written function for saving the data now what we are doing is we’re trying to get the data give it the appropriate name we don’t want to pass any request over here and then the store procedure name would be get customer details after this we don’t want to pass any parameters to the store procedures and once the connection is open we want to execute Reader through SQL data reader and while the equal data reader is reading what we want to do is we want to take all of the data that is there in the result set and create an object for it so I’ll just add a new model customer D and I’m taking the help of customer request dto over here to define the properties because these are going to be similar to the ones that we defined in customer request d once this is done over here I want to create a new list of customer video customer details or let me just name it customers yeah and then what we’ll do is create a D2 that would hold the single record and once that is done I want to assign each of the property the value from the table so this is going to be convert do string we have a reader column name is customer ID okay got it customer ID is integer and similar to customer ID we have first name that would be string column name should be over here then we have multiple columns one of them is last name then we have phone we have email and another is registration date got it um this is going to be time this is taking registration overhead email and then okay so I think we’re all done with assigning a single row to this particular object now what we have to do is we need to add the customer D to customers and once this is done need to just convert this object to Jon and send it as our response from the API so this is customers this is the response that we are sending through the get customer data I’ll just save all of it and we’ll run this solution so this is running now and over here you see that we have a get method added to our customer controller and we can just try it out I’ll click on execute and we are getting the response perfectly all of the data that was there in the table we are getting it as a Json in the response body and this is the same URL that we used for post just that we are making a call to different method every time through the same URL so now that this flow is completed to get the data from the DB to the web API we just need to work on the flow from the front end to the web API and we’ll be able to see the exact data that is there in the DB on our UI application so let’s complete the get Flow by going to the visual studio code and over here what we’ll be doing is we need to fetch the data on the load of the customer component right so we’ll go to the customer component.ts file and we’ll be just mentioning what we want to do in NG on in it over here we want to get the data let me create a separate function similar to the one that we had done in inventory component we are going to get the customer details and this function we’ll be calling over here now here we need to specify which particular URL we want to call for getting the customer details so we’ll just take the AP URL from here after mentioning the URL what I need to do is have HTTP client mentioned over here and we’re going to inject HTTP client so this we need to use in our function to call the get method and we’ll pass the URL we are subscribing to the method now when we are subscribing to the get method we will need to assign an object with the result that we receive from the API so let me just Define an object going to be customer details of type any now what I want is that once I received the result from the API this do customer details should be assigned at result oh I think we’re good over here once we receive the data from the get method we are assigning the customer details the same now in our customer. component. HTML we already have static data that is there in the table this will be just replaced with the dynamic data that we are receiving from the web API so this is the static data over here what I am doing is just defining a dynamic TR and we are going to iterate through ng4 let customer of customer details this is the object that we created let me just take the help of the static data and over here as of now I’m removing all of the static values and we’re also removing the static rows that are there in the table as of now I’m keeping the bindings blank because let’s just see which particular properties we’ll be binding on the HTML page so what I’m doing is just doing a console log of customer details saving this and over here also we save it okay now let’s just go to the browser currently you’re able to see that on the browser all of the static data is removed from the table and we’ll just do an inspect and go to the console over here I’m getting an error also can’t bind ng4 okay so to remove this particular error what we need to do is in our customer. component.ts we’ll be import supporting foron module I’ll save it and then we’ll go to the browser again so you see that the error is removed and now we are able to see that the records are there but we are not seeing any value because we have not done The Binding yet but on the UI we are able to see number of rows that are there in the table right you see that edit and delete these are static values so three rows are generated in the table but we are not able to see the values because currently we have not done The Binding right and for The Binding what we need to see is which particular property we need to bind because this is the value of customer details we cannot have the camel casing done in the property this property is starting with the capital c so this is exactly what we need to bind and that is why we we have not done The Binding yet but now that we know that we don’t need to use the customer details similar to this one like we have done in the customer dialogue box we need to bind it directly to what we are receiving from the web API so for that what we’ll do is now we can come over here and just have customer do customer ID so this is the value that we are binding from the back end we are doing this for every column is going to be customer Dot and then we just check our browser then it is first name last name phone registration date and email all starting with the capital laters this is what we need to B customer ID customer name and now over here in the customer name what we are doing is we’re giving the first name and last name together so as to just concatenate and show it on the screen email this is a very important thing that that we just went through to check which particular property you are binding is if we had just used the one that we had done in customer dialog box component these were all with camel case because this is what we had defined over here but we are not binding it as per the TS file we are binding It Whatever response we are receiving from the back end and now the next is is I hope you have understood this particular concept properly and now I’m just saving it going to the browser again and you see that we are able to see the data whatever data was there on the back end in the table you’re able to see it perfectly so the get flow is working perfectly fine if I just try to add a new customer if some random values over here click on ADD so it says that the customer details are saved now when I’m coming over here you see that this is not getting updated so this is the second place that we had already discussed earlier where we need to add the get flow so let’s just go to the visual studio code so in the visual studio code we’ll just go to the flow that is there right we are trying to open the data from the customer. component.ts over here and once the model is open we we enter some data into the form then we just call the Post method of the API once it is successfully saved we are closing the mo model so when we are closing the model what I want to do is send back a result to the customer component and how do I do that over here on the close we’re just sending a result closed so this this is the result that would be sent back to this customer component I’m saving it and now once that is done I want to go to the customer component and over here in the open function I’m taking the result once I received the result I want to perform a function now what I want to perform is I I want to check first of all if the data that we have received and there is event property in it is it equal to the one that we have sent back from here you see that this is the property that we are sending right event value is closed so that is what I want to match over here and if it is matching then we should just call this do customer get details so you able to see that this is the second point we are calling the get customer details function first for that we are calling it on the initialization of the page whenever we are coming to this particular component we are calling the get method and then once we are closing the popup after saving the data successfully at that time also we’re trying to call it so let me just save it and we’ll go to the browser again now this is reloaded so all of the get flow is working fine on the customer initialization but let’s just try to add a new custom entering some random values again I’m clicking on ADD it says successfully saved and you see now the data is getting refreshed as soon as the popup is closed because we have confirmed from the dialog box that we are closing the popup and then once we come back to the customer component it is checking if we have closed the popup so at that time we should just update this particular table with a new record that was entered so I hope all of you have understood that we have completed the get flow for this customer component at the two places that we wanted to after this what we’ll do is we’ll work on the delete functionality for this customer component for the delete functionality let’s go to the database and we’ll try to create a store procedure P underscore delete customer detail and now what we want to do is delete from customer details table but if I just write this query then all of the data from this table would be deleted and we don’t want that we want to delete for a particular record let’s say I have selected this record and trying to click on delete button so only this particular record should be deleted so for that we’ll be choosing customer ID as our constraint to delete the data from this table so this is the check that we are going to put on over here what I want is that particular record should be deleted where customer ID is equal to and the check should be according to this parameter that we would be passing to this procedure so wherever the row is matching with the parameter that is passed to the store procedure that particular record should be deleted I’ll click on execute and now the store procedure is created in the database if I just refresh and we are able to see that this thr procedure is added now we’ll go to the net code for our web API what I’ll do is I’ll just take the help of this function and we are writing an HTTP delete method and the name would be delete customer data now I don’t want that the whole request dto is passed I don’t want the whole customer data to be passed to the backend API I just need the customer ID from the front end to be passed to this web API and we are keeping the connection string same the store procedure name would change over here we have the name so we just use it and I’ll remove all of the other parameters we are going to pass only this parameter which is customer ID now we have our delete customer data function ready once the connection is open we are just trying to execute the store procedure and then we are closing the connection after this we are sending the okay response so I think the whole function is ready we can just try it out by running the solution so over here you see that for the customer controller we have have a new web API that is delete method and if I just click on delete we are seeing that we need to pass the customer ID so if we are able to try it out we’ll have to enter a customer ID over here for that what we’ll do is we’ll just click on execute once and see what all data is existing in the customer details table now we have five records over here and I want that this random values that we had entered earlier right this this should be deleted so I’ll select this customer ID and we’ll go to the browser click on execute we have got the 200 success record and now if I just execute this query again we see that only four records are existing now all of the data that was there earlier it has been deleted and what we can do is we can just refresh this page and we are able to see that only four records are coming over here one we have already deleted from the backend web API so the backend flow is completed for the delete method now we’ll just work on frontend to web API connection and then we can just click on this delete button and we’ll be able to delete the data from the UI as well so for that we’ll need to write the code for this button let’s go to the visual studio and over here if we just check customer. component. HTML file over here on the HTML file this is the delete button that we want to add the functionality to but we don’t directly want to just delete the data because what if the user has mistakenly clicked on the delete button right so we want the user to confirm if they are sure to delete that particular record for that what we’ll do is we have giving a function open this is not going to be customer but confirm dialogue that the user should confirm if they are ready to delete this data and have this function created in the TS file as well now what this function would do is it would open the model and that is going to be dialogue component so I hope you all remember that we have already used the dialog component in the inventory component as well and it would just open it first of all we are just trying to open it okay and then we’ll see what happens save it here and here also we’ll go to the browser and now let me just click click on delete button so we see that we have successfully opened the confirmation dialogue box from this delete button but what should happen if I click on cancel nothing should be deleted so that is working perfectly fine because we have already written the functionality for the cancel button earlier but when we are clicking on okay then the record should be deleted right so that is the pending portion over here that we are going to write the functionality for deleting the record record of the customer when we click on okay and how do we accomplish that when we were clicking on okay we were sending the event as confirm from the dialogue box so that is what we would accept on the customer component now and then delete the record let’s just go to our solution over here on the visual studio code and over here we can see that we are sending a confirm event from the dialogue box and in case we click on cancel at that time what is happening is it is simply closing the dialog box so in the event that the user clicks on cancel nothing would happen but when the user click on okay at that time the confirm function is getting called and we are sending the event as confirm so that is what we would accept over here also we can take the help of inventory component right now and just use that code over here so what I want to do is I just want to have the result now of the dialog box in the customer component if I’m opening the dialogue box we are taking the result and then we will be deleting the customer this is what we are going to do so let me just have a function created for it need customer details and this is the function that we want to call when we are receiving the event as confirm only if the user has confirm then we are deleting the record now let’s just give the functionality for deleting the record which is the URL that we are going to take over here that would be from the browser itself over here you can see that we have this URL and this is the one that we’ll be putting over here now for the delete functionality we have already made sure that a check would be passed for the wear clause and that would be customer ID so this is what we require over here in this function to be passed to the delete method of the HTTP client but how do we get that particular customer ID that would be passed from the HTML this is the customer ID and this needs to be passed to the function that we are trying to call from the TS file so we accept it over here and then can simply pass it to this function we just save here also after this we need to pass this customer ID with this URL for that we’ll be just using HTTP client all the delete method pass the API URL with customer ID and we are subscribing to the method so after saving the changes we’ll just go to the browser and if I click on delete it says are you sure you want to delete the record I can cancel it so nothing is happening now if I just click on okay on this confirm box currently also nothing is happening but if I just check over here in the DB has the record been deleted so yes the record is deleted successfully but on the UI we are not able to see it why is that because we have not refreshed the table after deleting the record from here so for that what we’ll do is in the visual studio code when we have subscribed right when we are getting the result result from the delete API at that particular Point what we want to do is just call get customer details method now I’ll save it we’ll go to the browser again and I just add some random values over here because I want to delete this random data click on uh and now I want to delete it so I click on okay and you see that the table is getting refreshed so the delete functionality is working perfectly because after we have deleted the record we are refreshing the table as well and that is all Happening by just passing the customer ID from the HTML page so I hope all of you have understood the delete functionality that we have covered till now after this what we we’ll be doing is we’ll be working on the edit functionality but before proceeding on it we have to make a minor change over here you see that on the table that we are seeing on the UI the registration date is having the time also that is because we had kept the variable as date time in the net web API so for that we’ll be making the changes over here we need to change it to string so let me just make the registration date as string and then this could be convert. twoing we’ll save the changes and in the store procedure when we are fetching the details we need to make sure that string is being fetched from the table so this is a conversion technique that I am explaining to you and this is very helpful when we are working on the store procedures because generally you would have data in your table in some format but you need to get it in some other format so for that we can cast the data now just to fetch the column names I am selecting the table and doing alt F1 on the keyboard this gives me the data definition for the table we can take the column names from here and what I want is add a comma Now for the registration date as V yeah and we can keep it 12 as of now and the column name can be registration date only so why I have to mention all of the columns separate separately because I want to perform a cast on a particular column so if we are just putting a star with the select keyword we’ll not be able to put cast function on a selected column for that we have to mention the column name separately over here now we are altering the procedure I click on execute and it says commands completed successfully to verify that our changes are working perfectly fine we can just execute this store procedure in the database so now this is giving me records over here in the same format that the table is there but this would be now Vare so what we can do is just go to the solution and run it once and now that it is running over here in the get method can just try it out I click on execute and you are able to see that the registration date that we are patching now from the table it is not having a Time associated with it otherwise it had assigned a default time in the net code so now we’ll go to the browser and just refresh the page over here you see that the registration date is is coming without the time so this is what we were intending to do and we have achieved it now after this we can move on to the edit functionality as well so for the delete functionality let’s first go to the database to create a store procedure now we are creating a procedure to update customer details and what we’ll be doing here have an update query or customer details table now in the table we know that we have some columns right customer details these are the columns that we have so as we have selected earlier customer ID column for deleting the record so this seems to be the appropriate candidate to edit the records as well so we will be using this in the constraint when we are trying to update the record and these are the remaining columns that we’ll be updating the values for so whatever data we are getting from the front end all of that we’ll be updating in the store procedure over here I want to update first name but what do I want to update the first name with I will have to pass a parameter for the first name to this store procedure and similarly for all the remaining columns those parameters would be passed I’ll just take the column names from this table these are the column names that would be passed we do need to pass the customer ID as well because how would we update the record without passing the customer ID this is of type in then we have B care this was I think 50 then the same we can keep for the last name email registration date can be date only and then we have phone which would be just vard for now okay after this what we are going to do is set the first name with the first name that we have received as a parameter last name then we have email registration date and then the last is phone so all of these we are updating but which particular record we want to update it for it is only when customer ID is matching with the one that is pass from the web API customer ID so the parameter that we receive in the store procedure if the records value is matching with it then we want to update all of these columns so this is the update query and that we’ll be using in our store procedure for updating the customer details I’ll click on execute so the store procedure has been created now let’s go to the web API I’ll stop the execution so we can take the help of inventory controller and just use the update function to write the same for customer as well over here it’s going to be HTTP put request and then we have update customer data here we are passing customer request DT and the store procedure name will be taking from here now we want to pass all the parameters here for the customer details so those can just take from the Save method and this was D can be changed to customer request all of the parameters are also set now we just have to execute the store procedure and whatever values we are passing those will be updated accordingly through this SP now let me just save it and we’ll run the solution now that the solution is running we can just go over to our database once and check over here which particular record we want to update so I’ll just select this one and we’ll go to the browser so you see over here that a put request method has been added can try it out now these are the values that we need to pass so the customer ID would be the one that we have selected we’re keeping the names same only and for the email what we’ll do is we’ll change the email over here let me just copy the phone number or what we can do is just change the phone number rather than the email and this date also can remain the same and I’ll execute it we have got a 200 success response now we can verify our data for this particular customer in the DB you see that these are the updated values that we have sent we have changed the phone number only here and in the DB if you see this is a old phone number that we had so I’ll just have a query on a different query editor and execute it over here we are able to see that this is the new phone number that we have given from the web API and this is updated correctly through the update method over here this is the old one that we had in the table so we have built the connection from the web API to the DB and the update method is working perfectly fine what we’ll do is we’ll go to the visual studio code to make the changes for the front end to web API connection but before that let me just go to the UI once again we have the edit button over here and for the inventory what we had done is we had a form on the page itself which we were populating when we were clicking on the edit button but now we have a dialog box when we are adding a new customer so what we want to do is this is a very interesting portion we want to populate this particular dialog box when we click on edit Button as soon as I click on edit the popup should open and this popup should have the values prepopulated from the record so I can change the values from here by entering some new values and then I’ll click on save or update that should update the record in the DB and I should have a fresh data over here on the table so this is what we are trying to achieve let’s see how we can do that so we’ll go to the visual studio and over here you see that this is the customer component.ts the customer component. HTML is having that edit button right so we need to have a button action related to this when we are clicking it we want to open the edit dialogue box for the delete what we were doing is opening the confirmation dialogue box now we want to open the edit dialog box and this is the function that we’ll have to create over here what this should do is now in this function we are using the model service to open customer dialog box component now I’m able to open the customer dialog box component through this particular statement but how do I pass the customer information over here on the HTML you see that we have a row associated with the customer and when I click on edit this particular information should be passed so this is the customer data that I would need to pass to the customer dialog box component and when we are passing it first of all we need to be able to receive the data in customer dialog box component so for that what we’ll have to do is over here we are taking it as input defining a private customer variable of type any and just import angular core now I’m saving it once done what we have to do is when I’m clicking on edit and folling this function I should be passing the customer whole information needs to be passed for the delete we had only passed the customer ID but now when I am updating I would need to require to pass the whole customer object save it okay so it’s giving error because we need to accept it also in the function I’ll save it again error is gone so I’m able to receive the information in this function but now I need to pass it to this component and for that what we’ll do is just Define this as a const model reference giving it a random name and model reference component instance property this is what we need to Define over here in the component instance we have to give the exact name of the property that we defined over here so as soon as the dialog box is initialized customer value would be set from here and over here we need to give the object first is the customer ID property then we have first name first name name em registration date the last is phone so we have set all of the values all the properties have been defined over here you could wonder that why we have not taken the names over here of the properties as camel case because over here we are accepting it because this is being accepted over here and even though it is of type any I am just making sure that it is matching with the object that we have already used in the customer dialog box component but over here we have to use this name with the capital letter in the starting because this is what is being used on the HTML page this is the one that we have been receiving from the web API and we have directly mapped it on the HTML so you have to make sure that all of the property names you are giving correctly for the application to be working perfectly then after this what we’ll need to do is I’ll just save this once over here when we have got the data of the customer we need to map it to the HTML right when we go to the HTML we see that we already have a binding in place for customer details so what we can do is we can utilize this customer details object only and initialize it with this value if we are updating a record and how do we do that we have okay we don’t have NG in it in this class currently so I’ll add it in the NG on init function what we need to do is this do customer details it should be set to customer but should it be set every time when the object is getting initialized no it should not be it should only be initialized in case we are receiving any data in this particular object that is customer so that means when we are trying to edit only that time it should be initialized with this value now what I can do is I can give an if condition customer is not equal to null at that time we need to just set this customer details with this value I’ll save it and now we’ll go to the browser ones over here it’s refreshed already after saving I’ll click on edit so you see that we are able to perfectly get the data from that table into this particular popup that record is populating on the dialog box but this add label is not looking very appealing over here because we are not trying to add any data we’re trying to update the record so what we can do is we can update the text as well for the button and one more thing we’ll need to do is just similar to inventory that we need to disable the editing of this particular text box when we are trying to update the record because this is the constraint that we are using at the back end to update the record we cannot change its value this is similar to the inventory component that we have achieved now we’ll be disabling it over here as well when we are trying to open the dialog box for updating a record so let me just go back to the visual studio code and over here in this customer dialog box component when we are setting the customer details with customer at that time we are trying to update the record right so over here we’ll make the changes but uh we’ll check the HTML first in this the label is set as static currently right so we can give some value over here dynamically for that let me just Define a variable button text string so it can be initially it can be add okay so this is the initial value that we are giving that is a default value and this is what we can use over here and just save it now button text should be set as dat I’ll just save it go back to the browser over here when I am adding a new customer at that time it is ADD so it is taking the default value but when I’m editing it it’s coming as update so this is working now we’ll make the changes for disabling over here where we have defined button text can give AOL value for disable customer ID input so initially it will be false I don’t want to disable it initially but as soon as I’m trying to update it should be said to true and we’ll take this over here on the HTML page customer ID disabled is being set through this variable I’ll save it now we can check the browser again so when I click on edit you see that this is not editable right now so this is also working perfectly now we have made the required UI changes for our update dialogue box and the add dialog box is also working perfectly now over here we have to make the changes to send this data to the back backend now we’ll go to the visual studio now in this component we need to make the changes to update the data right if we check the button for editing this is the button that we are using right but this is the button that we are using for saving the data as well so what we’ll need to do is we’ll need to make the changes on this button functionality only on submit is the function that is being used for that button click and now I need to add a check which can make sure that either the user is trying to edit the record or save the record so we already have made the changes for these two variables to verify if the user is trying to edit or update so we can take any of these I’ll take the bo one and over here if this is true at that time I should edit otherwise I should just save the record and that save functionality is already working through post method okay now for here in this if we need to have the functionality for or put so I can just take the help of this code we are trying to call the put method the API URL Remains the Same we’ll be passing the customer details only because this is set through this function when we are trying to update the data and we can just update this message and then we are closing using the dialog box as soon as we click on the okay for the alert box so this is also perfect I’ll just save it and we’ll go to the browser now on the UI I’ll click on edit for this record and I am updating the phone number again let me give it a different value so that it is easier to remember okay it starts with 3625 I click on update and it’s not updating over here but let’s just verify on the DB ones this is the old value I click on execute again so we are getting the new value over here that means the API is working perfectly but it’s not showing on the UI over here let’s just check the code now C customer dialog box component we are sending the event as closed in the customer component when we were opening for adding we were receiving it got it that over here we are not receiving the result because in open customer dialogue we have been receiving the result we are checking if the event is closed then we are refreshing the table so this statement we have to just take and add over here in model reference result then and we have got the result from customer dialog box component then we are checking if the event is closed then we are refreshing the table save it we’ll go to the browser again now over here we are seeing the refresh data because after saving the page always reloads right so now just let me click on edit and give it a new value this one only and then click on update so it says this is updated now and now we are seeing the new value over here so this is working perfectly fine now if I have the old value I click on edit enter some new information and it is updated successfully over here so the table is also getting refreshed as soon as I am clicking on update over here and for the ad also if we are adding a new customer then we don’t have this text box disabled and the button displays add only so I hope all of you have understood the crud operations that we have completed for inventory and Custom customer component we did some UI enhancements as well and some additional features that we have given to the application to make it perfect for the end user now this was the last video for this particular application will be coming out with the new application soon thank you

    By Amjad Izhar
    Contact: amjad.izhar@gmail.com
    https://amjadizhar.blog

  • Principia Mathematica: Evolution, Revisions, and Analysis

    Principia Mathematica: Evolution, Revisions, and Analysis

    The provided text extensively examines Bertrand Russell’s work on Principia Mathematica (PM), particularly focusing on revisions and manuscripts related to the second edition. It explores the changes made, Russell’s motivations, and criticisms from logicians like Gödel and Ramsey. The evolution of Russell’s logical system, including the theory of types and the axiom of reducibility, is scrutinized alongside influences from figures like Wittgenstein and Carnap. The analysis investigates modifications related to propositional logic, extensionality, and the handling of classes and relations. Ultimately, the text aims to clarify Russell’s intentions and the impact of these changes on the foundations of mathematics and logic.

    Principia Mathematica, Second Edition: Study Guide

    I. Quiz

    Answer the following questions in 2-3 sentences each.

    1. What does the notation ‘Rν‘a’ represent in the context of multiples and submultiples of vectors?
    2. Explain the meaning of “Prm” as defined in *302.
    3. In *304, what condition defines when X is less than r Y (X <r Y) in the series of ratios?
    4. How are X×s Y and X+s Y defined in terms of R and S in sections *305 and *306, respectively?
    5. Explain what is meant by “FM sr” and “Semi Ded” in the context of multiples and submultiples of vectors.
    6. What is the significance of the expression “(ιτ){(∃ ρ, σ ) . (ρ, σ ) Prmτ (μ, ν)}” in defining the highest common factor (hcf(μ, ν))?
    7. In the context of inductive classes (Cls inductm), what property is being proved in *89.16?
    8. Explain the meaning of the notation α̂{α(S∗|S)α} in the context of Section 4v.
    9. According to 917, what properties can be derived for Cls induct3?
    10. In the context of the summary and related properties, what can we prove directly about the relationship: {(∃x).φx}|{(x).ψx}?

    II. Quiz Answer Key

    1. ‘Rν‘a’ represents the result of applying the relation R, ν times to ‘a’, where ν is a natural number. It signifies a multiple of a vector ‘a’ with respect to the relation R.
    2. “Prm” defines the concept of relative primes within the context of inductive natural numbers. Two numbers, ρ and σ, are considered relatively prime if their only common factor (τ) is 1.
    3. X <r Y is defined by the existence of natural numbers μ, ν, ρ, and σ (excluding 0) such that μ×c σ < ρ×c ν, and X = μ/ν and Y = ρ/σ. This means that X is less than Y if the product of μ and σ is less than the product of ρ and ν.
    4. X×s Y relates R and S based on the product of ratios μ/ν and ρ/σ, while X+s Y relates R and S based on the sum of ratios μ/ν and ρ/ν. Both definitions involve natural numbers μ, ν, ρ, and σ (where ν and σ are not 0) to connect the ratios X and Y to the relations R and S.
    5. “FM sr” likely refers to a “vector-family”, while “Semi Ded” likely refers to a “Semi Dedekind” property. These terms describe specific characteristics of mathematical structures relevant to defining multiples and submultiples of vectors in the context of Principia Mathematica.
    6. The expression “(ιτ){(∃ ρ, σ ) . (ρ, σ ) Prmτ (μ, ν)}” identifies the unique τ that is a common factor of μ and ν, where ρ and σ are relatively prime with respect to τ. This tau corresponds to the highest common factor.
    7. In *89.16, the proof aims to show that if α is not a member of the third-order inductive class (Cls induct3) and γ is a member, then there exists a unique difference between α and γ (α − γ). It implies a certain distinctiveness or separability within the inductive class structure.
    8. The notation α̂{α(S∗|S)α} defines the set of all α such that α is related to itself through the relative product of S∗ and S (S∗|S). In essence, it identifies elements that are in the reflexive domain of the relative product of S∗ with itself.
    9. According to 917, Cls induct3 supports the property that if α is not a member of the third-order inductive class and γ is a member, then there exists a unique α − γ.
    10. Directly we can prove: ∼ (∃x). φx .∨. ∼ (y). ψy ≡ : (x). ∼ φx .∨. (∃y). ∼ ψy

    III. Essay Questions

    Answer the following questions in essay format.

    1. Discuss the significance of numerically defined powers of relations and relative primes in the broader context of Principia Mathematica’s development of number theory. How do these concepts contribute to the formalization of arithmetic?
    2. Explain the role of the Axiom of Archimedes and the Axiom of Divisibility in the development of measurement within Principia Mathematica. How do these axioms ensure the consistency and applicability of measurement in the context of vector families?
    3. Analyze the use of matrices and propositional logic in the proofs presented in the source material. How do these tools contribute to the rigor and generality of the arguments made?
    4. Discuss the significance of inductive classes and their properties in the context of defining mathematical concepts in Principia Mathematica. Provide examples from the text to illustrate your points.
    5. Critically evaluate the notational conventions used in the source material. What are the advantages and disadvantages of these conventions in terms of clarity and precision?

    IV. Glossary of Key Terms

    • NC induct: Natural numbers, inductively defined. Represents the set of natural numbers constructed through inductive principles.
    • RP: A numerically defined power of a relation R. It denotes the application of the relation R to a certain extent, defined numerically.
    • num(R): A function representing the “number” associated with the relation R. The specifics depend on the relation’s properties.
    • Prm: Relative Primes. A relation indicating that two numbers are relatively prime (i.e., their greatest common divisor is 1).
    • hcf(μ, ν): Highest Common Factor (Greatest Common Divisor) of μ and ν.
    • lcm(μ, ν): Least Common Multiple of μ and ν.
    • Rat def: Defined ratios. Refers to the set of ratios constructed from natural numbers.
    • FM sr: Vector-family. A collection of vectors with certain properties relevant to measurement.
    • Semi Ded: Semi-Dedekind property. A property related to completeness and Dedekind cuts.
    • Cls inductm: Inductive Class of order m. A class defined through induction up to a certain order.
    • Potid’R: The potency of the relation R.
    • R0: Identity relation restricted to the domain of R.
    • D’R: The domain of the relation R.
    • C’R: The counter-domain of the relation R.
    • α̂(…): Class abstraction. Defines a class based on a condition.
    • ṡ‘κ∂: The “dot-abstraction” notation, meaning the class of all terms ‘x’ such that ‘x’ belongs to κ.
    • Comp: A class that contains the complements of all its members.
    • R|S: Relative product of relations R and S.
    • R∗: The ancestral relation (transitive closure) of R.
    • ε: Is an element of. Denotes membership in a set or class.
    • ⊃: Logical implication (“implies”).
    • ≡: Logical equivalence (“is equivalent to”).
    • ∃: Existential quantifier (“there exists”).
    • ι‘x: The unit class of x (the set containing only x).
    • ∪: Set union.
    • ∩: Set intersection.
    • ∼: Logical negation (“not”).
    • →: Mapping or function.
    • ∀: Universal quantifier (“for all”).
    • ∂: Denotes the derivative of a class.
    • α ~ε μ: Element α is not an element of μ
    • p|q: p “not-ands” q: both not true.
    • αM∗β: That α is in the ancestral relation of β under the relation M.
    • α Rts β: Alpha is rooted in beta
    • ṡ ‘Potid‘R: Class who’s members are subclasses of Potid’R.
    • ←− R ∗‘x: A formula relating R and x to other values
    • −→ R ∗‘x: A formula relating R and x to other values
    • D* The ancestral of the domain D

    Russell’s Principia Mathematica: Manuscript Analysis

    Okay, here’s a detailed briefing document summarizing the main themes and important ideas from the provided excerpts of Bertrand Russell’s manuscripts and notes for the second edition of “Principia Mathematica.”

    Briefing Document: Analysis of Excerpts from Russell’s Manuscripts for Principia Mathematica, Second Edition

    Overall Theme: These manuscript excerpts provide a glimpse into Russell’s rigorous, formal, and highly symbolic approach to defining fundamental mathematical concepts. The document shows his work at the granular level, filled with definitions, theorems, and proofs relating to numbers, relations, and order. The notes are primarily concerned with building up from basic logical and set-theoretic notions to construct more complex mathematical entities. The overarching goal is the reduction of mathematical truths to logical truths.

    Key Areas and Ideas:

    1. Definitions of Numerical Concepts and Operations: Russell meticulously defines basic arithmetic concepts like numerically defined powers of relations, relative primes, highest common factors (hcf), least common multiples (lcm), and ratios.
    • Example:∗301. Numerically defined powers of relations. ·01 RP = (|R) ‖ (Ŭ1 t3‘R) Dft(∗301)” This defines a power of a relation R.
    • Example:∗302. Relative Primes. ·01 Prm = ρ̂ σ̂ {ρ, σ ε NC induct :ρ = ξ ×c τ . σ = η ×c τ. ⊃ξ,η,τ . τ = 1}Df” This defines what it means for two numbers to be relatively prime.
    • Example:∗304. The Series of Ratios. ·01 X <r Y . = . (∃μ, ν, ρ, σ ). μ, ν, ρ, σ ε NC induct − ι‘0 . σ = 0 . μ×c σ < μ×c ρ ,X = μ/ν . Y = ρ/σ } Df” This formally defines the “less than” relation (<r) for ratios. The document contains formal definitions of multiplication and addition as well. Note the frequent use of set builder notation to define numbers as the set of some objects satisfying certain conditions.
    1. Vectors, Measurement, and the Axiom of Archimedes: The notes delve into the properties of vector families and their relation to ratios. The Axiom of Archimedes is invoked in the context of multiples and submultiples of vectors. An Axiom of Divisibility is also present.
    • Example:∗337. Multiples and Submultiples of vectors. ·13 : . κ ε FM sr . P̆ = ṡ‘κ∂ . P ε Semi Ded . R ε κ∂ . a ε C‘P . ⊃ : x ε C‘P . ⊃ . (∃ν) . ν ε NC induct − ι‘0 . xP (Rν‘a) [Axiom of Archimedes]” This states Archimedes’ axiom formally.
    • Example:If X is a ratio as previously defined, and κ a vector-family, X κ is the ratio X as applied to the family κ .” This explains how a ratio acts on a vector family. This section seems to be preparing the foundation for geometric reasoning.
    1. Logical Proofs and Manipulations of Symbolic Expressions: A significant portion of the manuscript is dedicated to logical proofs, often involving complex symbolic manipulations and the application of previously established theorems or axioms (referenced by numbers like “*8·261”). The proofs often involve quantifiers and logical connectives. Many of the proofs involve complex matrices.
    • Example: The extended section around expression (642) and theorems *8·322, *8·333, *8·341, *8·342, and *8·343 demonstrate the meticulous logical deductions Russell employs. Key logical proof techniques involve defining and manipulating matrices of logical statements and systematically proving various cases.
    1. Set Theory and Class Theory: Set-theoretic operations, notions of inductive classes, and the posterity of a term are prevalent throughout the notes. The notes make abundant use of set-builder notation (e.g., the use of hats or carats above letters as in “ρ̂ σ̂”) to formally specify the membership of a set based on specific conditions. The notes are trying to develop the theoretical basis for inductive proofs.
    • Example:We have Rm+1(x y) ⊂ R(x y) Cls inductm+1 ⊂ Cls inductm.” This relates inductive classes of relations to sets.
    • Example:R0 ⊂· R∗|R ⊂· R∗ where R0 = I ⇁ C‘R Df ∗89·02. R0 = I ⇁C‘R Df The proof is as follows: ∗89· 1. . R0 ⊂· R∗|R ⊂· R∗” Shows the use of definitions and set relations to construct a proof. The concept of “Cls inductm” which means a class that is inductively defined, appears frequently.
    1. Relations, Domains, and Operations on Relations: The notes use relations extensively, defining operations such as relative product, powers of relations, converse of a relation, and domain/range restrictions.
    • Example: Numerous definitions and manipulations of relations illustrate this. Relations are central to many of the theorems and definitions throughout.
    1. Order and Predecessors: The document frequently considers the relationship between an object and its predecessors and successors with respect to a given relation “R”.
    • Example: In section [17v], Russell is attempting to prove that “∼ R̆‘maxR‘γ ε α .∨. y ε α ∪ γ by induction, i.e.23 ∼p ∨ q . ⊃ . ∼r ∨ q ∨ s” and seems to be concerned about proving that some condition holds for all ancestors to some node y.

    Notational Conventions:

    • The manuscript relies heavily on symbolic notation, which would be familiar to readers of “Principia Mathematica.”
    • Df is used to indicate “Definition.”
    • Likely indicates the start of a theorem or proof.
    • References to previous theorems and axioms (e.g., “*8·261”) are common.

    Observations and Potential Insights:

    • Foundation for Mathematical Reasoning: These notes are part of Russell’s broader project to provide a logical foundation for mathematics.
    • Complexity of Reduction: The level of detail and symbolic manipulation highlights the immense complexity of reducing mathematical concepts to purely logical ones.
    • Work in Progress: These are manuscripts, so they contain corrections, revisions, and unresolved issues.
    • Emphasis on Formalism: The heavy use of symbolic notation underscores the emphasis on formalism and rigor in Russell’s approach.

    In summary, the document offers a fascinating glimpse into the intense, formal, and foundational work that went into the creation of “Principia Mathematica.” It shows the level of abstraction and symbolic manipulation required to rigorously define fundamental mathematical notions within a logical framework.

    Principia Mathematica, Second Edition: Manuscript Notes

    FAQ on Principia Mathematica, Second Edition Manuscripts

    Here are some questions and answers based on the provided excerpts from Bertrand Russell’s manuscripts and notes for the second edition of Principia Mathematica.

    Question 1: What are numerically defined powers of relations, and how are they represented in the manuscript?

    The manuscripts introduce numerically defined powers of relations. For a relation R, RP appears to represent a power of that relation, likely in terms of its repetition in the relation (Ŭ1 t3‘R). The function num(R) is defined which produces values that can then be applied to the power of the relation: Rσ = {ṡ‘num(R)}‘σ̇ Df. So, if R represents a relationship, R2 and R3 would then represent the relation applied twice and thrice respecitively.

    Question 2: What are relative primes and how are they defined?

    The manuscripts define relative primes within the context of inductive numbers. Prm is defined as ρ̂ σ̂ {ρ, σ ε NC induct :ρ = ξ ×c τ . σ = η ×c τ. ⊃ξ,η,τ . τ = 1}Df. Then (ρ, σ ) Prmτ (μ, ν) . = *. ρ Prm σ . τ ε NC induct − ι‘0 . μ = ρ ×c τ . ν = σ ×c τ Df

    Essentially, two inductive numbers, rho and sigma, are relatively prime if their only common factor is 1.

    Question 3: How are ratios defined in this context, and what is the series of ratios?

    Ratios are defined in terms of inductive numbers. μ/ν (where μ and ν are inductive numbers and ν is not zero) represent a ratio. The series of ratios is established by defining an ordering relation <r and two classes “Rat def” and “Rat def ∪ ι‘0q”, meaning rational def, and rational def with 0 included, respectively. The relationship H represents X̂ Ŷ {X, Y ε Rat def . X <r Y } Df, meaning H is the relationship of numbers where X and Y are rational numbers and X is less than Y. H ′ is the same, but includes 0.

    Question 4: What are multiples and submultiples of vectors, and how are they related to the Archimedean axiom and divisibility?

    Multiples and submultiples of vectors relate to how ratios can be applied to vector families. If X is a ratio and κ is a vector family, then X κ is the ratio X applied to the family κ. The Archimedean axiom is invoked, stating that for any element ‘a’ in a semi-Dedekind family, any vector R, and any x, there is a multiple of that vector (ν ε NC induct − ι‘0) such that xP (Rν‘a).

    There is also an axiom of divisibility that states : . κ ε FM sr .Cnv‘ṡ‘κ∂ ε comp ∩ Semi Ded . ⊃ : S ε κ . ν ε NC ind − ι‘0 . ⊃ . (∃L) . L ε κ . S = Lν.

    Question 5: What role do matrices and prefixes play in the logical proofs presented in the manuscript?

    Matrices in this context seem to represent complex logical propositions or conditions, and prefixes define the variables and quantifiers involved. The matrix itself describes the relationships between these variables. The manuscript uses matrices to express logical dependencies and implications concisely. For example, the truth or falsehood of a proposition encapsulated in the matrix depends on the truth or falsehood of other propositions (φa, φb, q, etc.). The prefixes indicate which variables are bound by existential or universal quantifiers. The text uses these matrices to build and demonstrate more complex logical arguments, simplifying the representation of intricate logical structures.

    Question 6: What is Cls inductm and how is it used?

    Cls inductm refers to inductive classes, with m likely representing the order of induction. So “γ ε Cls inductm” means gamma is a class of the “m” order for inductive classes. The document explains that given Rm+1(x y) ⊂ R(x y) then Cls inductm+1 ⊂ Cls inductm, meaning the inductive classes are related by order.

    Question 7: How are relationships between classes and operations on classes (such as intersection, union, and removal) explored in the manuscript?

    The manuscript extensively explores relationships between classes using operations like union (∪), intersection (∩), set difference (−), and the application of relations (R̆“μ). Theorems and proofs often revolve around demonstrating how these operations transform classes and how membership in one class affects membership in another after such operations.

    For example, ∗89·16 : α ∼ε Cls induct3 . γ ε Cls induct3 . ⊃ . ∃! α − γ, where given alpha is not in Cls induct3 and gamma is, then there exists an “alpha minus gamma”.

    Question 8: What is the meaning and significance of R∗ in the document, and how does it relate to R0?

    R* typically represents the ancestral or transitive closure of the relation R. That is, if xRy and yRz, then xR*z. R0 is the identity relation within the field of R. The relationship between them is shown by R0 ⊂· R∗|R ⊂· R∗, where R0 is a subset of the transitive closure of R applied to R, which is a subset of the transitive closure of R.

    Principia Mathematica: History, Impact, and Significance

    Principia Mathematica, originally published between 1910 and 1913, is a monumental work in symbolic logic that aimed to deduce much of elementary arithmetic, set theory, and the theory of real numbers from a series of definitions and formal proofs. Written by Alfred N. Whitehead and Bertrand Russell, it became a model for modern analytic philosophy and an important work in the development of mathematical logic and computer science.

    Overview of Principia Mathematica

    • Scope and Content The three volumes of Principia Mathematica lay out a cumulative series of definitions and formal proofs to rigorously deduce much of elementary arithmetic, set theory, and the theory of real numbers.
    • Impact on Logic Principia Mathematica is arguably the most important work in symbolic logic from the early twentieth century. Logic conducted in the style of Principia Mathematica soon became a branch of mathematics called “mathematical logic”.
    • Influence on Computing Principia Mathematica led to the development of mathematical logic and computers and thus to information sciences.

    Revisions and Additions in the Second Edition The second edition of Principia Mathematica, published between 1925 and 1927, included a new Introduction and three Appendices (A, B, and C) written by Russell, along with a List of Definitions. These additions, though comprising only 66 pages, proposed radical changes to the system of Principia Mathematica, necessitating a fundamental rethinking of logic.

    Key changes proposed in the second edition:

    • Sheffer Stroke Russell proposed replacing the logical connectives “or” and “not” with the single “Sheffer stroke” (“not-both”). This change was technically straightforward and didn’t require rewriting the original text.
    • Extensionality The second major change was the adoption of “extensionality,” requiring that all propositional connectives be truth-functional and that co-extensive propositional functions (those true of the same arguments) be identified. According to Russell, functions of propositions are always truth-functions, and a function can only occur in a proposition through its values.
    • Axiom of Reducibility Russell proposed abandoning the axiom of reducibility, a move that faced criticism from logicians. In Appendix B, Russell attempted to prove the principle of induction without relying on this axiom. However, Kurt Gödel later criticized this proof, and it was eventually shown that deriving the principle of induction in certain systems of extensional ramified theory of types without the axiom of reducibility was impossible.

    Impact and Reception

    • Initial Reactions The second edition was seen as Russell’s attempt to keep up with a subject that had surpassed him. However, a closer study reveals deep issues regarding the shift from the intensional logic of propositional functions in the “ramified theory of types” of the first edition to the altered theory of types in an extensional logic.
    • Evolution of Logic The second edition of Principia Mathematica marks the end of logicism as the leading program in the foundations of mathematics, and the rise of the mathematical logic of Gödel and Tarski as its replacement.
    • Obsolescence and Philosophical Significance As a work in mathematics, Principia Mathematica soon became obsolete. However, its study remains significant in the philosophy of logic. The intensional nature of its logic and the potential distinction between co-extensive functions were seen as alien to the extensional account of logic that supplanted it.
    • Influence on Analytic Philosophy Principia Mathematica became a starting point in analytic philosophy, from which progress was made by correcting its errors. It is often viewed as a wrong turn in the progression from Frege’s Grundgesetze der Arithmetik through Wittgenstein’s Tractatus to the logic of Carnap, Gödel, and Tarski.

    Key Concepts and Technical Aspects

    • Type Theory The notion of type theory, extensionality, truth-functionality, the definability of identity, and the primitive notions of set theory all evolved between the two editions. The history of Principia Mathematica reveals important knowledge about the history and philosophy of logic in the early twentieth century.
    • Notation Principia Mathematica employs a system of notation that, while precise, can be challenging for contemporary readers due to its use of patterns of dots for punctuation rather than parentheses and brackets.
    • Axiom of Reducibility The axiom of reducibility states that for any function, there is an equivalent predicative function (one true of all the same arguments).
    • Theory of Descriptions Principia Mathematica introduces a method for indicating the scope of definite descriptions, with the fundamental definition being a “contextual” one.
    • Relations Principia Mathematica presents the “General theory of relations” in extension. In this theory relations are treated as counterparts of classes.
    • Mathematical Induction Appendix B discusses the principle of mathematical induction, which, along with the definition of numbers as classes of equinumerous classes, is central to the logicist account of arithmetic.

    Criticisms and Challenges

    • Technical Crudities Despite its importance, Principia Mathematica has been criticized for its technical crudities and lack of formal precision in its foundations. Gödel noted that its presentation of mathematical logic was a step backward compared to Frege.
    • Intensionality The intensional nature of the logic in Principia Mathematica was seen as a result of confusing use and mention.
    • Axiom of Reducibility Quine argued that the axiom of reducibility cancels out the ramification of types, undermining the distinctive feature of the logic.
    • Notational Excess Quine criticized the “notational excess” in Principia Mathematica, suggesting that its numerous theorems merely link up different ways of writing things. He views this as a stylistic defect, but others argue that the multiple definitions reflect the intensional nature of propositional functions.

    In summary, Principia Mathematica is a complex and influential work that represents a significant stage in the development of modern logic. The second edition, with its proposed revisions and additions, highlights the evolving nature of logical thought and the challenges of establishing a solid foundation for mathematics.

    Principia Mathematica: The Axiom of Reducibility

    The axiom of reducibility is a central concept in Principia Mathematica (PM), and its treatment was a major point of revision in the second edition. The axiom and its revisions have been the subject of considerable discussion and debate.

    Definition and Purpose

    • The axiom of reducibility states that for any function there is an equivalent function (i.e., one true of all the same arguments) which is predicative.
    • A predicative function is of the lowest order applicable to its arguments. In modern notation, these functions are of the first level, with types of the form (…)/1.
    • Whitehead and Russell express doubts about the axiom of reducibility in the first edition of PM, and one of the major “improvements” proposed for the second edition is to do away with the axiom.

    Role in Principia Mathematica

    • The mathematics developed in PM, including elements of analysis, requires frequent use of impredicative definitions of classes.
    • The axiom is needed to define notions that would otherwise violate the theory of types by referring to “all” types, creating an illegitimate totality.

    Identity

    • The definition of identity in PM relies on the axiom of reducibility:
    • x = y .=: (φ) : φ!x . ⊃ . φ!y Df
    • This means x is identical with y if and only if y has every predicative function φ possessed by x.
    • Without the axiom of reducibility, this definition is problematic because it is not possible to state that identity is the sharing of all properties, since there is no “totality” of all properties to be the subject of a quantifier.

    The Second Edition and Abandoning the Axiom

    • One of the major changes proposed for the second edition is to avoid use of the axiom of reducibility whenever possible.
    • Russell was trying to work out the consequences of “abolishing” the axiom of reducibility, to see more clearly what exactly depends on it.
    • In the second edition, the definition of identity remains untouched, even though the axiom of reducibility is abandoned.
    • Russell states that if the axiom of reducibility is dropped and extensionality is added, the theory of inductive cardinals and ordinals survives, but the theory of infinite Dedekindian and well-ordered series largely collapses, so that irrationals and real numbers generally can no longer be adequately dealt with.

    Challenges and Criticisms

    • Circumventing the Axiom Even without the axiom of reducibility, it is possible to prove mathematical induction.
    • Quine’s View Quine argued that the axiom of reducibility cancels out the ramification of types, undermining the distinctive feature of the logic.
    • Wittgenstein’s Challenge Wittgenstein challenges the axiom of reducibility as certainly not a principle of logic.

    Responses to the Abandonment

    • Chwistek Leon Chwistek took the “heroic course” of dispensing with the axiom without adopting any substitute.
    • Ramsey Ramsey agrees with rejecting the axiom of reducibility, on the ground that it is not a logical truth, and because it can be circumvented in practice.

    In conclusion, the axiom of reducibility was a contentious point in Principia Mathematica. Its abandonment in the second edition, while intended as an improvement, raised significant challenges and led to substantial revisions and alternative approaches in the foundations of mathematics and logic.

    Principia Mathematica: Theory of Types

    The theory of types is a pivotal concept within Principia Mathematica (PM), significantly influencing its structure and revisions across editions. It addresses logical paradoxes and imposes a hierarchy on functions and propositions to avoid self-reference and ensure logical consistency.

    Core Principles and Development

    • Vicious Circle Principle: The theory of types is rooted in the “vicious circle principle,” stating that “whatever involves all of a collection must not be one of the collection”. This principle aims to prevent logical paradoxes arising from self-reference.
    • Hierarchy of Functions and Propositions: To adhere to the vicious circle principle, the theory introduces a hierarchy of functions and propositions, categorized into different “types”. This hierarchy ensures that a function cannot apply to itself or to any entity that presupposes it, thereby avoiding logical contradictions.
    • Orders of Functions: Functions are further distinguished by “order,” reflecting the complexity of their definitions in terms of quantification over other functions. A function defined by quantifying over a collection of functions must be of a higher order than the functions within that collection.

    Simple vs. Ramified Theory of Types

    • Ramified Theory: The original theory in the first edition of PM is a “ramified” theory of types, which accounts for both the types of arguments that functions can take and the quantifiers used in the definitions of those functions.
    • Simple Theory: Later, a move toward a “simple” theory of types emerged, particularly with Ramsey’s proposals, where the focus is primarily on the types of arguments, simplifying the hierarchy.
    • Extensionality: The move towards the simple theory of types is connected with the concept of extensionality. With extensionality, functions that are true for the same arguments are identified.

    Technical Aspects and Notation

    • Type Symbols: Various notations have been proposed to symbolize types, with Alonzo Church’s “r-types” being the most fine-grained, capturing distinctions of order and level.
    • ι represents the r-type for an individual.
    • (τ1, . . . , τm)/n denotes the r-type of a propositional function of level n, with arguments of types τ1, . . . , τm.
    • ()/n represents the r-type of a proposition of level n.
    • Variables and Quantification: In PM, statements of theorems use real (free) variables, and bound variables are interpreted within specific logical types to adhere to the vicious circle principle.

    Axiom of Reducibility and Type Theory

    • Axiom of Reducibility Defined: The axiom of reducibility guarantees that for every function, there exists a co-extensive predicative function of the same type, which simplifies the system by allowing higher-order functions to be reduced to first-order ones.
    • Role in PM: The axiom ensures that for any complex function, there is a predicative function that is true for all the same arguments.
    • Criticisms and Abandonment: The axiom has been criticized for various reasons, including by Wittgenstein as not being a principle of logic. The second edition of PM considers abolishing the axiom.

    Classes and Type Theory

    • Classes as Functions: PM identifies classes with propositional functions. The expression x̂ψx denotes the class of things x such that ψx, mirroring modern notation {x : ψx}.
    • No-Classes Theory: The “no-classes” theory aims to eliminate talk of classes in favor of propositional functions, reducing all talk of classes to the theory of propositional functions.

    Challenges and Interpretations

    • Gödel’s Incompleteness Theorem: Gödel’s incompleteness theorem and related concepts challenge the completeness and consistency of formal systems, including those based on type theory.
    • BMT (Appendix B Modified Theory of Types): Gödel identified a new theory of types in Appendix B, known as BMT, which allows any propositional function to take arguments of appropriate type, regardless of the quantifiers used in defining the function.
    • Ramsey’s Modification: Ramsey proposed rs-types, combining simple types with orders for predicates, offering an alternative revision to the ramified theory of types.

    Revisions and Alternative Approaches

    • Chwistek’s Constructive Types: Chwistek advocated for a “theory of constructive types” without the axiom of reducibility, emphasizing that all functions should be definable or constructible.
    • Weyl’s Predicative Analysis: Weyl presented a version of predicative analysis, developing real numbers without invoking vicious circle fallacies, thereby constructing a “predicative” analysis.

    In summary, the theory of types in Principia Mathematica is a complex framework designed to resolve logical paradoxes by imposing a hierarchical structure on functions and propositions. The evolution of this theory, from the ramified approach to simpler, extensional versions, reflects ongoing efforts to refine the foundations of logic and mathematics. The debates surrounding the axiom of reducibility and alternative type systems highlight the intricate challenges in constructing a consistent and comprehensive logical framework.

    Principia Mathematica: Propositional Functions

    Propositional functions are a crucial element in Principia Mathematica (PM), serving as a foundation for both logic and mathematics. They play a significant role in the development of the theory of types and the resolution of logical paradoxes.

    Definition and Nature

    • A propositional function is an expression containing a free variable such that when the variable is replaced by an allowable value, the expression becomes a proposition. For example, ‘x is hurt’ is a propositional function.
    • Expressions for propositional functions, such as ‘x̂ is a natural number’, are distinct from mathematical functions like ‘sin x’. The latter are referred to as “descriptive functions”.
    • Expressions using the circumflex notation, such as φx̂, appear mainly in the introductory material of PM and not in the technical sections, except in sections on class theory.

    Role and Significance

    • Building Blocks of Propositions: Propositional functions serve as a basis for constructing propositions by assigning allowable values to the free variable. The propositions resulting from the formula by assigning allowable values to the free variable ‘x’ are said to be the various “ambiguous values” of the function.
    • Foundation for Classes and Relations: Propositional functions are closely linked to the theory of classes. The expression x̂ψx represents the class of things x such that ψx. In PM’s type theory, the class x̂φx has the same logical type as the function φx̂.
    • Distinguishing Universals from Propositional Functions: Universals are constituents of judgments, while propositional functions are not ultimate constituents of propositions.

    Technical Aspects and Notation

    • Variables:p, q, r, etc., are propositional variables.
    • a, b, c, etc., are individual constants denoting individuals of the lowest type, mainly in the introductions to PM.
    • R, S, T, etc., represent relations.
    • Circumflex (^): When placed over a variable in an open formula (e.g., φx̂), it results in a term for a propositional function.
    • Exclamation Mark (!): Indicates that the function is predicative, meaning it is of the lowest order compatible with its argument. A predicative function φ!x is one which is of the lowest order compatible with its having that argument.

    Type Theory and Propositional Functions

    • Simple Types: Simple types classify propositional functions based on the types of their arguments.
    • If ‘Socrates’ is of type ι, the function ‘x̂ is mortal’ is of type (ι).
    • A relation like ‘x̂ is father of ŷ’ would be of simple type (ι, ι).
    • Ramified Theory: The ramified theory of types in PM tracks both the arguments of functions and the quantifiers used in their definitions.
    • Levels: Functions have levels, and a function defined in terms of quantification over functions of a given level must be of a higher level. For example, if ‘x̂ is brave’ is of type (ι)/1, then ‘x̂ has all the qualities that make a great general’ might be of type (ι)/2 because it involves quantification over functions like ‘x̂ is brave’.

    Axiom of Reducibility and Predicative Functions

    • Predicative Functions: The exclamation mark ‘!’ indicates that the function is predicative, i.e., of the lowest order that can apply to its arguments.
    • Axiom of Reducibility: The axiom asserts that for any function, there exists a co-extensive predicative function. This axiom was debated and ultimately abandoned in later editions of PM.
    • Impact of Abandonment: The abandonment of the axiom of reducibility and the emphasis on extensionality led to revisions in how propositional functions were treated, particularly concerning identity and higher-order functions.

    Extensionality and Truth-Functionality

    • Extensionality: PM’s second edition emphasizes that functions of propositions are always truth-functions and that a function can only occur in a proposition through its values.
    • Truth-Functionality: The argument for extensionality suggests that if a function occurs in a proposition only through its values and these values are truth-functional, then co-extensive functions will be identical.

    Classes and Propositional Functions

    • Contextual Definition: The use of contextual definitions allows for the elimination of class terms in favor of propositional functions. For instance, the expression x ε ẑ(ψz) can be interpreted by eliminating the class term using contextual definitions, yielding x ε ẑ(ψz) . ≡ . ψx.
    • Relations in Extension: From section ∗21 onward, italic capital letters (e.g., R, S, T) are reserved for relations in extension, where xRy denotes that the relation R holds between x and y.

    In summary, propositional functions are fundamental to the logical structure of Principia Mathematica. They are used to construct propositions, define classes and relations, and address logical paradoxes through the theory of types. The treatment of propositional functions, particularly in relation to the axiom of reducibility and the principle of extensionality, reflects the evolving nature of logical and mathematical foundations explored in PM.

    Principia Mathematica: Mathematical Induction and its Logical Foundations

    Mathematical induction is a central topic in Principia Mathematica (PM), particularly concerning its logical foundations and its treatment within the theory of types. The discussion of mathematical induction involves its relation to logicist accounts of arithmetic, the challenges posed by the axiom of reducibility, and the attempts to provide a rigorous basis for inductive proofs.

    Importance and Logicist Foundations

    • Distinctive Method of Proof: Mathematical induction has historically been recognized as a distinctive method of proof in arithmetic.
    • Logicist Achievement: A key achievement of logicism, particularly by Frege, was to demonstrate that induction could be derived from logical truths and definitions alone.
    • Central to Arithmetic: Induction, along with the definition of numbers as classes of equinumerous classes, is fundamental to the logicist account of arithmetic.
    • By 1919, Russell presented induction as central to deriving mathematics from logic. All traditional pure mathematics, including analytic geometry, can be regarded as propositions about natural numbers.

    Principle of Mathematical Induction

    • Two-Part Proof: Proofs by induction involve two main parts:
    • Basis Step: Proving that the property holds for 0.
    • Induction Step: Assuming the property holds for an arbitrary number n (the inductive hypothesis) and then proving it holds for n+1.
    • General Form: The principle of induction appears in a general form for use with an arbitrary ancestral relation:
    • If x bears the ancestral of the relation R to y, and x possesses any R-hereditary property φ, then so does y.
    • Recipe for Proof: To prove that y has a property, show that x does, that x bears the ancestral of the R relation to y, and that the property is R-hereditary.

    Development in Principia Mathematica

    • Part II Focus: Part II of Principia Mathematica, titled “Prolegomena to cardinal arithmetic”, begins with identity and diversity relations.
    • Inductive Cardinals: Inductive cardinals (NC induct) are derived by starting with 0 and repeatedly adding 1.
    • Inductive Class: The inductive class (Cls induct) is one way of thinking about finite classes. Defined this way, inductive cardinals are equinumerous classes of individuals produced by adding one thing at a time to the empty class. The sum or union of all those cardinals will contain all the finite classes.
    • Peano Axioms: With 0 defined as a class, “natural number” defined as NξC induct, and the successor relation as +c1, Whitehead and Russell define and prove the Peano axioms as theorems of their system.
    • Peano’s Axioms and Induction: The principle of induction for natural numbers follows as a special case of induction on arbitrary ancestrals.

    Appendix B and Challenges to Reducibility

    • Limited Induction: Appendix B aimed to demonstrate that a limited form of mathematical induction could be derived even without the axiom of reducibility.
    • Technical Flaw: Gödel identified a technical flaw in the proof within Appendix B. Myhill later proved that the project of Appendix B is impossible in principle.
    • Generality: Appendix B seeks the general result that if y inherits all the level 5 R-hereditary properties of x, then it inherits any R-hereditary properties of x of whatever level. *The most important case of Appendix B shows that any induction on the natural numbers can be carried out with respect to properties of a fixed order, though this is tucked away in the middle of a series of theorems.

    Formalization and Theorems

    • Theorem ∗89·12: A key theorem in Appendix B states that every inductive or finite class of order 3 is identical with some class of order 2. The three-line proof suggests that this holds because of the level of the operation of adding one individual y to a class η, yielding η ∪ ι‘y.
    • Intervals: Intervals are also defined using descendants and ancestors, where the interval from x to y is defined in terms of the descendants of x and the ancestors of y.

    Myhill’s Challenge

    • Undefinability: Myhill argued that the proofs in Appendix B could not have succeeded, citing a generalization of a key result applying to one-many relations as well as many-one relations.
    • Non-Standard Models: Myhill’s argument uses model-theoretic arguments and “non-standard models” of arithmetic, which introduce non-standard numbers.
    • Limitations: Myhill proves that there are instances of induction of a level higher than any given level k which does not follow for properties of levels less than k.

    Gödel’s Critique

    • Mistake Identified: Gödel pointed out a mistake in the proof of ∗89·16, related to applying induction to a property of β involving α.
    • Unsolved Question: Gödel stated that the question of whether the theory of integers can be obtained on the basis of the ramified hierarchy must be considered as unsolved.

    Revised Approaches and Interpretations

    • Davoren and Hazen (1991): This study hints at a liberalization of RTT, allowing propositional functions to hold arguments of appropriate (simple) type but arbitrary order while still maintaining restrictions on the orders of quantified variables in the definition of a propositional function.
    • Wang’s Suggestion: Wang suggests that higher-order induction could prove the consistency of the system with lower-order induction and eliminate more non-standard numbers.
    • Royse’s Development: Royse showed how a truth predicate could be defined for a system of predicative arithmetic of a lower order within a system of higher order, following the model of Tarski.

    By Amjad Izhar
    Contact: amjad.izhar@gmail.com
    https://amjadizhar.blog

  • Cloud Migration: Convert Clients to Xero

    Cloud Migration: Convert Clients to Xero

    The webinar, “Cloud Migration: Tips to Convert Clients to Xero,” presents strategies for accounting professionals to effectively transition clients to cloud-based accounting. Daniel Hustler, a Xero expert, shares insights on positioning the cloud’s value, delivering impactful product demos, and handling common client objections. Key topics include understanding the client’s needs, demonstrating how Xero addresses those pain points through a customized workflow, and emphasizing the benefits for business owners like improved visibility and faster payments. The aim is to empower advisors to confidently guide clients toward cloud adoption, showcasing how it streamlines operations, enhances collaboration, and ultimately contributes to business growth.

    Cloud Migration to Zero: A Comprehensive Study Guide

    Quiz

    Answer the following questions in 2-3 sentences each.

    1. What are the three key considerations to keep in mind when positioning the cloud and Zero to clients?
    2. Why is it important to know your audience when trying to move them to the cloud?
    3. What are three benefits of Zero that commonly resonate with business owners?
    4. What is the “Rule of Three” and how can it be used in client communication?
    5. Why is a product demo a powerful tool for convincing clients to switch to Zero?
    6. What is a client needs analysis, and how can it help you prepare for a Zero demo?
    7. Describe one workflow that can be showcased during a Zero demo.
    8. What are the key elements of the profit and loss report in Zero?
    9. Name three common objections clients have to moving to the cloud.
    10. How can offering Zero training via Zoom webinars help clients adapt to the new software?

    Quiz Answer Key

    1. Knowing your audience, knowing the benefits Zero can bring, and communicating those benefits effectively. It is important to understand the specific needs and pain points of your clients, and you must be able to articulate the advantages of using Zero in a way that resonates with them. Effective communication can make all the difference in whether a client is convinced to switch.
    2. Because understanding their specific needs and technological capabilities is essential. Some clients might be enthusiastic about online solutions, while others might be more resistant or unfamiliar with them. Tailoring your approach to their level of understanding and comfort will increase the likelihood of a successful transition to the cloud.
    3. Business visibility, collaboration, getting paid faster, saving time, and staying compliant. These benefits address common concerns of business owners, such as gaining clarity over their business performance, working more effectively with their advisors, improving cash flow, reducing administrative burden, and avoiding issues with tax authorities.
    4. The Rule of Three is a persuasive communication technique of structuring content in groups of three. Because the human mind remembers in threes, speaking in threes is more memorable. It can be used to frame benefits, features, or reasons for switching to Zero to enhance memorability and impact.
    5. It allows clients to see the benefits of Zero firsthand and how it addresses their specific pain points. A demo can illustrate how the software works in a real-world scenario, making the value proposition more tangible and convincing than simply describing its features.
    6. A client needs analysis is a document of your client’s pain points and goals. It helps you tailor your Zero demo to focus on the features that will be most relevant and impactful for that specific client, ensuring that the demonstration resonates with their individual needs.
    7. A common and impactful workflow is going from the dashboard to creating invoices, managing bills, reconciling bank transactions, and generating reports. Showing how these tasks flow seamlessly within Zero highlights the efficiency and time-saving benefits of the software.
    8. Income, expenses, and net profit or loss. This report gives a quick snapshot of a client’s income and expenses.
    9. Competition with other software, cost concerns, difficulty learning a new system, unstable internet connections and fear of change are all common objections. These concerns often stem from uncertainty about the value proposition, fear of disruption, or technical limitations.
    10. Zoom webinars allow accountants and bookkeepers to provide scalable training to multiple clients simultaneously. They can address common questions and concerns, showcase Zero’s features, and provide ongoing support, helping clients become more comfortable and confident in using the software.

    Essay Questions

    1. Discuss the importance of tailoring your sales pitch to the individual client, as described in the source material. What are the risks of using a one-size-fits-all approach? Provide examples of how you can adjust your communication based on the client’s needs and concerns.
    2. Evaluate the effectiveness of using a product demo as a sales tool for Zero. What are the key elements of a successful demo? How can you ensure that the demo resonates with the client and addresses their specific pain points?
    3. The source material emphasizes the value that accountants and bookkeepers bring to the table when working with clients on the cloud. Discuss the unique role of the advisor in helping clients transition to Zero. How can you leverage your expertise to support clients and ensure a successful implementation?
    4. Analyze the common objections that clients have to moving to the cloud. Develop a strategy for addressing these objections and overcoming client resistance. How can you proactively anticipate and mitigate potential concerns?
    5. Explain the importance of upskilling and staying current with Zero’s features and capabilities. How can continuous learning benefit both you and your clients? What are some strategies for staying informed and expanding your knowledge of Zero?

    Glossary of Key Terms

    • Cloud Accounting: Accounting software and practices that utilize remote servers to perform accounting tasks. Data is stored on the Internet rather than on a hard drive.
    • Zero: Cloud-based accounting software designed for small businesses and their advisors.
    • Positioning: How a product or service is perceived in the minds of the target market.
    • Client Needs Analysis: A detailed assessment of a client’s specific challenges, goals, and requirements.
    • Demo Company: A sample company within Zero pre-populated with fictitious data for demonstration purposes.
    • Workflow: The sequence of steps involved in a particular business process, such as invoicing or bank reconciliation.
    • Value-Based Pricing: Pricing strategy that focuses on the perceived value of the services provided to the client.
    • Flat Fee Pricing: A fixed price for a specific set of services, regardless of the time spent completing them.
    • Zero Partner Program: A program that offers benefits and resources to accountants and bookkeepers who use and promote Zero.
    • Invoice Reminders: Automated notifications sent to customers to remind them about overdue invoices.
    • Bank Reconciliation: The process of matching the balances in an entity’s accounting records for a cash account to the corresponding information on a bank statement.
    • Profit and Loss Report: A financial statement that summarizes the revenues, costs, and expenses incurred during a specific period of time.
    • Aged Receivables Report: A report that lists outstanding invoices by customer and aging category.
    • Hubdoc: A document management tool that integrates with Zero to automate bill and receipt capture.
    • Open-ended Questions: Questions that require more than a “yes” or “no” answer, designed to encourage clients to share detailed information.
    • Legacy Software: Existing software or systems that are outdated but still in use.
    • Value-Based Pricing: A pricing strategy where the price is determined by the perceived value the client receives from the product or service.
    • ISOC Compliant: Meeting the standards set by the International Organization for Standardization (ISO).

    Cloud Migration: Zero Partner Strategies

    Okay, here’s a briefing document summarizing the key themes and ideas from the provided transcript of the “Cloud Migration: Tips to Convert Clients to Zero” webinar.

    Briefing Document: Cloud Migration Strategies for Zero Partners

    Source: Excerpts from “Cloud Migration: Tips to Convert Clients to Zero” webinar transcript.

    Date: (Implied – likely recent based on content)

    Author: Daniel Hustler, Education at Zero (Asia region)

    Purpose: To provide Zero partners with practical tips and strategies to successfully migrate clients to the cloud, specifically onto the Zero platform.

    Key Themes and Ideas:

    The webinar focuses on three core areas to help partners move clients to the cloud and to Zero:

    1. Positioning the Cloud (and Zero) in the Client’s Mind:
    • Know Your Audience: Understanding your target client base is crucial. Consider targeting clients enthusiastic about online solutions, new businesses (without legacy software), and businesses undergoing significant events (expansion, retirement). “If you are new to moving clients to the cloud then you may want to consider starting with clients that are enthusiastic about online Solutions.”
    • Know the Benefits (and Communicate Effectively): Focus on benefits that resonate with business owners, not just accountants. Highlight business visibility, collaboration (the value of the advisor), faster payment/improved cash flow, time savings, and staying compliant. “Instead focus on the benefits that resonates with them and consider bringing those into the conversation.” The rule of three is introduced as a mnemonic device to make the benefits more memorable for the client, “as humans we remember in threes so if you speak in threes then it’s going to be much more memorable for the Eld audence not two not four but three”.
    • Communication is Key: Ask open-ended questions to understand client pain points and goals. Avoid complex accounting jargon. Consider the setting of the conversation. Don’t make it just a sales pitch; focus on understanding the client’s needs. “Things like what are your pain points what are your goals where are you spending most of your time what is holding you back you can get a large list of open-ended questions from the likes of chat GPT now this will help your client do most of the talking from there you can understand their pain points and understand what type of benefits you might want to highlight.”
    1. Delivering an Effective Zero Product Demo:
    • Demo Power: Hustler emphasizes the power of a well-executed demo. “They say A picture speaks a thousand words and I would say a demo speaks a million words because it allows your audience to see the benefits that they receive with their own eyes.”
    • Client Needs Analysis: Before the demo, create a “client needs analysis” based on conversations to identify specific pain points and goals. This informs which Zero features to highlight.
    • Demo Workflow: Use a workflow-based demo that simulates the client’s daily use of Zero.
    • Value-Driven: Continuously refer back to the value the client will receive and how the software addresses their specific pain points.
    • Analogy: Use analogy’s for clients to relate to current activities like having an invoices owing to me graph, so that they don’t need to search through files.
    • Customization: Every user on Zero has access to their own demo company that has fictitious data, so customize to show clients the features that fit them.
    • Relationship: Be mindful of the advisor/client relationship, “don’t make it a sales pitch.”
    • Key Demo Elements (Illustrated in the Transcript):Dashboard: Shows a snapshot of the business’s financial position (bank balance, cash flow, invoices, bills).
    • Sales Overview: Helps manage and follow up on invoices, speeding up payments.
    • Purchases Overview: Simplifies bill management and payment scheduling.
    • Bank Reconciliation: Explains the process and how it provides financial insight.
    • Profit and Loss Report: Provides a snapshot of income, expenses, and net profit/loss, with customization options (e.g., percentage of trading income, profitability by store).
    • Aged Receivables Report: Helps track outstanding invoices, with added contact information for easier follow-up.
    1. Handling Common Questions and Objections:
    • Competition: Avoid feature comparisons. Focus on Zero’s value and the advisor’s value. Emphasize time savings.
    • Cost: Consider value-based pricing/flat fees to bundle Zero into the advisor’s service. Demonstrate the value proposition clearly, showing how Zero resolves pain points and saves time. Ensure clients are on the right Zero plan for their needs.
    • Difficulty/Fear of Change: Reassure clients with support and training, highlight available Zero resources (courses, help). If doing this with multiple clients at once use Zoom.
    • Unstable Internet: Acknowledge the issue, but focus on the value that can be received.
    • Trusting Cloud: Zero adheres to strong security standards such as isoc compliance and major financial institutions use it as well.

    Important Quotes:

    • “Ultimately positioning zero and your practice correctly could be the difference between moving clients to the cloud and getting new clients versus not moving clients at all.”
    • “Consider the right industry for you as well you might have a wealth of Soul Trader clients you might be familiar with the apps in those Industries generally those clients won’t be super complex so in that case you can set them up with the right tools from the GetGo rather than having to investigate a whole lot of apps that you might not be familiar with.”
    • “Collaboration never understand underestimate the value that you can bring as an advisor and how much your clients value that if you can collaborate together through the cloud”
    • “Again if you can showcase the value and the benefits and how it fixes their pain points through those conversations through the demo then already they’re probably quite often more likely wanting to switch anyway.”
    • “No plan and no action will lead to no results what steps can you take to help clients really realiz the benefit of the cloud is it about bringing in some tips around product positioning is it trying out a product demo or is it taking note of some of those key ideas around objection and question handling that we discussed in this webinar.”

    Actionable Takeaways for Zero Partners:

    • Develop a clear understanding of your target client base and tailor your messaging accordingly.
    • Master the art of demonstrating Zero, focusing on the value proposition for business owners, not just accountants.
    • Anticipate and prepare for common client objections, focusing on the value and support you can provide.
    • Leverage the Zero partner program benefits (advisor directory, training, account manager).
    • Take proactive steps to implement these strategies to achieve tangible results.

    This briefing document provides a comprehensive overview of the webinar’s content, equipping Zero partners with the knowledge and tools to effectively migrate clients to the cloud.

    Zero Adoption: Cloud Migration Strategies for Accounting Clients

    FAQ: Cloud Migration and Zero Adoption for Accounting Clients

    1. Why is it important to position the cloud, and specifically Zero, effectively to clients?

    Positioning Zero correctly is critical because it determines whether clients understand the value proposition and are motivated to switch to the cloud. Effective positioning helps them see how Zero addresses their specific business challenges and improves their operations. Without clear communication of these benefits, clients may be reluctant to change, even if Zero could significantly improve their financial processes. Correct positioning may also attract new clients to your accounting practice.

    2. What are the key considerations when positioning Zero to a potential client?

    The three main considerations are:

    • Know your audience: Understand their current tech adoption level, business needs, and pain points.
    • Know the benefits: Identify the advantages Zero offers that are most relevant and valuable to the client, like improved cash flow, time savings, or compliance. Remember benefits for you as an advisor may not be the same as the client.
    • Communicate effectively: Convey these benefits clearly and simply, avoiding technical jargon and relating them directly to the client’s challenges.

    3. What are some good starting points when targeting clients for cloud migration?

    Begin with clients who are already enthusiastic about online solutions and technology, as they are more likely to embrace cloud-based accounting. Also, consider targeting new businesses that don’t have existing legacy software. Evaluate clients based on events taking place in their business as well as your familiarity with the apps used in their industry. It is helpful to pilot with a small number of easier clients to refine your process.

    4. What are some common benefits of Zero that resonate with business owners?

    Business owners often value:

    • Business Visibility: Clarity and real-time insight into their financial performance.
    • Collaboration: Enhanced ability to work closely with their advisor.
    • Faster Payments & Improved Cash Flow: Tools and processes to accelerate invoicing and payment collection.
    • Time Savings: Reduced administrative burden and more time for core business activities.
    • Staying Compliant: Easier adherence to tax and regulatory requirements.

    5. How can I deliver a more effective product demo of Zero?

    To make your demos more impactful:

    • Create a client needs analysis.
    • Tailor the demo to the client’s specific needs and pain points, focusing on relevant features.
    • Use real-life scenarios and workflows to demonstrate how Zero integrates into their daily operations.
    • Continually highlight the value and benefits Zero provides, not just the features.
    • Don’t make it a sales pitch.

    6. What are some common client objections to switching to Zero, and how can I address them?

    Common objections include:

    • Competition: Instead of comparing feature by feature, emphasize Zero’s value and the advisor’s role in maximizing its benefits. Focus on the advisor being able to bring more value as they are also working on the cloud.
    • Cost: Highlight the value and return on investment (ROI) Zero provides through time savings, improved efficiency, and better financial insights. Also make sure they are on the right pricing plan for their use case.
    • Difficulty: Reassure clients that you will provide ongoing support and training, showcasing available Zero resources and making the transition smooth.
    • Lack of trust in the cloud: Reassure clients that Zero has robust security standards.

    7. How important is it to avoid accounting jargon when speaking with clients?

    Avoiding complex jargon is crucial for effective communication. Clients may not understand accounting terminology, which can create confusion and diminish the impact of your message. Using plain language ensures they understand the benefits of Zero and are more likely to embrace the solution.

    8. How can I get clients to take action and adopt Zero?

    Encourage action by having a personal conversation with each client where you focus on their business goals. Follow this by setting up a meeting to discuss their goals and see if the cloud is a fit. In order to scale quickly, consider setting up Zoom webinars. The most important thing is to highlight the benefits they will see.

    Cloud Migration Strategies for Accounting Clients

    Cloud migration involves moving clients to cloud-based accounting systems like Zero, which can be achieved by understanding the client’s needs, demonstrating the value of the cloud, and addressing their concerns.

    Key aspects of cloud migration:

    • Positioning the cloud Consider how you want your clients to perceive Zero and how it fits into their business.
    • Knowing your audience Identify clients who are enthusiastic about online solutions or new businesses without legacy systems.
    • Highlighting benefits Focus on benefits that resonate with business owners, such as business visibility, collaboration, faster payments, time savings, and compliance.
    • Communication Communicate value effectively by asking open-ended questions to understand client pain points, avoiding complex jargon, and understanding the setting of your conversations.

    Product Demo Tips:

    • A product demo is a powerful tool that allows clients to see the benefits with their own eyes.
    • Client needs analysis Use insights about client pain points and goals to create a client needs analysis.
    • Demo the benefits Focus on features that address the client’s specific needs, such as zero analysis reports or direct payments.
    • Highlight value Continually refer back to the value and how it addresses their pain points throughout the demo.
    • Workflows Use workflows to illustrate how they would use Zero day-to-day.

    Handling Objections:

    • Competition Avoid feature battles and focus on the value that Zero and the advisor can bring.
    • Cost Adopt value-based pricing, focus on time savings, and ensure clients are on the right plan.
    • Difficulty Reassure clients with support, showcase Zero resources, and highlight the value and benefits.
    • Lack of trust in cloud Emphasize security standards, the reliability of Zero, and the prevalence of cloud technology in everyday life.

    Xero: Benefits for Business Owners

    The benefits of Zero relate to how it can improve business operations and address common pain points for business owners. The benefits to an advisor may not be the same as to a business owner. Therefore, it is important to focus on the benefits that resonate with the business owner.

    Benefits of Zero:

    • Business visibility Zero can provide clarity over their business performance.
    • Collaboration Clients value the collaboration they can have with their advisor through the cloud.
    • Faster Payment Using Zero can lead to getting paid faster, improving cash flow. Many clients are struggling with cash flow, so this is an important benefit.
    • Saving Time Zero can reduce the amount of time spent on administrative tasks. Clients can spend more time on other things.
    • Staying Compliant Working on the cloud makes it easier to stay compliant with tax authorities.

    Effective Product Demonstrations: A Guide

    A product demo is a powerful tool that allows clients to see the benefits of a product or service with their own eyes. A demo speaks a million words because it allows the audience to see the benefits that they receive.

    Key steps for an effective product demo:

    • Client Needs Analysis Before the demo, insights about a client’s pain points and goals can be used to create a client needs analysis. For example, a client may not know how their business is performing, struggle to get paid on time, spend too much time tracing invoices, have paper bills piling up, and be unsure if their retail shops are profitable.
    • Demonstration of benefits When performing the demo, continually refer back to the value that the client will receive. Use a workflow that illustrates how they would use Zero day-to-day, referring back to the benefits, the value, and how it addresses their pain points. Customize the demo to suit the client’s needs by showing them features that solve their pain points and that they will use. If they aren’t financially savvy, demonstrate something basic like a profit and loss report and how it gives them insight.
    • Demo example When giving the demo, act as if you are the accountant presenting to the client. Start with the dashboard, which gives a quick snapshot of the business. Show how to raise and follow up on sales invoices in Zero. Show how to remove paper bills by checking out the purchases overview screen. Explain bank reconciliation. Show financial reports, such as the profit and loss report.
    • Highlight value Throughout the demo, highlight the value that the client will receive and how it makes things better for them. Use analogies to highlight the value.
    • Avoid a sales pitch The demo should focus on whether or not Zero will be beneficial to the client.
    • Address questions After the demo, clients may have questions and objections, which is normal when switching systems.

    Addressing Client Objections During Cloud Migration

    When helping clients migrate to the cloud, it’s important to address common objections they may have. Here’s how to handle some typical concerns:

    • Competition Instead of comparing Zero to other products feature by feature, emphasize the unique value Zero brings, along with the added value of having you as their advisor on the cloud. Demonstrating the software can address the objection by showing its value.
    • Cost Some accounting partners use value-based or flat fee pricing that includes the cost of Zero in their service. If passing the cost directly to clients, highlight the value they’ll receive. Show them how Zero resolves their specific pain points and the value that both Zero and you as an advisor provide when working together on the cloud. Focus on time savings from automating manual tasks. Also, make sure they are on the right Zero plan to get the best return on investment. As consumers, clients ask themselves if they can afford a service and if the value is worth the money, so showing value is key.
    • Difficulty Reassure clients that you’ll support them throughout the transition. Point them to available Zero resources and support. If you’re migrating multiple clients, consider using Zoom webinars for training. By showcasing the value and benefits of Zero and how it addresses their pain points, clients may be more willing to switch.
    • Lack of trust in the cloud You might mention that Zero adheres to strong security standards and is ISO compliant. Also, note that major banks trust and connect with Zero, and it’s a publicly listed company on the Australian Securities Exchange. Remind them that they likely already use cloud services like online banking and social media in their daily lives.
    • Unstable internet connection Discuss whether the value they receive from Zero is worth the unstable connection. Explore options like portable Wi-Fi connections.
    • Fearful of change Highlight the benefits of the change.

    Cloud Migration: Client Needs Analysis and Effective Communication

    When positioning cloud migration to clients, it is important to perform a client needs analysis. Consider your audience, highlight the benefits, and communicate effectively.

    Knowing the audience:

    • Consider clients that are enthusiastic about online solutions or new businesses without legacy systems.
    • Consider timing, such as during tax season or expansion.

    Highlighting the benefits:

    • Focus on the benefits that resonate with business owners such as business visibility, collaboration, faster payments, time savings, and compliance.
    • Business visibility can provide clarity over business performance.
    • Clients value the collaboration with their advisor through the cloud.
    • Faster payment can improve cashflow.
    • Saving time reduces time on admin tasks.
    • Staying compliant helps businesses avoid issues with tax authorities.

    Communicating effectively:

    • Ask open-ended questions to understand client pain points, and avoid complex jargon.
    • Determine whether it is a meeting to discuss business goals.
    • Take note of the client’s pain points and needs.
    • It should not be a sales pitch, but about what is best for the client.

    For example, a client might not understand how their business is performing, struggle to get paid on time, spend too much time tracing invoices, have paper bills piling up, and be unsure if their retail shops are profitable. Based on the client’s pain points, highlight the value and benefits of cloud migration.

    Convincing clients to switch to the cloud with ease Xero

    are you looking to get more clients onto the cloud and more clients onto zero if so then you’ve come to the right place good morning good afternoon good evening everyone from wherever you’re joining in the world and welcome to this webinar convincing clients to switch to the cloud my name is Daniel Hustler and I look after education here at zero for the Asia region um now in terms of my background my background is in accounting systems it’s also in sales as well so I do have a sales background where I used to sell and onboard businesses onto the zero platform and in my current role I deliver demos and do lots of presentations to people to Showcase Zero’s value um and make sure that they understand how to use it and love our products now the purpose of this webinar today is to give you some tips and tricks that I’ve learned that you might want to try to get more clients onto the cloud ultimately get more clients coming through your door and ultimately growing your practice we do also have a handy takeaway guide so this covers some of the things we’ll be talking about today my colleague Gracie will post a link to that in the chat box very soon alternatively feel free to pull out your phone scan that QR code and we’ll also send you through that takeaway guide in the chat box so what’s on the agenda for today over the next 45 minutes we’re going to cover some tips and tricks that you could use to get more clients onto the cloud and just get them over the line now this will include how you position the cloud in your client’s mind so that way they understand the value the second is that you’ll learn how to demo zero like a pro in my career I’ve performed demos to quite possibly hundreds of thousands of people so I’ll share a few tips and tricks in this space which you can use to get your client over the line they do say an image speaks a thousand words I would say a demo speaks a million words and it can be a really really effective tool to have in your pocket and finally how to handle some of the common questions and objections that we see I do like to customize my sessions according to what the audience are interested in so I’m going to launch a quick poll I’m Keen to understand what you’re most interested in hearing about today it is multiple choice are you most interested in learning about how to position zero in the cloud so the client understands the benefits do you want to deliver an effective product demo do you want to know how to handle some of those common questions and objections but if there’s something else put it in the Q&A box and I’ll do my best to answer it throughout this webinar at some stage so if there’s anything you’re particularly interested in feel free to leave it in that Q&A box now I’ll just leave that running for a couple more seconds I’ll end it in three five 5 4 3 2 1 I’ll end that poll I’ll share the results and it looks like we’ve got quite an even split so 40 roughly 40% want to know how to position zero and its benefits more than half want to know how to deliver an effective product demo and close to 60% are really Keen to understand some ways on how to handle those objections and questions um and we do have a answer in the Q&A which is around improving the ability and understanding of zero and the benefits so don’t worry we will cover that in the webinar as well so thank you now positioning the cloud positioning a product or service is ultimately about deciding how you want your target market to to think about that product or service in this case it’s how do you want zero to sit in the minds of your clients do they understand the value and you might even want to think about how you position yourself in the minds of your clients as an advisor and when you’re positioning say for example zero the there are a few things to keep in mind the first is to know your audience who are you looking to move to the cloud or who are you speaking to you should also know the benefits and the value that you can bring to the table with zero and on top of that you do need to know how to communicate that value effectively and it’s really important not to ignore any of these considerations for example you might know the value and benefit that zero can bring but if you can’t communicate it in a way that your client will understand and see that value then you might not actually end up with the result that you want ultimately positioning zero and your practice correctly could be the difference between moving clients to the cloud and getting new clients versus not moving clients at all um there is no one correct way for this but I’ll share a few tips and ideas in this space which you might want to consider so the first point was around the audience now if you are new to moving clients to the cloud then you may want to consider starting with clients that are enthusiastic about online Solutions those clients are already using a wealth of technology in their day-to-day lives so generally speaking they’re probably going to be easier to switch new businesses are also great because they don’t have Legacy software built-in so that way they can start fresh ultimately cons of the timing and events that are taking place as well are they in the middle middle of a very busy tax period or maybe are they in time of an expansion where they need realtime financials in which case that might be a really great opportunity um even those businesses which are looking to maybe retire soon and sell their business um moving them onto the cloud could be a good opportunity because that gives them real-time financials to sell their business at a higher price um consider the right industry for you as well you might have a wealth of Soul Trader clients you might be familiar with the apps in those Industries generally those clients won’t be super complex so in that case you can set them up with the right tools from the GetGo rather than having to investigate a whole lot of apps that you might not be familiar with and again if you are new to this pilot with a small number of clients and refine your process over time start with those easier clients before you move on to those more complex ones the second point we saw was the benefits knowing those benefits and this is important because the benefits to you as an advisor may not necessarily be the same to a business owner for example while one of the benefits that I absolutely love is power report customization a business owner may not necessarily resonate with that so instead focus on the benefits that resonates with them and consider bringing those into the conversation now what I found in my experience is that a lot of business owners and clients tend to resonate with some of the following so business visibility being able to get clarity over their business and where they’re at this is especially true for those businesses that currently don’t have that visibility and are currently managing their business based on what they see in their bank statement collaboration never understand underestimate the value that you can bring as an advisor and how much your clients value that if you can collaborate together through the cloud getting paid faster cash flow is top of mind for clients we know many clients are struggling with cash flow especially at the moment with those Rising costs so if you tell your clients that there is a way to help them get paid faster improve their cash flow then you’ve already got them hooked and for a lot of clients that’s probably going to resonate much more than say for example powerful report customization Saving Time people want to spend less time on admin and more time on doing the things that they love whether that be spending time with their friends and their family or maybe just developing a really great product or service for their own customers and also staying compliant I’m sure no one wants a letter from the local tax Authority telling them that they’ve being uncompliant so if they’re on the cloud and you can work with them closely together then this is a really easy way to solve this so have these benefits ready in in your pocket there are some benefit as well and when talking to the to to the benefit when talking to your clients about the benefits consider maybe using three of these and see how it works for you three is a very magic number and it’s me memorable in the human mind so I’m going to ask a question can I get it if you have heard of the rule of three before the rule of if you’ve heard of that then can you click the raise hand Link in the zoom toolbar so if you’ve heard of the rule of three so it looks like a very small number of us have heard of the rule of three basically it’s a persuasive technique used by public speakers writers and even politicians as humans we remember in threes so if you speak in threes then it’s going to be much more memorable for the Eld audence not two not four but three for example life liberty and the pursuit of happiness government of the People by the people for the people location location location stop look and listen friends Roman countrymen these are all used and threes these are examples of the rule of three and it becomes very memorable in the uh in the human’s mind but knowing the audience and kn knowing the value is one thing being able to communicate it is just as important if not more important you might have the greatest product or service in the world but if you don’t communicate it in a way where the audience will understand then it’s going to be a whole lot more difficult to get the outcome that you desire so again there’s no one way to get this right but I’ll share a few tips and ideas that you might want to consider in your client conversations and see how it goes some of these you might be aware of some of these you might not be aware of the first is to ask open-ended questions things like what are your pain points what are your goals where are you spending most of your time what is holding you back you can get a large list of open-ended questions from the likes of chat GPT now this will help your client do most of the talking from there you can understand their pain points and understand what type of benefits you might want to highlight again it’s helpful because you will understand those pain points one of the questions that I asked at a business owner at an event recently was what is keeping you awake late what is keeping you up late at night and what they said is they spent all of their evenings sending out invoices in Microsoft Word and they’re struggling to keep on top of payments um now the reality is is if they were aware of let’s say for example um the ability to send invoices through zero and the ability to accept those online payments um that would have removed that whole pain point and and they were much more receptive when they saw that zero had this particular ability to do that um I would also say avoid complex jargon where possible as we know um a lot of clients don’t understand accounting jargon and terminology things like accounts receivable accounts payable statement of comprehensive income if you add a lot of confusing terminology it’s probably going to take away the message that you the underlying message that you ultimately want to convey but of course it does depend on who you’re speaking to as well if you’re speaking to a financial controller they’ll probably want you to speak their language also consider the setting is it a meeting that you’ve set up with them to discuss their business goals or are you just passing by their office and you say hey move switch to the cloud and when you’re in the conversations take note of their pain points and their needs because that’s going to be very helpful for when you want to talk about the benefits or even when you want to perform a demo and finally really important here it’s not a sales pitch pitching a software can sometimes come across as impersonal so one idea would be to set up a meeting to understand their pain points and goals but again this just depends on your relationship with them and sometimes zero might not be the best option for them and if that’s the case that’s perfectly fine ultimately it’s all about what is best for the client which again may not always necessarily be zero and that’s perfectly fine now after we’ve had those conversations with a client we might even want to consider bringing in a product demo a demo is a very powerful tool to have in your pocket as I mentioned earlier they say A picture speaks a thousand words and I would say a demo speaks a million words because it allows your audience to see the benefits that they receive with their own eyes now again I like to keep my sessions fairly interactive so I’m going to launch a second poll you should see it appear on your screen shortly and don’t worry it’s completely Anonymous um how much do you agree with this statement I am confident in running an effective product demo do you strongly agree with the statement do you somewhat agree with the statement do you somewhat disagree with this statement or do you strongly disagree with this statement so we’ve got a lot of answers flowing through I’ll just give a few more seconds to answer that and I’ll end that poll in 5 4 3 2 1 and I’ll just go ahead and share those results so it looks like about 12% of us strongly agree more than half of us somewhat disagree so somewhat agree and then the rest are about 30% are falling and either somewhat disagree or strongly disagree um thanks for those answers so in my role it’s basically to perform product demos right so I’ve done product demos to hundreds of thousands of people and it’s very very powerful because it really showcases the value that a product or service can bring and it can make people want to use it so no matter what spectrum what what area you’re falling in on that poll hopefully I can bring in a few tips and tricks for you in the space now before we do jump into the demo in the earlier conversations with your clients you may have found a number of pain points or goals that they’re working towards especially if your asking those open-ended questions maybe you’re already familiar with with what their goals are and you can use these insights to create what is known as a client needs analysis in this case let’s assume I’ve had a conversation with a client and these were some of the things that I noted the client has no idea how their business is performing they feel like they’re Flying Blind they struggle to get paid on time they spend too much time tracing invoices they have paper bills piling up on their dining room table and they’re not sure if any of their retail shops are profitable this information is gold for my product demo because I know exactly what I need to show to wow them and get them excited about the product with that in mind um I would also let’s take a look at the time where running with that in mind let’s take actually I would love a couple of suggestions from the crowd actually so in the Q&A box I would love to hear what features you would consider demoing in this in the demo what features would you demo based on this client needs analysis so can I get a few ideas from the Q&A box what features would you demo zero analysis report direct payments hubdoc and online payments tracking reports these are all fantastic answers um p&l absolutely so these are all some really great features that you can highlight in your demos depending on what your client needs are so with that in mind I’ll actually jump into zero and take a look at how I would demo this based on on that information we have at hand when doing this demo I’ll assume that I’m the accountant and I’ll PR present back to you as if you are the client a few things to note here is that I’ll use a workflow which illustrates how they use zero daytoday and what you’ll see is that I’ll continue to refer back to the benefits the value and how it addresses their pain points so we’ll get started with the St demo and again I’ll assume that you’re the client the first screen that you’re going to log on land on when you log to zero is going to be the dashboard and the dashboard is to give is designed to give you a quick snapshot of your business the moment that you log in so that way you have all that information at your hand I can see how much money is in my bank account so that way I don’t need to log into internet banking in order to figure that out I can see how much I can see the total cash in and cash out graph because we do understand that for businesses cash flow is king um we do understand as well that sometimes you might not know where you’re spending your money so we you can also add any accounts you want to add through to the account watch list moving further below we have the invoices ow to you graph so rather than spending your mornings trying to figure out who owes you money and chasing those online chasing those payments I can see that information the moment that I log in and that way I can get paid faster further down below we also have the bills you need to pay graph so again we’ll be able to see all of the bills that we need to pay so that way they’re not piling up on that dining room table now we do understand as well that you spend a lot of time sending those sales invoices so let’s take a look at how you raise and follow up on sales invoices and zero the sales overview screen is designed to give you a snapshot of the status of all of your invoices we can see what’s in draft we can see what’s a waiting payment we can see what’s overdue likewise a list of the customers that owe us the most money so again this is already giving us some great Insight around who we need to follow up on to get paid faster and we don’t have to spend all our evening searching through trying to figure this out and if we want to raise an invoice it’s really easy in this case I just need to select the who which will be Bayside Club I can also see how much they currently owe maybe we might want to follow up with them on those unpaid invoices before we send another the due dates have autop populated for us as well as the invoice number now we know you spend a lot of time chasing those unpaid invoices so why not add a big pay now button to the top of your invoices which your customers can click to pay you now rather than spending all of my time typing up the same detail in Microsoft Word I can simply set up an item that I’ve sent up set up I can preview how the invoice will appear both in the web and the mobile version I can go ahead and email this off the email template will autop populate for me and what that means is I don’t need to continually draft up an email over and over again I can send this off and look how quick and easy that was compared to maybe the current process that we’re using of sending those invoices through Microsoft Word but of course we do also understand that um we want to follow up on those unpaid invoices so in this case we’re going to choose to turn on the friendly little robots in zero called invoice reminders now in this particular case I’m going to choose to automatically email a customer when whenever an invoice is seven days overdue 14 days overdue 21 days overdue or maybe I might want to send them a friendly little reminder when an invoice is due in 3 days not only is this going to help me get paid faster not only is this going to save time but it’s also going to avoid those awkward followup conversations which none of us like to have now in order to remove those paper bills piling up on the dining room table we can check out the purchases overview screen this has a full list of all of the bills that we need to pay and if we want to get these bills into zero it’s actually very easy every single organization in zero has their own unique bills email address if I was to if we were to forward a bill through to this email address then it will be automatically created in zero as we can see here with this forwarded bill now after we’ve approved those bills maybe we might want to schedule to pay a number of these bills say for example on the 20th of the following month so that way on December the 20th we know exactly how much money we need in the bank in order to pay those bills so that way we feel we won’t feel like we’re Flying Blind now we also understand as well that we really want to get oversight over how your business is performing and part of that is through a bank reconciliation which we’ll take a look at now now as a business owner you might not be familiar with what a bank reconciliation is so let me explain on the left hand side we have all of those Bank transactions in that happen in your bank account so your actual physical bank account and on the right hand side we need to say what it is for for example is it for sales is it for maybe some expenses is it for power is it for rent etc etc so let’s take a look at how it works we can see further down below that we have a statement line for Cooper Street Bakery the who in this case is for Cooper Street Bakery the account code which is what we spent it on was for a staff lunch so entertainment and I’ll just say staff lunch and this is what is going to give us insight about our business and on our financial reports but if I scroll further down down below you will be able to see that we have a number of another Cooper Street Bakery line zero has remembered the details from last time it’s autop populated that information for us all we have to do is click okay and that’s going to update our financial reports which you’ll see in a moment and also give you the type of visibility that um you may be wanting um on top of that since we’re both working on the cloud um if you’re not comfortable with this process I can even do that for you so that way we can make sure you’ve got the upto-date financials and can make those better decisions so let’s take a look at those financial reports the first report that I want to show is the profit and loss report now the profit and loss report is a very useful report at the moment I understand you don’t have this type of ins currently but to provide some context this report is designed to give you a quick snapshot of how much what what your income is where your expenses are going and what you’ve got left over which is your net profit or loss but with a few minor tweaks we can get some really great insight about your business one example is the percentage of trading income so this will help you to identify where your costs are high relative to your income for example I can see that for every dollar in sales about 177% is on motive will be on Motor Vehicle expenses so this is the type of insight you may not have had before um you also have I know that there are multiple stores as well that are being operated so if you want to see which stores are profitable then that’s very easy you’ll actually be able to get that side by side comparison simply listed here so again you’ll be able to see which of your stores are profitable and which are not now one other report that I thought I would show is going to be the age receivables report um again understand that quite a bit of time is being spent chasing those unpaid invoices and this report is helpful because it’s going to show what is owed to us and who owes us money a very helpful report but with a few minor changes we can get some really great Extra Value in this case I’ll add the phone the primary person the mobile column email and I’ll click update so at a glance we’ll have all the contact details that we need to follow up on those unpaid invoices we know who to contact in the business we know the person name we know their phone they know their email everything that we need to get paid faster is listed right here and on top of that is going to save us time around searching through the um your contact details trying to figure this information out so that’s it in the space of I would say about 12 minutes performed a very highly effective demo which continually refers back to the value that the client will receive now this particular demo is something that I’ve done many times before um it usually gets a lot of high ratings um so I thought I’d just share a few other tips for you when performing a demo again entirely up to you if you want to use these or not but these are just some ideas to see if it works for you the first is to consider the relationship between you and your client what is your relationship with them again you know don’t make it a sales pitch um but consider the relationship I would also suggest to use the demo company every single user on zero has access to their own demo company it’s prepopulated with fictitious data so use it where possible also customize the demo to suit your client needs ideally show them features that solve their pain points and features that they will use for example if they’re not someone that is financially Savvy or doesn’t do a lot of complex reporting then don’t show them complex reporting don’t show them things that will make us as accountants excited just show them something basic like a profit loss how it gives them insight and maybe that percentage of trading income if they don’t use multicurrency then we don’t need to show that either um value value value cons continually highlight the value that they receive and how it makes things better for them use analogies like I did which was as an example by using zero and chasing those unpaid inv and having that invoices o to to me graph I don’t need to spend my morning searching through different folders on my computer trying to figure it out those are tasks which they are already doing so the so continually highlighting the value will really resonate with them also workflows work well in this demo we went from the dashboard through to invoicing through to bills to bank wck and then through to reporting a workflow works really well because it shows how they will use it daytoday and in a way that makes sense so that way it doesn’t feel disjointed and finally it’s not a sales pitch ultimately we’re focused on whether or not zero will be beneficial to our client we don’t want to force something on them which they are not comfortable with we just want to highlight the benefits so what I’ve actually usually found is that off the back of a highly effective demo quite often you will see a client’s face light up in excitement sometimes though they may have some questions and also some objections which is again perfectly fine as well and perfectly reasonable if they’re making a switch on their systems but I do like to keep again my sessions interactive and I like to customize it to my audience I will cover off a few objections and ideas that I sometimes speak to accountants about but if you have anything that you want to know about then can you let me know in the Q&A box what type of objections do you sometimes get let me know in that Q&A box and I’ll try my best to um answer those questions along the way so um not making enough money at the moment yes um employee onboarding unstable internet connections absolutely price can’t justify the cost the competition yes um clients who don’t trust the cloud that’s that that’s one as well so um Gracie if you could just leave these questions open I’ll try to answer these along the way I have got three qu object qu three objections listed and I’ll talk through these ones first and hopefully this should answer some of them the first is competition here are a few ideas and suggestions in the space the first is to avoid feature battles don’t start comparing one product to another instead focus on the value that zero can bring and the value that you can bring as an advisor when you’re both working on the cloud quite often this particular objection can be addressed through the demo where they actually see the value that they receive if you start comparing features one product versus another it ends up in a spiral of taking away the underlying message you want to push which is the value um focus on the time savings as well and how doing things in the cloud is much more simple this one pops up it’s popped up a few times in the Q&A box which is cost individual circumstances ultimately depend how you address this so many of our accounting and bookkeeping Partners have adopted value based pricing and flat fee pricing that lets them bundle the cost of zero into their service that way the client has one bill to manage which includes their zero software and the cost isn’t an issue but if you are passing the cost directly to your clients then address this by going back to the value they receive as consumers when we look at a product or service there are probably a couple of questions we ask ourselves the first is can we afford it some clients won’t be able to afford it and that’s perfectly fine but if we can afford it then we ask is the value I receive worth the money we spend so if you can show the value that they receive very clearly through the conversations and through the demo then cost often doesn’t become an issue if you can wow them show them those amazing features and show them how it will make a difference in their life then you’ll sometimes be surprised at how um how cost doesn’t always become an issue show how it resolves those pain points and communicate the value that not just zero but you as an advisor can bring to the table when you’re both working on the cloud um again focus on the time savings as well they’re probably spending a lot of time and costs on manual tasks so if you focus on how zero can free up that time by automating those manual tasks then that in itself is actually a lot of value um another area which is sometimes overlooked is making sure that they’re on the right plan that will deliver them the best return on the right best return on investment sometimes clients aren’t put on the right plan which will deliver them the most value um and the third one is difficulty so I’m on my current system I don’t know how to use the new system so just reassure the clients tell them that you’ll be with them every single step of the way that you’ll support them through their Journey if you’re doing this with multiple clients at at once you know a really good way to support them is just even through Zoom webinars at zero we use zoom webinars to scale our training across our accounting partners and our small business clients in bulk so maybe this is even an opportunity for you but definitely reassure your clients they highly value you as their trusted advisor showcase to them the zero resources available as well show them zero show them the courses that are available show them how they can get help and support if needed and again just highlight the value and benefits that they receive if you can showcase the value and the benefits and how it fixes their pain points through those conversations through the demo then already they’re probably quite often more likely wanting to switch anyway um fearful of change again you know that’s a great one C I’m just looking at the Q&A box some customers are scared of change completely understandable again just highlight the the benefit um one is hubdoc is difficult to use can’t sort out documents easily um again for that one reassure them support them um show them the resources that are available um clients who don’t trust the cloud so if a client doesn’t trust the cloud so thank you Courtney for your question um there are a few suggestions here um one you could say is that zero for example is um adheres to the strongest security standards we are isoc compliant some of the biggest banks in the regions trust zero they connect with us zero is a publicly listed company on the Australian Securities Exchange um and of course we use cloud daytoday anyway in our day-to-day lives so internet banking um Facebook all of these tools that they’re probably using anyway is already on the cloud um we have covered quite a lot there are just a few other question things I’d want to tick off so just to recap what we discussed we spoke about positioning the cloud and your service in here there were three key considerations to be aware of the first was to to know your audience to know the benefits that can bring those audience because again the benefits for us an advisor may not necessarily resonate with a a business owner and the third was being able to communicate those benef benefits really effectively we also took a look at how to demo zero like a pro maybe give this a try in yourself um just a couple of tips in this space include avoiding complex jargon continually referring back to the benefit and also um using a workflow is a really good idea as well demos are also great for training clients and bulk across zoom and I do I do know that some partners actually use demos as a way to um get new clients through the door and also we took a look at some suggestions to um handle some client questions um don’t forget about the benefits that you receive as part of the zero partner program as well um promote your practice on the Zero advisor directory this is available to bronze partners and above it’s a great way to grow your client base help you get new clients and again it’s available to bronze partners and above um continue to upskill yourself with our free education content and I would also suggest if you’re wanting to grow your firm spend take the time to connect your account manager they’re dedicated to helping your practice grow and Thrive so speak to them about what other partner program benefits are available now if you’re not on the partner program already but you’re an accountant or bookkeeper in in in practice then I will also post a link to the partner program in the chat box so I’ve posted it now before we wrap up with some final thoughts let me level you with this quote no plan and no action will lead to no results what steps can you take to help clients really realiz the benefit of the cloud is it about bringing in some tips around product positioning is it trying out a product demo or is it taking note of some of those key ideas around objection and question handling that we discussed in this webinar that actually does bring us to the end of the webinar I’m going to take a look to see if there are any unanswered questions but if you do have any more question question please continue to put them in that Q&A box and um I’ll do my best to answer them so one of them is how to call to action to ask client to join so Unice it sounds like how should I begin the conversation um around a move to the cloud um there is no right or wrong way ultimately it depends on your relationship with your client but sales pictures depending on your client can sometimes seem impersonable so maybe one idea that I have off the top of my head is maybe even just set up a meeting to discuss their their business goals their pain points um and from there you can see whether or not a switch to the cloud might be helpful for them um and thank you Rowena that was really really nice cont uh comment we absolutely love to hear that you thought this webinar was engaged in um clients who have unstable internet connections that was a that looks like that was uh what’s the word an objection oh that’s that’s definitely a tough objection I guess for unstable internet connection it will be very much around you know do they is the value that they receive worth that unstable internet connection um or maybe if they’ve got let’s say for example um hotspot or something like that will which will allow them to continue to use zero there’s all sorts of of Technology available out there including portable Wi-Fi connections portable internet connections that customers can use to try and get better internet connections um but I think everything has been out answered thank you all for listening to that I really really appreciate it again register for more webinars and we’ll see you at another one in the future and please let us know what you thought in that um feedback survey as well but again thank you everyone for listening and we look forward to seeing you at another webinar in the future take care everyone bye

    By Amjad Izhar
    Contact: amjad.izhar@gmail.com
    https://amjadizhar.blog

  • QuickBooks Online: Mastering Your Chart of Accounts

    QuickBooks Online: Mastering Your Chart of Accounts

    This source provides a detailed guide to understanding and customizing the Chart of Accounts within QuickBooks Online. It emphasizes the importance of the Chart of Accounts as the accounting system’s core, where transactions are categorized for financial reports. The guide explains how to access, sort, and modify the Chart of Accounts to fit specific business needs, including importing custom charts and creating new accounts. It also addresses common challenges such as managing beginning balances, dealing with uncategorized transactions, and merging redundant accounts, offering solutions for cleaning up and organizing the Chart of Accounts for effective financial reporting. Finally, it walks the user through adding or deactivating accounts and turning account numbers on and off.

    QuickBooks Online: Chart of Accounts Mastery

    Quiz:

    1. What is the chart of accounts and why is it important? The chart of accounts is a list of categories used to organize all transactions in QuickBooks Online. It is the heart of the accounting system, providing the framework for categorizing income and expenses and creating financial reports.
    2. How do you access the chart of accounts in QuickBooks Online? To access the chart of accounts, click on the gear menu on the top right of the screen, then click on “Chart of Accounts.”
    3. What are the two principal financial statements that utilize the chart of accounts? The two principal financial statements that utilize the chart of accounts are the Balance Sheet and the Profit & Loss (Income Statement).
    4. Explain the difference between balance sheet accounts and profit and loss accounts. Balance sheet accounts (assets, liabilities, and equity) have a running balance and reflect a company’s financial position at a specific point in time. Profit and loss accounts (income, cost of goods sold, expenses) track financial performance over a period of time.
    5. What is “opening balance equity” and how is it affected when you enter beginning balances for asset and liability accounts? Opening balance equity tracks the accumulated value of a business before accounting in QuickBooks. Adding an asset increases opening balance equity, while adding a liability decreases it.
    6. Why is it important to reconcile credit card transactions in QuickBooks Online? Reconciling credit card transactions ensures that the beginning balance is accurate and allows users to catch up on any transactions from the previous year, ensuring accurate financial reporting.
    7. How do you create sub-accounts, and why might you use them? To create a sub-account, when creating a new account, select the “Is sub-account” option and choose the parent account. Sub-accounts are used to further categorize and organize accounts, providing more detailed financial information.
    8. How do products and services connect to the chart of accounts? Products and services tie, or map, to accounts in the chart of accounts. When creating transactions with those items, QuickBooks knows where to categorize them.
    9. What is the purpose of the “uncategorized expense” account, and why can’t it be deleted? The “uncategorized expense” account serves as a default category for transactions that QuickBooks cannot automatically classify. This account cannot be deleted because QuickBooks uses it to fulfill a specific mechanic.
    10. How do account numbers affect the order in which accounts are displayed in QuickBooks Online, and how do you enable account numbers? Enabling account numbers in QuickBooks Online orders the chart of accounts numerically instead of alphabetically. To enable account numbers, go to “Account and Settings,” then “Advanced,” and turn on “Enable account numbers.”

    Essay Questions:

    1. Discuss the importance of a well-organized chart of accounts in QuickBooks Online for effective financial management and decision-making. Provide specific examples of how different account classifications (assets, liabilities, equity, income, expenses) contribute to a comprehensive understanding of a business’s financial health.
    2. Explain the process of setting up a chart of accounts for a new business in QuickBooks Online. What factors should be considered when creating new accounts and assigning account types and detail types?
    3. Describe the best practices for maintaining and updating a chart of accounts over time. How should businesses handle account reconciliations, and what steps should be taken to ensure data accuracy and consistency?
    4. Compare and contrast the balance sheet and profit and loss statement, emphasizing the role of the chart of accounts in generating these financial reports. How do different account categories (e.g., assets, liabilities, income, expenses) contribute to the information presented in each statement?
    5. Analyze the impact of chart of account design on financial reporting and compliance. How can a well-structured chart of accounts facilitate the preparation of accurate tax returns and other regulatory filings?

    Glossary of Key Terms:

    • Account Type: A classification of accounts in the chart of accounts (e.g., Asset, Liability, Equity, Income, Expense).
    • Balance Sheet: A financial statement that reports a company’s assets, liabilities, and equity at a specific point in time.
    • Chart of Accounts: A list of all the accounts used to record transactions in the general ledger of a business.
    • Cost of Goods Sold (COGS): Direct costs attributable to the production of the goods sold by a company.
    • Credit Card: A liability account used to track balances owed on credit cards.
    • Detail Type: A further categorization of accounts within an account type, providing more specific classifications.
    • Equity: The owner’s stake in the business, representing the residual value of assets after deducting liabilities.
    • Expenses: Costs incurred in the normal course of business to generate revenue.
    • Fixed Assets: Long-term tangible assets used in a company’s operations (e.g., vehicles, equipment).
    • Income: Revenue generated from the sale of goods or services.
    • Liabilities: Obligations or debts owed by a business to external parties.
    • Long-Term Liabilities: Obligations due more than one year in the future.
    • Opening Balance Equity: An equity account used to record the initial value of a business when setting up QuickBooks Online.
    • Profit and Loss (P&L) Statement: A financial statement that reports a company’s revenues, expenses, and net income over a period of time. Also known as an Income Statement.
    • Retained Earnings: The accumulated profits of a company that have been retained for reinvestment or other purposes.
    • Sub-Account: An account that is a child of another account. Used to provide more detailed information about transactions recorded to the parent account.
    • Transaction: Any activity that affects the financial position of a business (e.g., sales, purchases, payments).
    • Uncategorized Expense: A default expense account used for transactions that cannot be automatically categorized.

    QuickBooks Online: Mastering Your Chart of Accounts

    Okay, here’s a detailed briefing document summarizing the key themes and ideas from the provided QuickBooks Online Chart of Accounts source.

    Briefing Document: QuickBooks Online – Mastering Your Chart of Accounts

    I. Overview:

    This source is a video transcript focusing on the Chart of Accounts within QuickBooks Online (QBO). The speaker emphasizes that understanding and properly utilizing the Chart of Accounts is crucial for effective accounting within QBO. It is described as “the heart of the accounting system.” The tutorial covers accessing the Chart of Accounts, understanding its structure, creating new accounts, importing a chart of accounts, and linking accounts to products and services. It also touches on how the chart of accounts impacts financial reports like the Profit & Loss statement and the Balance Sheet.

    II. Key Themes and Ideas:

    • Importance of the Chart of Accounts: The video stresses the critical role of the Chart of Accounts in organizing financial data within QuickBooks Online. The speaker states, “the most common mistake that QuickBooks users make is they don’t get very much acquainted with the chart of accounts and then they really don’t know how to categorize transactions.” Proper categorization ensures accurate financial reporting.
    • Structure and Organization:The Chart of Accounts is a list of categories used to organize all transactions.
    • It can be sorted by name, account type, detail type, or balance.
    • Sorting by account type is logical, as it aligns with the order of accounts on financial statements (Balance Sheet and Profit & Loss).
    • The Balance Sheet accounts (assets, liabilities, and equity) display a running balance in the “QuickBooks Balance” column.
    • Profit & Loss accounts (income, cost of goods sold, expenses) do not show a running balance.
    • Accessing and Navigating the Chart of Accounts: The speaker explains how to access the Chart of Accounts by clicking on the gear menu and then “Chart of Accounts.” Once inside, users can sort the accounts by various criteria.
    • Account Types and Financial Statements:Balance Sheet Accounts: Bank accounts, accounts receivable, assets, liabilities, and equity.
    • “All those accounts from Equity to the top, they belong to your balance sheet. Now the other way to quickly tell that the account belongs to the balance sheet is there’s going to be a column called quick QuickBooks balance and there’s always going to be a running balance in the QuickBooks balance column”
    • Profit & Loss Accounts: Income, Cost of Goods Sold, Expenses, Other Income, and Other Expenses.
    • “everything from income cost to good so expenses other income other expenses those are going to belong in your profit and loss account”
    • Creating New Accounts:The video details the steps to create new accounts, emphasizing the importance of selecting the correct account type and detail type.
    • A key aspect is setting the “When do you want to start tracking your finances in QuickBooks from this account?” date. This determines when the opening balance will be booked (the prior day).
    • Examples are provided for creating bank accounts, fixed assets (vehicles), loans, and credit card accounts.
    • Opening Balances:Entering opening balances is essential when starting to use QuickBooks Online.
    • For asset accounts, the opening balance increases the “Opening Balance Equity” account.
    • For liability accounts, the opening balance decreases the “Opening Balance Equity” account.
    • The Opening Balance Equity reflects the net worth of the business at the start of tracking finances in QBO.
    • Subaccounts: Subaccounts allow for more detailed tracking within a general account category. The example used is creating individual vehicle listings as subaccounts under a main “Vehicles” fixed asset account.
    • Credit Card Account Considerations: The video highlights the nuances of setting up credit card accounts, especially when the statement closing date doesn’t align with the month-end. Two options are presented: enter transactions for the overlapping period or combine balances as of the desired start date. It also covers situations where multiple cards exist under one master account, requiring the creation of sub-accounts for each card user.
    • Importing Chart of Accounts: Users can import a Chart of Accounts from an Excel or CSV file. This is especially helpful for accountants or users with pre-existing Chart of Account templates.
    • The speaker says that, “the way I import the chart of accounts into QuickBooks is I export this into Excel and then I go uh in here into… the chart of accounts click on the drop down menu and then click on import”
    • Linking Products and Services to Accounts: The video explains how to link products and services to specific income or expense accounts. This connection is crucial for automatically categorizing transactions created from invoices or sales receipts. The speaker shows how to navigate to the product and service list, create a service and assign its income account.
    • Cleaning Up and Customizing the Chart of Accounts:Inactive (deleted) accounts can be hidden or grouped under a general category (e.g., “Old/Deleted Accounts”) to declutter financial reports.
    • Redundant accounts can be merged to simplify the Chart of Accounts.
    • Account numbers can be enabled to provide a more organized view (accountants prefer this).
    • The ultimate goal is to have as few accounts as possible that provide the most meaningful information for your business needs.
    • Managing Profit and Loss Accounts:The video shows how to create custom income and expense accounts.
    • It also shows how to make default accounts inactive if they are not needed
    • “uncategorized expense is one that you cannot change QuickBooks gives you that you have to leave that in there because when you connect your Banks and QuickBooks just so know where to categorize stuff that’s where it’s going to put it it’s going to put it under uncategorized expense”
    • Transition to Retained Earnings
    • The speaker recommends that you perform a journal entry to move the opening balance equity to retained earnings.
    • “in the accounting World opening balance Equity is actually referred to as retain earnings retain earnings so what I’m going to do is I’m going to take this number…I’m going to do a journal entry to move it out of op balance equity and into rain earnings”
    • Report CustomizationThe speaker shows how you can make the Profit and Loss report show all rows and active columns to see all of the accounts.

    III. Important Considerations:

    • QuickBooks Online Version Differences: The video notes that the appearance of certain screens, particularly the “New Account” pop-up, may vary depending on the QBO version. Functionality, however, remains consistent.
    • Accountant Assistance: For complex tasks like entering accumulated depreciation for fixed assets or handling journal entries, the video suggests seeking help from an accountant.
    • Dynamic Nature of QuickBooks: The video acknowledges that QuickBooks is constantly evolving, particularly with changes to report interfaces.

    IV. Target Audience:

    This video is primarily aimed at beginners and intermediate QuickBooks Online users who want to gain a deeper understanding of the Chart of Accounts and its impact on their financial reporting. It is also useful for accountants who may want to import their own charts of accounts.

    QuickBooks Online: Mastering Your Chart of Accounts

    FAQ on Mastering Your QuickBooks Online Chart of Accounts

    1. What is the Chart of Accounts in QuickBooks Online and why is it important?

    The Chart of Accounts (COA) is the backbone of your accounting system in QuickBooks Online. It’s a comprehensive list of categories used to organize all your financial transactions. By categorizing income and expenses appropriately, you can generate accurate and meaningful financial reports, such as the Profit and Loss statement and the Balance Sheet. Familiarity with the COA is crucial for proper categorization of transactions as they come in from your bank and credit card feeds, leading to better financial insights.

    2. How do I access and navigate the Chart of Accounts in QuickBooks Online?

    To access the Chart of Accounts, click on the gear icon in the top right corner of QuickBooks Online and select “Chart of Accounts.” You can sort the list by name, account type, detail type, or balance by clicking on the respective column headers. Sorting by account type is generally recommended as it displays accounts in the order they appear on financial statements (Balance Sheet accounts first, followed by Profit & Loss accounts).

    3. What are the main sections of the Chart of Accounts and what type of accounts do they hold?

    The Chart of Accounts is primarily divided into two main sections, corresponding to the two primary financial statements:

    • Balance Sheet Accounts: These accounts show the financial position of your business at a specific point in time. They include:
    • Assets (e.g., Bank accounts, Accounts Receivable, Fixed Assets)
    • Liabilities (e.g., Accounts Payable, Credit Cards, Loans)
    • Equity (e.g., Owner’s Equity, Retained Earnings)
    • Profit & Loss (Income Statement) Accounts: These accounts track your business’s financial performance over a period of time. They include:
    • Income (e.g., Sales, Service Income)
    • Cost of Goods Sold (direct costs associated with producing goods or services)
    • Expenses (e.g., Rent, Utilities, Salaries)
    • Other Income & Expenses (e.g., Interest Income, Loss on Sale of Assets)

    4. How do I add a new account to my Chart of Accounts and what are the key considerations when doing so?

    To add a new account, click the “New” button in the upper right corner of the Chart of Accounts. A window or drawer will appear (the interface may differ slightly depending on your QuickBooks Online version). Choose the appropriate account type (e.g., Bank, Fixed Asset, Income, Expense), then select a detailed type that best describes the account’s nature. Give the account a clear and descriptive name (including the last four digits) to identify the account easily. Finally, if applicable, enter a starting/opening balance and the date for tracking transactions from the account.

    5. How do I enter opening balances for existing accounts and why is it important to do this correctly?

    When setting up QuickBooks Online, it’s crucial to enter accurate opening balances for all existing accounts. This involves selecting the date that your tracking finances will begin with, such as Jan 1st 2024, and entering balances as of the last date (December 31st, 2023 in this example). For bank accounts, use the ending balance from the December bank statement. For fixed assets, it could be original purchase price minus depreciation. For loans, use the actual outstanding loan balance. Credit cards can be tricky as the closing date may not be the end of the month, so use the ending balance from the closest statement and account for any in-between transactions to align with your start date. Inaccurate opening balances can distort your financial reports from the outset.

    6. How do Sub-Accounts work in QuickBooks and how should I name them?

    Sub-accounts allow you to create a hierarchical structure within your Chart of Accounts for more detailed tracking. For instance, you might have a main “Vehicle” fixed asset account and then sub-accounts for individual vehicles (“Ford F-150 White”). Another example is having a Chase rewards plus INC credit card main account, with sub accounts that name all the various users. To create a sub-account, check the “Is sub-account” box when creating or editing an account and select the parent account from the drop-down menu. You need to be very careful to select an account from the same category. Sub-accounts provide greater granularity while keeping your main financial statements organized.

    7. How do Products and Services relate to the Chart of Accounts and how do I connect them?

    Products and Services are the individual items you sell or buy in your business. Each product or service is linked to a specific income or expense account in your Chart of Accounts. This connection determines how sales and purchases are categorized on your financial statements.

    To link a product or service to an account, go to the “Products and Services” list (accessible via the gear icon) and edit or create an item. In the item details, select the appropriate “Income account” or “Expense account” from the drop-down menu. This mapping is essential for accurate revenue and expense tracking.

    8. How do I customize my Chart of Accounts for better reporting, and what steps should I take when doing it?

    Customizing your chart of accounts for better reporting is key.

    1. First, consider all the business transactions and think of the best names to give these accounts.
    2. Second, import your own list of accounts, using a pre-made template on Excel.
    3. Third, customize your income and expense accounts. Do you want to eliminate the default expense accounts that come with QuickBooks Online?
    4. When setting up your Chart of Accounts, you may need to merge some accounts that are redundant.
    5. Finally, if you are comfortable with account numbers, you can enable it so that the Chart of Accounts can be more clearly viewed.

    QuickBooks Online Chart of Accounts: Setup and Management

    QuickBooks Online and its chart of accounts are discussed in the source.

    Here’s a breakdown:

    • Chart of Accounts: The chart of accounts in QuickBooks Online is the core of the accounting system. It’s a list of categories for organizing transactions to be viewed in financial reports like profit and loss statements or balance sheets.
    • Accessing the Chart of Accounts: To access it, the gear menu is clicked, followed by ‘chart of accounts’.
    • Sorting: The chart of accounts can be sorted by name, account type, detail type, or balance. Sorting by account type displays accounts in the order they appear on financial statements.
    • Balance Sheet Accounts: These accounts include bank accounts, accounts receivable, current assets, other assets, fixed assets, liability accounts (accounts payable, credit cards), and equity. Balance sheet accounts have a running balance in the QuickBooks balance column.
    • Profit and Loss Accounts: These include income, cost of goods sold, expenses, other income, and other expenses.
    • Account Limits: Some QuickBooks versions limit the number of accounts (e.g., Simple Start, Essentials, and Plus versions are limited to 250 accounts).
    • Creating a New Account: When creating a new account, the user selects the account type and detail type. They also specify when to start tracking finances in QuickBooks.
    • Beginning Balances: When a new asset account is created, the opening balance equity increases. When a liability account is created, the opening balance equity decreases.
    • Cash Account: QuickBooks creates a cash account for petty cash, which can be renamed.
    • Fixed Assets: When adding a fixed asset like a truck, the original purchase price (minus depreciation) is entered.
    • Long-Term Liabilities: Loans with over a year left for repayment are considered long-term liabilities.
    • Credit Cards: Credit card accounts can be a bit tricky because their closing dates might not align with month ends. One option is to enter the combined balance as of the statement’s closing date, including any transactions up to the end of the year.
    • Sub-accounts: For credit cards with multiple users or extensions, the parent account carries the beginning balance, and sub-accounts are created for each physical card without entering individual beginning balances.
    • Balance Sheet Review: After entering all the beginning balances, a balance sheet can be run for the last fiscal year to verify the balances.
    • Journal Entry for Retained Earnings: The source notes that opening balance equity is a QuickBooks concept, and in accounting, it’s referred to as retained earnings. A journal entry can be made to move the balance from opening balance equity to retained earnings.
    • Importing Chart of Accounts: Users can import their own chart of accounts from Excel.
    • Customizing Income Accounts: Users can create their own income categories (e.g., on-site services, remote services) and make existing ones inactive.
    • Products and Services: Products and services are linked to specific income accounts.
    • Account Numbers: Account numbers can be enabled to order the chart of accounts numerically.
    • Merging Accounts: Redundant accounts can be merged.
    • Profit and Loss Report Customization: QuickBooks Online allows you to customize your profit and loss report to show accounts even if they don’t have any activity.

    QuickBooks Online: Chart of Accounts Management and Customization

    The chart of accounts in QuickBooks Online is a vital part of the accounting system. It serves as a list of categories that are used to organize all transactions. These categories are essential for generating financial reports such as profit and loss statements and balance sheets.

    Accessing and Sorting To access the chart of accounts, one must click on the gear menu and then select “chart of accounts”. Once accessed, the chart of accounts can be sorted by:

    • Name
    • Account type
    • Detail type
    • Balance

    The most logical way to sort the chart of accounts is by account type, as this will display the accounts in the order in which they appear on the financial statements.

    Types of Accounts The chart of accounts includes both balance sheet and profit and loss accounts.

    • Balance Sheet Accounts These accounts comprise assets, liabilities, and equity.
    • Assets Bank accounts, accounts receivable, current assets, other assets, and fixed assets.
    • Liabilities Accounts payable and credit card accounts.
    • Balance sheet accounts will always have a running balance in the “QuickBooks balance” column.
    • Profit and Loss Accounts These accounts include income, cost of goods sold, expenses, other income, and other expenses.

    Account Limits Different versions of QuickBooks Online have different account limits. For example, Simple Start, Essentials, and Plus versions are limited to 250 accounts.

    Creating New Accounts When creating a new account, users must select the account type and detail type. They also need to specify when they want to start tracking finances in QuickBooks. When creating a new asset account, the opening balance equity increases, while creating a liability account decreases the opening balance equity.

    Fixed Assets and Long-Term Liabilities When adding fixed assets, such as a truck, it’s important to enter the original purchase price minus any depreciation. Long-term liabilities are loans that have more than a year left to pay.

    Credit Card Accounts Credit card accounts can be tricky because their closing dates may not align with the end of the month. In such cases, one option is to enter the combined balance as of the statement’s closing date, including all transactions up to the end of the year. For credit cards that have multiple users or extensions, create sub-accounts for each physical card, while the parent account carries the beginning balance.

    Balance Sheet Review and Retained Earnings After entering all beginning balances, run a balance sheet for the last fiscal year to verify the balances. The source specifies that in accounting, opening balance equity is referred to as retained earnings, and a journal entry can be created to move the balance from opening balance equity to retained earnings.

    Importing and Customizing Users have the option to import a chart of accounts from Excel and customize income accounts by creating their own categories and deactivating the existing ones. Products and services are linked to specific income accounts.

    Account Numbers and Merging Accounts Account numbers can be enabled to numerically order the chart of accounts. Additionally, redundant accounts can be merged.

    Profit and Loss Report Customization QuickBooks Online enables customization of the profit and loss report to show accounts, even when there is no activity.

    QuickBooks Online: Understanding Account Types and Chart of Accounts

    The sources discuss ‘account type’ in the context of QuickBooks Online and its chart of accounts. The chart of accounts is a list of categories that are used to organize transactions and is essential for generating financial reports.

    Here’s a breakdown of account types based on the sources:

    • Sorting by Account Type: The most logical way to sort the chart of accounts is by account type, as this displays the accounts in the order in which they appear on the financial statements.
    • Balance Sheet Accounts: These accounts comprise assets, liabilities, and equity.
    • Assets: Bank accounts, accounts receivable, current assets, other assets, and fixed assets.
    • Liabilities: Accounts payable and credit card accounts.
    • Balance sheet accounts will always have a running balance in the “QuickBooks balance” column.
    • Profit and Loss Accounts: These accounts include income, cost of goods sold, expenses, other income, and other expenses.
    • Creating a New Account: When creating a new account, users must select the account type and detail type.
    • When creating a new asset account, the opening balance equity increases, while creating a liability account decreases the opening balance equity.
    • Fixed Assets: When adding fixed assets, such as a truck, it’s important to enter the original purchase price minus any depreciation.
    • Long-Term Liabilities: Loans that have over a year left to pay are considered long-term liabilities.
    • Customizing Income Accounts: Users can create their own income categories and deactivate the existing ones. Products and services are linked to specific income accounts.
    • The source notes that income accounts typically start with the number 4, cost of goods sold accounts start with 5, and expense accounts start with 6 or 7. Asset accounts start with 1, liabilities with 2, and equity accounts with 3.

    QuickBooks Online: Understanding the Balance Sheet and Chart of Accounts

    The balance sheet is a key financial statement in QuickBooks Online, and the sources provide extensive information on how it relates to the chart of accounts. The balance sheet contains asset, liability, and equity accounts.

    Here’s a detailed breakdown:

    • Balance Sheet Accounts: The principal financial statement is called the balance sheet.
    • Types of Balance Sheet Accounts:
    • Assets: These include bank accounts, accounts receivable, current assets, other assets, and fixed assets.
    • Liabilities: These include accounts payable, credit card accounts, other current liabilities, and long-term liabilities.
    • Equity: This is the equity section.
    • Identifying Balance Sheet Accounts: A quick way to identify a balance sheet account is the presence of a “QuickBooks balance” column, which displays a running balance. The last account with a running balance is typically an equity account.
    • Setting Up Initial Balances:
    • A typical first step is to create accounts with a running balance.
    • When a new asset account is created, the opening balance equity increases.
    • When a liability account is created, the opening balance equity decreases.
    • Fixed Assets: When adding a fixed asset like a truck, the original purchase price (minus depreciation) is entered.
    • Long-Term Liabilities: Loans with over a year left for repayment are considered long-term liabilities.
    • Credit Cards: Credit card accounts can be a bit tricky because their closing dates might not align with month ends. One option is to enter the combined balance as of the statement’s closing date, including any transactions up to the end of the year.
    • Sub-accounts: For credit cards with multiple users or extensions, the parent account carries the beginning balance, and sub-accounts are created for each physical card without entering individual beginning balances.
    • Reviewing the Balance Sheet: After entering all the beginning balances, a balance sheet can be run for the last fiscal year to verify the balances.
    • Opening Balance Equity vs. Retained Earnings:
    • The source specifies that in accounting, opening balance equity is referred to as retained earnings, and a journal entry can be created to move the balance from opening balance equity to retained earnings.
    • The source notes that journal entries can be tricky and it may be best to consult with an accountant.
    • Account Numbers:
    • Account numbers can be enabled to order the chart of accounts numerically.
    • Asset accounts typically start with the number 1, liabilities with 2, and equity accounts with 3.

    QuickBooks Online: Profit & Loss Statement Insights

    The Profit & Loss (P&L) statement is a crucial financial report in QuickBooks Online, and the sources offer detailed insights into its composition and customization. The P&L statement, also called an income statement, relies on information from the chart of accounts.

    Here’s a comprehensive overview:

    • Profit and Loss Accounts: These include income, cost of goods sold, expenses, other income, and other expenses.
    • Location in Chart of Accounts: When sorting the chart of accounts by account type, the P&L accounts are found under the equity section, beginning with income. They appear after the balance sheet accounts.
    • Customizing Income Accounts:
    • Users can create their own income categories (e.g., on-site services, remote services).
    • Existing income accounts can be made inactive.
    • The source mentions that it is not possible to delete certain accounts, such as ‘billable expense income’ and ‘uncategorized income’.
    • Products and Services: These are linked to specific income accounts, ensuring proper categorization of income on the P&L statement.
    • Showing All Accounts: QuickBooks Online allows you to customize your profit and loss report to show accounts even if they don’t have any activity.
    • Deleting and Nesting Accounts: The source explains how to nest old or deleted accounts under a general category to clean up the P&L.
    • Account Numbers:
    • Account numbers can be enabled to order the chart of accounts numerically.
    • The source notes that income accounts typically start with the number 4, cost of goods sold accounts start with 5, and expense accounts start with 6 or 7.
    • Merging Accounts: Redundant accounts can be merged. For example, Heating and Cooling can be merged with Electricity.
    • Miscellaneous Accounts: The source suggests having miscellaneous accounts under general categories such as ‘miscellaneous travel’.
    • Importance of Organization: The purpose of working on the chart of accounts is to organize categories of income and expenses in a way that is useful and meaningful for financial reports. The goal is to have as few accounts as possible while still providing rich information.
    • Default Chart of Accounts: The source notes that the default chart of accounts in QuickBooks may vary, but gives the user control to customize it.
    • Utilities Example: The source shows an example of renaming ‘Water and Sewer’ to ‘Water Sewer and Disposal fees’.
    • Example of Travel Expenses: The source explains how to set up a ‘miscellaneous travel’ account.
    QuickBooks Online: Chart of Accounts (1 hour full tutorial)

    The Original Text

    in this video we’re going to talk about the chart of accounts in QuickBooks Online the chart of accounts is the heart of the accounting system the most common mistake that QuickBooks users make is they don’t get very much acquainted with the chart of accounts and then they really don’t know how to categorize transactions when the income and the expenses come in from the bank the chart of accounts is the list of categories that you use to organize all your transactions into so essentially you can see them in financial reports such as your profit and loss or the balance sheet to access your chart of accounts you click on the gear menu on the top right and then you click on chart of accounts now once you look at the chart of accounts you can actually sort these by name by clicking on the header of the grid by account type by detail type by balance and so forth the most logical way to sort your chart of accounts is going to be by account type because when you sort by account type what you’re going to see is all your accounts based based on the order in which they fall into in your financial statements for example the principal financial statement is called the balance sheet the very first account you see on the top is going to be your bank account naturally that is going to be the very first account or group of accounts that you see they’re going to be under bank then you’re going to see things like accounts receivable current assets other assets fixed assets and then you’re going to go see your liability accounts they still on the balance sheet you’re going to see accounts like accounts pay pble credit card accounts which we haven’t created one yet other current liabilities long-term liabilities and Equity so all of those that I mentioned just now from bank which is an asset all the way down to equity which is in the equity section once you see this break between equity and income all those accounts from Equity to the top they belong to your balance sheet now the other way to quickly tell that the account belongs to the balance sheet is there’s going to be a column called quick QuickBooks balance and there’s always going to be a running balance in the QuickBooks balance column and the very last account when they’re sorted by account type notice that the very last account that has a running balance which happens to be zero it’s an equity account and then you’re going to see income right under it so all the accounts under Equity starting from income and then going to cost to good sold which are your direct expenses down to expenses which are your operating expenses and then all the way in the bottom to your what they call the extraordinary accounts let me go to the next page which is going to be your other income and other expenses everything from income cost to good so expenses other income other expenses those are going to belong in your profit and loss account okay so that gives you an idea more or less you know where these two type of accounts fit now uh the the chart of accounts can actually have a limitation of so many accounts you can fit per page right now it’s set up for 175 but you can go all the way to 300 per page some people could have more than 300 accounts that is possible most versions of QuickBooks Simple Start Essentials and plus are limited to 250 accounts anyway so only the advanced version of QuickBooks Online can have more than 250 this particular chart of accounts that you’re seeing has 135 accounts so I’m actually using I’m not using I’m not using the advanc Edition so I can add a whole bunch of accounts get all the way to 250 now for the purposes of this video and this is the point I want to make is that if I go to reports and I go into profit and loss for example and I change the date to all dates and click on run report notice that none of the accounts show because there’s absolutely zero activity on this account for this example I created a brand new account from scratch so we can kind of see what happens as we work the chart of accounts I’m going to go to reports and do the same thing with the balance sheet and I could do uh all dates or pick a particular date range let’s do all dates for example click on run report and then we get the exact same behavior so again just proving the point this is a blank account brand new account let me go back into the chart of accounts and let’s talk about what are the typical first steps that we do now now that we understand exactly what it is what are the typical first steps that we do is we’re going to create all the accounts that we know from fact have a running balance so let’s start with that I’m going to click on the new button on the top right click on new now I do want to pause for a second this little square popup that you see on your screen it’s one of the versions of QuickBooks Online show this depending on what version of QuickBooks Online you have and you really can’t tell by looking at it this is just based on how QuickBooks creates the accounts you may not see this Square little popup you might see a drawer that comes from the right hand side all all the functionality is identical all the buttons you can press are identical they’re just organized differently and I’m I’m a little bit later on I’m going to switch to a different company file that actually has the drawer so you can see the two differences so I do want to show you with both so don’t freak out if your screen doesn’t look like this it’s fine uh we’re actually going to cover what the other screen looks like just kind of follow along uh the concepts themselves cuz those are going to be really important then I’m going to choose the type of account I’m going to create let’s say I’m going to enter all my bank accounts that already have a running balance uh from the first date that I’m going to decide to enter transactions inside QuickBooks so for examples of this video Let’s just assume that I created a brand new account and I’m going to start January 1st 2024 that means that I need to enter all the balances that come all the way up to December 31st 2023 because I want to start January 1st 2024 and this is the time that I want to go back into QuickBooks and enter transactions so I can have a clean tax year for example so I’m going to enter all my bank accounts so I’m going to select Bank as the account type under the detail type I’m going to pick the best possible option here so let’s say it’s a checking account and then under name I’m going to put the name of the bank so let’s say this is in Chase and then I’m going to put whether it’s checking or savings as the name and and this is the part where you can actually put whatever you want really but this is how I like to do it and then put the last four digits of the account typically the easiest way to identify now some people create an operating account a payroll account a tax savings account okay that’s fine you can do that and you can add that naming to your naming convention if you want to the description is optional you actually do not need to create that and then sub we’ll discuss that later on as we start creating more accounts now down here at the bottom it says when do you want to start tracking your finances in QuickBooks from this account and as I mentioned earlier we’re going to start January 1st 2024 so we’re going to click on other and then we’re going to specifically select January 1st 2024 essentially letting them know that if I do enter an opening balance that opening balance is supposed to be booked 1231 2023 so then I’m going to go get my actual physical bank statement for December for that bank account and I’m going to read the ending balance from the bank statement and I’m going to enter it in there so let’s say that’s 45,0 89062 so I read that from the bank statement for the ending balance of 1231 2023 and then I click on Save and close you will notice that immediately you’re going to see the account gets created in here the QuickBooks balance is going to be that beginning balance and then I’m going to scroll down so you can see something because there’s going to be a balancing entry under opening under opening balance Equity you’re going to see a balance entry for the same exact dollar amount every time I add an asset like a bank account that opening balance Equity is going to go up every time I add a liability such as a credit card or a loan that opening balance is going to go down essentially keeping track of what’s the accumulated value of your business uh before we start doing Accounting in QuickBooks okay so we did that bank account let’s do another bank account I’m going to click on new and let’s say I have another bank account but this time around it’s a savings account and it happens to be let’s say in Bank of America so I’ll put boa savings and then the last four digits of the account then I’m going to choose the same thing I’m going to choose the beginning date that I’m going to start entering transactions in this account then I’m going to go read the the ending balance from the statement let’s say it’s 100,000 flat I’ll put that in there and click save and close so now I have my two beginning balance uh balances in there and let’s say that’s it let’s say I don’t have any more bank accounts notice QuickBooks uh created a cash account which is going to be your petty cash account is where you’re going to be holding cash maybe your customers pay you in cash maybe you took out an ATM cash withdrawal you’re keeping cash in there and you might make some expenditures keep track of those receipts and that’s going to be sort of the account that’s not going to be tracked through the bank but you’re going to be tracking manually now you can change the name of that account if you don’t like it to be called Cash you want to call it petty cash for example we click on edit and then we change the name from cash to petty cash and then it’s up to you and and now one thing I want to make uh clear is there are some businesses where they have multiple employees holding petty cash and then what you can do is you can do is let me just edit that and put petty cash you can put petty cash John petty cash Hector petty cash uh Mary or whatever and then you can keep track of everybody’s petty cash uh per se so depending on how you manage cash some businesses will never touch cash so you don’t you not even need that and if you don’t want that account you can just click on the drop- down menu and click on make inactive or delete now one thing is QuickBooks Online does create a chart of accounts for you and um as we mentioned earlier it was 135 accounts you can delete them you don’t have to use them but that’s what QuickBooks suggests that you use so we entered both of our bank accounts let’s now go down here and create let’s say a fix asset so let’s say that I want to put a truck that I have in here now QuickBooks has a general category for vehicle so maybe I want to use that and then make a sub account so that’s the example we’re going to show you so I’m going to click on new on the top right under account type I’m going to go down to fix asset that’s where a truck would go under detail type I’m going to go look for the best possible uh category that matches what I’m trying to do so vehicles and then I’m going to call this by what it is so let’s say this is a Ford F150 I typically like to put the acquisition date on it it just it’s easier for me to do that so I put that in parenthesis so let’s say I bought it um May 19th 2019 or something like that okay so that helps me understand especially if I have multiple F-150s it will help me understand which one specifically it is you can go further and say that this is a 2019 model and then let’s say you have multiple 2019 models you can do white black whatever so you get to you get to pick whatever name makes the most sense for you and you put that in the balance sheet then it says here when do you want to start tracking finances from this account we’re going to do the same thing we’re going to do January 1st and then this gets a little trickier you have to go find your um well at some point when we do the actual loan we’re going to have to go find what the actual loan balance is but this is the fixed asset so this one’s actually not going to be the loan balance this is going to be the original uh purchase price of the vehicle minus depreciation now that gets tricky you might need an accountant to help you with that for the time being just to keep it simple we’re going to put the original purchase price of the vehicle now you can always look in your balance sheet in your tax return return if you had an accountant or CPA do your tax return your balance sheet will probably keep track of all your fixed assets all the depreciations and then maybe have a separate fixed asset schedule that tells you exactly how much um they booked the value of the vehicle and they accumulated depreciation so that could help you figure out what number goes in here for the time being I’m going to keep it simple let’s say I spent 4,608 on this car out the door with taxes and everything and then I’m going to click on Save and close so this is the original value of the vehicle again you might need um an accountant to kind of help you make sure you you enter the the cumulated depreciation and all that stuff now in this particular case I created the vehicle I’m going to go back and edit it and I didn’t make it a sub account of the existing vehicle category I think I want to do that so I’m going to click this little check box that says is sub account click on the drop down and then go look for uh the vehicle category that way it’s all organized sort of in the same grouping then I click on Save and close and then you will notice as I scroll down now I see a category for vehicles and then I see the fort in there if I happen to have another vehicle I can uh create that vehicle by clicking on new doing the exact same process so going down here to fix assets detail type let’s go down to uh Vehicles let’s say this one is a Ford F-150 as well but this is from uh 2021 and then this one happens to be black and let’s say I purchase that on 1231 2020 or something like that and the same thing I’m going to pick the original purchase price of this vehicle I’m going to be consistent with the beginning date of all the transactions that we’re going to be managing and the let’s say the purchase price was 51985 click save and close so now as I go down and scroll down to my vehicles and it looks like I also forgot to put this one as a sub account so let’s go back in that and click on edit so I didn’t do it on purpose that was my mistake but it’s good because you get to see um the actual um the actual process here so I’m going to put it under Vehicles which is a fixed asset you got be very careful because it happens to be a vehicle expense account as well and that’s not where I want to put it um even if I try to put it there and click save and close um it’s not going to let me because I can’t put a sub account of a fixed asset into an expense so it needs to be the exact same category for that to work anyway so let’s put here a vehicle and let’s do the fix assets and then click save and close perfect so now as I scroll down now I see that I have my vehicles category and both of my fixed Assets in there with the right uh labeling with the right $2 amounts and then the sum of the two right under that parent account if I scroll down and I look at my opening balance Equity notice that all the accounts that I put that are assets are increasing my open opening balance Equity account let’s start creating some loans so I’m going to go to new then I’m going to click on the drop down menu and then I’m going to click on long-term liabilities so typically any loans that you have more than a year left to pay it’s going to be a long-term liability and then we can call this a node payable or other long-term liability it doesn’t matter and then we’re going to put here Ford let so here Ford truck loan and if I happen to have two of them I probably want to identify and by the white truck or the black truck or whatever it is so we’ll put here white and then I’m going to come here same thing I’m going to select the beginning of the year which is the date that we decided to start our finances and then I’m going to get this is actually the loan balance not the original purchase price I’m going to get the actual statement from uh Ford Finance or whatever I’m going to get the statement from the bank and that shows the ending balance as of 1231 2023 and let’s say for this one was 23,00 965 I click on Save and close and then I’ll do the same thing for the other one so I’m going to go to new go drop down menu get the other physical statement long-term liability and let’s say this is the Ford uh truck loan black and then other same thing one one 2024 and then this one happens to be let’s say 38,7 seven eight something like that save and close so I enter two loans which are two liabilities as I scroll down scroll all the way down now I see my two long-term liabilities they show up in here now you should notice that my opening balance Equity is going down and this is the exercise you have to do you have to create all your assets all your liabilities and all of these balances essentially are going to give you the opening balance equity which is the net worth of your business at that moment in time where you started tracking your finances in in this case January 1st 2024 okay let’s do one more exercise which is our credit cards so I’m going to go to new then I’m going to get all my credit card statements I’m going to click here credit card and this one’s a little bit tricky because credit cards don’t have clean months like bank accounts or loans a credit card can end in the 15th of the month it can end in the 20th of the month so that gets a little bit tricky so essentially what I want to do is I’m let me start with let’s say my AMX uh platinum or something like that and uh we’ll put the last four digits of the account what I want to do is I want to do the same thing here I want to do 11 11 2024 but because I don’t have I can’t get that information from the statement I have to get the closing uh date as of the last time that the the bank that the um credit card closed let’s say this happens to be December 15th I can put the number there but then when I go reconcile it’s not going to work because I will be missing the transactions from December 15th to the end of the year so for this to actually work you have to put in here combined the balance as of December 15 and all the transactions in between plus and minuses you have to add them together in order to have a correct beginning balance and then you can then start creating your transactions January 1st 2024 and you should have a clean beginning balance that’s one option the other option that we have and this could happen like this is I want to make put here the ending date of the last statement and then essentially you will be also entering some 2023 transactions in QuickBooks in order to catch up and then when you go reconcile let’s say January 15th 2024 you have a full month worth of statements and your QuickBook is going to have some transactions for 2023 so that that’s that’s the part that just gets a little bit tricky so that could be the other option that you have so let’s say this is 12489 60 and again we’re picking the method where we’re taking the actual physical statement let’s say they close on the 15th we’re taking the ending balance on the 14th and then when we go enter transactions we’re going to choose to catch up those uh last transactions of the year and again who cares we got we put some things for 2023 here even though it wasn’t our intention but we were able to do a clean reconciliation now very very important I do have a video that talks about reconciling entirely different process we won’t cover that in here but um keep that in mind because this is like the precursor of doing any sort of bank reconciliations so we’ll do save and close and there there is my um American Express uh credit card now let’s do one more credit card and this is going to be a situation where I have a credit card and then multiple sub accounts under it or multiple physical cards and that’s a really important one because when you connect your Banks your Banks usually download the activities in each of the sub account accounts but then when you reconcile you reconcile the master parent account so I’ll give you an example so let’s say I have a Chase account with three extensions or three users so I’m going to start by creating the let’s say the parent account so let’s do Chase Visa uh uh let’s call it rewards rewards INC plus or whatever it happens to be and that’s going to be our parent account that’s going to be like our overall account that we’re going to reconcile I’m going to do the same thing do the beginning balance let’s say picked up the statement and that closes on the 20th so we’re going to go back to December 20th and then we’re going to put the physical balance on December 20th and we’re going to choose the technique where we’re going to enter the the catchup transactions for December so we can have a clean reconciliation month so let’s say this happens to be 15, 44630 and then we’ll do save and close so that’s my parent account that’s my that’s my master account and the beginning balance is going to be carried there but I have to create each of the extensions each each of the physical cards that are under this one statement and put in them as a sub account so I’m going to come in here and select credit card and then I’m going to choose let’s say uh Hector and then put the last four digits that’s my card that’s Hector’s card and I’ll put that as a sub account in this case of Chase um Chase Visa Inc rewards and then for this one I don’t enter a beginning balance because the beginning balance is being carried by the parent account by the master account then I’m going to click on Save and new cuz I’m going to keep creating accounts and let’s say the next one I gu said new didn’t work let’s do new one more time let’s go and select credit card again and we’re going to put here let’s say Maria this is the the user Make data sub account of the same uh Chase plus Chase rewards plus and then click on Save and new let’s scroll down over here and see that we have my Chase Inc and my two sub users let’s do one more we’ll pick here credit card now hopefully you’re getting the hang of this at this point let’s do Carlos and put the last four digits make it a sub account and look for that account the rewards Plus Inc and then no beginning balance again because the master parent account has that save and close and let’s say that’s it let’s say that’s all of our assets and our liabilities and we use the chart of accounts to build that up so now let’s go to report and let’s go into balance sheet and then we’re going to select last fiscal year that way um last fiscal year we know exactly what our balance sheet looked like before I start using QuickBooks notice that I’m going to have let’s click on run report actually let’s do the beginning of the year that might be easier uh because sometimes those um those uh transactions get created at the beginning of the year so let’s do the beginning of the year and then click on run report and then we’re going to get to see all of our balances so here’s the opening balances that we created here’s the opening balances of the vehicles then we went down here and we we have both of our vehicle loans we have our our two credit cards the AMX and the chase reward and then we have our opening balance Equity that adds up in there now a couple things I’m going to click on all of these uh amounts and this is sort of like General General cleanup sometimes these beginning balances get created at the very beginning of the year year January 1st I actually prefer to bring those back and make sure that those beginning balances are booked on the last of the year because I don’t want this year to show like a weird transaction that technically doesn’t belong to this year because that comes from previous here so you can click on all of these balances in your reports you can click on them and inspect each and every one of them and notice that I’m manually making sure that they they hit 1231 2023 which is what QuickBooks should it done in the first place is just you know sometimes it doesn’t work exact way you want it so I’m just going into each one of these transactions that were created and I’m changing the dates to 12:31 2023 to have a real clean uh balance sheet and then when I run it for last year it actually shows up full uh and complete um different than you know how it was showing when I first tried to do the the last year balance sheet and let’s say these credit cards to I think these should be good because both of these were entered I believe uh prior because those those we had a different date for if you remember those actually were done in December so that’s so the credit cards kind of obey that rule that concept that I mentioned but the other ones didn’t so let’s go back and run the balance sheet account one more time and let’s just make sure that all of the accounts that we uh that we want them to show up for last year uh because this is all the last year exercise they’re showing in there so let’s see both I got both my bank accounts great I have my loan accounts I mean my my assets I have my credit cards I’m still missing the loans so let’s if I push this date up one more day the loans should show up in here and the same thing I want to click on that going into each one and bring that back so that’s going to be um you know the most clean as possible when we run a a previous year and there’s a very specific reason for this which we’re about to show you and this is more of a sort of nerdy technical accounting reason why we do this but let’s just run the balance sheet one more time let’s make sure we got a clean balance sheet here so let’s do last fiscal year last year okay there we go so there’s my two Banks there’s my two assets perfect there’s my two loans and my two credit cards beautiful okay so now what I want to do and again this is a technical thing this is I do want to cover in this video Even though this video is more for beginners I don’t not do not like opening balance Equity accounts it’s actually there’s actually no such thing as an opening balance Equity account that’s a that’s a madeup concept from QuickBooks okay in the accounting World opening balance Equity is actually referred to as retain earnings retain earnings so what I’m going to do is I’m going to take this number 152 80473 let me go back here for a second I’m going to take that number and then I’m going to do a journal entry to move it out of op balance equity and into rain earnings and I do want to mention something again this is the type of stuff that you might need an accountant for journal entries are are tricky I’m going to go into journal entry and then I’m going to date this journal entry 12:31 2023 and then I’m going to move it from opening balance Equity so I’m going to move it out of equity which means I have to debit it and again this is this this is the accounting stuff this is where you might need an accountant to help you with this stuff and one of the interesting things about this is Most accountants never never want to touch the retent earnings account actually I agree with that you should never be touching retent earnings account this is a very special situation where I’m taking last year’s this is not a current clean year that I’m doing I’m taking last year’s entry for the beginning balances and I’m cleaning it up into ritten earnings because that’s where it’s supposed to go again this part super nerdy maybe something you could have you could have skipped but this is like for me the way I want to see a balance sheet um I want it to be right so that’s kind of where it belongs and and to take it one step further it might not all be retain earnings it could be retain earnings it could be beginning Capital it could be additional painting Capital there’s all sorts of layers of complexity in the equity account where you track not just the value of your business but the accumulated assets sorry the accumulated Capital that each of the business owners have uh in that business so gets a little bit trickier I won’t cover that but you do need to maybe discuss that with your accountant to make sure your QuickBooks is fully cleaned up okay so that’s the balance sheet and that’s the exercise of working uh balance sheet accounts uh in the chart of accounts let’s go back to the chart of accounts and let’s talk about profit and loss accounts whole another ball game so we’re going to scroll down here we’re going to see the very last account that has a running balance so right here the very last account had a running balance that’s my last Equity account then we’re going to start looking at our profit and loss accounts which starts with the income account there’s a whole bunch of accounts in here the default chart of accounts in QuickBooks created billable expense income refunds to customers sales sales or product income services on categorized income now I have my own spreadsheet that I put together this is for sanity check as an accountant helping hundreds of people a year get on QuickBooks Online sometimes I like using my own chart of accounts so I have my own profit and loss accounts that I keep track of this is because I prefer it this way and in my same spreadsheet I have a list of my um the default accounts that QuickBooks Online has that way I can compare you know the original one that QuickBooks has versus the one that um that that that I like to use now quick side note uh for all my clients that want me to set up the chart of accounts or not just me but my team I I typically give them my chart of accounts and I load my chart of accounts in there it gets a little tricky when it’s an existing account because there’s ex existing transactions that need to be reclassified but generally when it’s a brand new account I like using my own chart of accounts for my own reasons and the way I you the way I import the chart of accounts into QuickBooks is I export this into Excel and then I go uh in here into um into the chart of accounts click on the drop down menu and then click on import and then once I click on import I click on browse and I go choose the chart of accounts file that I have in Excel in my computer somewhere and then once I’m just going to pick this thing this thing although even though that’s not that’s not it I’m going to load an Excel file or a CSV file click on next and then I’m going to map you know what’s what in here and then once I map it I go to the next screen and then the next screen tells me okay this is all the accounts that you want to import and this is uh all of the account types that each one is supposed to be and then you start loading that in there again that this wasn’t an actual chart of accounts file but that’s how you import your own chart of accounts so if you happen to have a super clean beautiful chart of accounts in Excel that you like to use maybe something your accountant gave you maybe you yourself are an accountant and you have your own template that’s how you would import it you would go into the little drop- down menu next to New and click on import okay um and again I’m going to scroll down here and then I’m going to go through the income accounts and let’s say I don’t like this configuration let’s say I have one account that is for on-site services and one account that is for let’s say remote services so I don’t like any of the income accounts that QuickBooks has here for me so I can create my own categories my own income category so I’m going to go to new I’m going to select the account type I’m going to scroll down to income and then I’m going to pick on detail type the one that makes the most sense so let’s say service fee income and then I’m going to put in here onsite Services okay and then I’ll try to do save a new see if it works this time sometimes it does sometimes it doesn’t let’s go to new again and let’s click on the drop down menu go to go to income and then I’m going to select let’s say um service fee income again and then this will be remote services so let’s say all of my sales of whatever I do service Consulting whatever it is essentially all of the income is going to fall into just those two categories the uh let’s just scroll down here it’s going to be the remote services or the on-site Services now I can start getting rid of the accounts that QuickBooks give me so for example this one called refund to customers I can click on the drop down menu and click on make inactive makeing active and I get rid of that it doesn’t disappear but it gets removed from there some accounts might give you issues like this sales sales of product income and Services I selected three then I’m going to scroll all the way in the top I’m going to click on batch actions and click on make inactive so I’m going to try to make three inactive but anytime there’s an error that it says look I can’t make that inactive because I have it tied to a product or service then you won’t be able to so I’ll do the ones that it can and then I’m going to scroll down one more time see what it allowed me to get rid of and what what it kept so it looks like it got rid of the other two but it kept this one here called uh services and then there’s this one called uncategorized income essentially there’s three accounts you can get rid of one is billable expense income if you get rid of that it comes back 10 times so don’t get rid of it bailable expense income leave it there and on carag income same thing if you delete it it keeps coming back so you have to keep that in there is because those two accounts are used by QuickBooks to fulfill a very specific mechanic so you might need to keep keep those in there um so just leave them in there for now but I do want to address this one services that I couldn’t get rid of let me just try to do it one more time so you can see it says I can’t use it because a product or service is tied to that so we’re going to take a quick break out of chart of accounts and then we’re going to talk about product Services because this is an important link between your items and your accounts so I’m going to click on the gear menu on the top right I’m going to go to an entirely different section of QuickBooks which is products and services and these are going to be the individual items the things that you sell or or buy that you’re going to track in transactions and those tie or map to accounts so then when you create um transactions with those items QuickBooks knows where to C cize them so let let’s let’s add a new item here I’m going to this is I’m in the products and services list and if I go to new I’m going to add a new item I’m going to call it a service and I’m going to say remote one hour support or something like that and just keep in mind this is the name of the item the product or service that’s going to show up in the transaction like an invoice okay then in here I can put uh remote services for it support with with level one Tech or something like that now under income account this is where you pick which category this item ties into and notice this is tied to Services which is why I couldn’t delete the service account but I’m going to tie this one called remote 1 hour support I’m going to uh tie it to my remote account actually let me ex out of that and click on refresh one more time because I just changed the accounts and sometimes it takes a few minutes for the accounts and the items to to sync together so let’s go back into add item let’s do service let’s do remote 1our support okay I want to copy and paste this into the description click on the drop- down menu and now I should see my remote Services there we go and let’s say this is what we charge uh $75 an hour for and if I plan to pay a vendor pay a contractor or something like that for the service and use the same item then I want to put um the same thing here and put uh paid to contractor or something like that and then on their expense account I’m going to put the expense account you know maybe something on cost to good sold called subcontractor expenses or something like that if I’m going to pay a third party to fulfill the work that I’m selling to these clients and let’s say I pay the third party $40 an hour or something like that it’s $40 an hour and if I have a very specific unique person that I always use you can put that on their prefer vendor but you don’t have now this option to make a product or service um eligible for a purchase transaction that’s an option if I uncheck that that goes away completely okay so let’s click save and close and there we go here’s my remote 1H hour support now this item call services I’m going to edit it and I’m going to tie it to let’s say the remote Services click on Save and close and then this one called hours and QuickBook cre is for you I’m going to tie it to remote Services click save and close and the way I the reason I did that is because I don’t want any items to tie to the generic Services account so I can actually delete it so I’m going to click on the gear menu and and check uh income account here so it shows up in the list that way I’m just double-checking that nothing is tying to that generic Services account then I’m going to go back into my gear menu I’m going to go back into chart of accounts and then I’m going to see if it lets me delete that Services income account that I don’t want so let me scroll down here and go into services and let’s now cross our fingers click on making active click on making active and beautiful it let me do it so that’s the tie between the your your uh your items and your accounts let’s see if I can delete this uh sale of product income does it let me do that one too yes it does so now I’m down to the two accounts I actually want on-site services and remote services and the two that I can delete which is uncategorized and building expense income so that’s how you create accounts your own categories that’s how you tie them to products and services and as you go down you can check all your cost to good sold or your expenses and check which is the account which is the account or list of categories that you want when you actually um look at your reports okay so let’s take a look at that let’s go into reports and let’s go into profit and loss and let’s see what a profit and loss looks like with the chart of accounts the way we have it now there are no transactions in my profit and loss because this is a blank file so when I run the profit and loss it just shows a bunch of zeros now one of the cool things about reports in QuickBooks Online is there’s an option for you to show Force show accounts even if they don’t have activity so if I click here it says all and then click on run reports all the accounts in my chart of accounts should show but there’s one caveat for this to show there has to be at least one transaction so at least one transaction in there all the accounts will show so we’re going to create one transaction to make make it very simple here so I’m going to go into new I’m going to go into invoice I’m going to just I’m going to create a customer here really quick let’s do ABC customer and I have an entirely different video that covers invoicing and accounts receivable make sure you check the description all the videos that I have walking you through how to use QuickBooks but essentially I’m going to use this item that we created called remote one 1 hour support let’s say that we’re charging for 3 hours of that and we’re going to date this uh this year at some point uh that way it shows up in the current report that we’re looking at and then we’re going to click on Save and close so as long as there’s one transaction this is a very interesting thing about QuickBooks as long as there’s one transaction in here I can click on where it says all rows and active columns click on all and then essentially my entire chart of accounts will show here now unfortunately it also shows all the deleted accounts which is kind of a bummer because it does kind of mock with the organization of my chart of accounts so you do want to be careful with creating and deleting creating and deleting because as time goes by if you want to use this option to show all you’re going to be showing or you’re going to be seeing this deleted account so that’s kind of a the the bummer now when you look at your profit and loss and we have an entirely different video that talks about manipulating reports and customizing reports but I’m just going to show you something really quick I’m going to click on customize here and then I’m going to click on accept zero amounts basically to show the zeros which makes the report a lot easier to see I’m going to click run report and I do want to warn you one more thing I’m recording this video in January of 2024 and uh QuickBooks is going through a transition period where these profit and loss reports are going to look different they’re going to have an entirely different screen and these settings are going to be all over the place you should have the same settings but it won’t be the same I this is not a reports video and I will be doing updating updated videos focused on just reports all I’m trying to do is illustrate how chart of accounts flow information into uh your your reports now let’s say for example that this one called refunds to customer sales deleted sales of product income and Services I want to kind of just Nest them under one General category that way it’s easier for me to just visually hide them per se if I want to so let’s go back into the chart of accounts okay and I’m going to open chart of accounts in a new tab that way I can keep my report reports here live and I can just click refresh when I’m ready to to look at it again then I’m going look at these accounts that were deleted so I’m going to click on the on the settings button on the right hand side of the screen and click on include inactive that way it’s going to show me the deleted accounts for some reason QuickBooks calls deleted and inactive accounts uses the same term we’re going to go down here and look at all my accounts that are deleted I’m going to create a general category let’s go to new here I’m going to make it income and then I I’ll pick any of these categories here it doesn’t matter and I’m going to call this old slash deleted accounts and I think you’re starting to kind of see read between the lines on what I’m going to do let’s hit save and close here and then I’m going to go look at all my accounts that we deleted okay let’s scroll down here until I find it there we go let’s go to this one go to uh make active so I’m making it active temporarily I’m going to edit it make it a sub account account of my deleted perfect then click save and close then I’m going to go to my next one this um refunds to customers click make active edit delete make that a sub account of my deleted group and by the way there’s nothing wrong with an account called refunds to customers you can have that um just because I’m deleting it doesn’t mean that you need to delete it it’s just I don’t want it right so you need to plan with your accounting team exactly how you want your accounts to look this is this is a very personal very specific to your company decision that you need to make so I’m going to click on edit and then make that a uh put that under the deleted group and then click save and close and now all my accounts have been deleted which I temporarily made inactive so I can edit them they’re showing up here so now I can just select all these here and then go into batch action make inactive and I should be able to make them all inactive in one shot uh with the exception of all the ones that have scroll down here the income so with the exception to the parent account the parent account that still needs to show up in there I can only make the sub accounts I can only make the sub accounts inactive um the the parent account is the one that has to stay active okay so when I go back into my profit and loss report and click on run report what’s going to happen is now all these deleted accounts get it under that one category and then I can just click on the little triangle and then collapse it and then it cleans up the p&l for me and essentially the purpose of doing this sort of work on your chart of accounts is when you go print your chart your your profit and loss report and you have two three four pages that you’re monitoring your numbers in you’re going to lose uh the ability to really analyze your numbers cuz you print a report in four pages is too much so you want to work as hard as possible to not have the goal is not to have as many accounts as possible it’s actually the opposite the account is to have as little accounts as possible that provide the most amount of Rich information you need for your business based on your needs okay so as we go down let’s start looking at all the other categories we have advertising and marketing Let’s see we like that uh let’s say I want to have something called traditional Media or something like that or radio ads I can do that I can come back into my chart of accounts go to new and then go down to expense and then I’m going to call this one radio ads click on the sub account drop down menu and then that’s under advertising and marketing and then click on Save and close I created one more category switch back to my profit and loss there’s three there now so if I refresh then I I expect to see now four in there now do you need to have all this no you don’t uh some people just have advertising marketing no sub accounts and they throw everything in there this is personal based on your business needs you need to figure out how many accounts you have under employee benefits you see there’s a whole bunch of sub accounts there pretty clear we’re going to collapse that under General business expense again a whole bunch of other categories let’s say we like that and we um and we we uh collapse that under insurance we have all these sub accounts that’s great beautiful and again your chart of accounts might look different keep that in mind this is the default chart of accounts that was created with the company I company file I created in QuickBooks yours could look completely different there’s actually no guarantee yours will look anything like this um and then there’s interest paid there’s legal and accounting services there’s meals with clients and travel meals there’s office expenses and then all these subcategories there is payroll expenses and in here you would have uh stuff like payroll tax and that sort of thing even though there’s a category for taxes paid and payroll taxes is in there let’s say I don’t want payroll taxes to be under taxes paid let’s say I want it under payroll taxes so I go back into my chart of accounts I can search the specific account here that way it’s there so taxes paid okay so very specific account called taxes paid I’m going to click on edit and this is my uh taxes paid account actually I’m looking for the one under it which is uh payroll taxes I believe sorry so let’s look at payroll payroll taxes this one right here payroll taxes we’re going to edit that one and then make that a sub account instead of taxes paid I want to move it and make it a sub account of payroll taxes again there’s not this is not the rule or it needs to be like that or not this is based on your needs let’s run the report let’s go down here one more time and then under payroll taxes now I have under payroll expenses I have both payroll taxes and wages so you’re going to go through all these and you’re going to figure out what what works uh best for you look there’s utilities there’s uncategorized expense this is another example uncategorized expense is one that you cannot um change QuickBooks gives you that you have to leave that in there because when you connect your Banks and QuickBooks just so know where to categorize stuff that’s where it’s going to put it it’s going to put it under uncategorized expense now sometimes uh you can merge accounts that are redundant so let’s say for example that you think electricity Heating and Cooling are redundant you can collapse them to or you can merge them and let’s say for example disposal weight fees and water and sewer we also want to do the same thing with that so let’s do one at a time let’s take this one called Heating and Cooling I’m just going to copy the name of it and uh actually let’s that we’re going to collapse that with merge that with electricity so I’m going to copy electricity actually I’m going to copy electricity then I’m going to go find heating and cooling in the chart of accounts let’s type here Heating and Cooling there we go we’re going to edit that and we’re going to change the name from Heating and Cooling to electricity see I had copied it so I pasted it then when I click on Save and close QuickBook says hey wait a second that account it’s already duplicated would you like to uh merge it then you’re going to say yes now these chart of account screens they they look different for different people sometimes you will have a drawer on the right hand side that will be um that will be showing the me the mechanics of creating these accounts and instead of having the popup they would look slightly different so I’m going to show you what that looks like just in case your screen looks one way or the other this is the tricky part of dealing with QuickBooks as sometimes you’ll have one screen that behaves a certain way versus others that behave a different way depending on your company file so I switched I switch modes so now you’re going to see the chart of accounts behave a little bit different when you create new accounts but anyway let’s go back into here and let’s say that this one um disposal weight fees this is the one that we’re going to condense into water Water and Sewer so I’m going to copy Water and Sewer I’m going to go back into my chart of accounts I’m going to look for uh the waste fees this PO on W fees I’m going to click on edit and see now it’s a drawer on the right hand side so depending on again your QuickBooks might have the popup you saw earlier or it might have the drawer on the right hand side and they work very similar and we’ll kind of show you how this one works so I’m going to change the account name in here to match Water and Sewer it’s under the category utility so it’s under the sub category of utilities and then now the the warning for the merge is actually the two lines highlighted in red letting you know this is going to be merged then when I click on Save now we get instead of a popup that says would you like to merge them you get the message right there inside the drawer and then you click on merch accounts and then click on Save and then does the same process so it kind of gives you an idea more or less how that how that functions let’s say I want to go back in here click on U run report go look at my accounts and you’re going to see the old um utilities you’re going to see the old accounts that were deleted again that’s only because we’re forcing them to show because we did the all options once you enter transactions anything that’s a zero gets automatically deleted but let’s say that this one called Water and Sewer I want to add water sewer and Disposal I want to rename it so I go back into the chart of accounts I’ll type water okay I’m going to click on the uh the edit menu and then now it’s using the drawer on the right hand side so we’re going to change the name from water sewer and Disposal fees notice that there’s always a description you can keep it you can delete it the descriptions really don’t do anything other than kind of help you guide you to the process let’s click on Save and that does that so I go back into my profit and loss I click on run and then scroll down to utilities and and there we go here’s all my C categories let’s go down to travel we have airfare hotels taxi and right chair vehicle rental uh let’s say I also want to have um a category for um for miscellaneous things that I buy at the airport for example so one called misscellaneous travel so I want to create a category under travel just called miscellaneous travel and that’s typically a good idea to have like I don’t like miscellaneous accounts but whe they’re under a general category I’m okay with that so I can have one called miscellaneous travel I can have miscellaneous utilities I can have miscellaneous uh payroll I can have miscellaneous office that sort of thing so there’s sort of a catch up opt a catch all option inside those uh parent categories so let’s go and create a miscellaneous travel so let’s come in here let’s go to new now we have the drawer on the right hand side we’re going to pick expenses remember income and expenses are profit and loss accounts under save account under this is where I’m going to go look for that travel account so see the mechanics a little bit different it doesn’t have the check box that says sub account off you just pick whether it’s going to be part of the general expenses or if you don’t pick the parent General expenses then automatically by picking anything that’s under that that would be like sub account off so let’s go down to travel and then we’re going to call this one miscellaneous travel okay yes I’m putting it uper case I know driv some people with OCD crazy so let’s go to save and let’s go back to our profit and loss and click on run report so we know exactly what’s happening and there’s my miscellaneous uh travel okay now one thing to keep in mind uh QuickBooks always orders accounts in alphabetical order unless you turn on account numbers if you turn on an account number then it’s going to use uh the account number for ordering which is my preferred method of looking at accounts so how would that work so let’s click on the gear menu let’s go to account and settings and let’s go down to Advanced and then here where it says chart of accounts we’re going to click on enable chart of accounts and show the numbers so we’re going to turn them on so they show up in the chart of accounts and we’re going to show them so QuickBooks can order it by account numbers then I’m going to click on Save and click on done and most beginner users don’t like account numbers they feel it confuses them accountants love it account number so we got to figure out somewhere in between you know I think it’s not that bad once you get used to using account numbers it’s pretty easy as I mentioned earlier I have my own chart of accounts that already has all the numbers so obviously for me it’s easy to deal with that because every single client I have uses the same account the same number uh combination so as I categorize stuff I start memorizing the numbers and I sometimes I just look at a expense and just say oh yeah that’s 529 or something like that so that’s the cool thing about uh knowing your chart of your your numbers in your chart of accounts that you can either recall it by name or recall Call It by number we’ll show you an example of that so let’s uh come back into our chart of accounts and I’m going to click on the on the gear menu actually let me click on refresh because I just turned on the account number so this screen now to needs to recognize that we have account numbers and I’m going to click on the gear menu and make sure that the number it’s enabled so now I see that my numbers are enabled and I’m going to start adding numbers to these accounts and this is kind of a long process I know but this is the problem with the default chart of accounts don’t give you good account number so for example I’m going to add account numbers only to the ones that I’m going to use so I’m going to use on-site services and remote Services those are the two that I want to use and everything else I leave it without a number you can do that so let’s go into the little pencil button here and then go down to each of the accounts that I want to edit the number for so let’s say that for my on-site Services I’m going to call this [Music] 4101 and the remote Services is 41 1 02 now rot of thumb income accounts start with four cost to good hold accounts start with five expense accounts start with six or seven and then other income and other other expense is going to be eight or nine and then assets let me just go up here assets like bank accounts those start with ones so let’s do 10101 10102 10103 uh liabilities start with two so for example let’s say I’m going to go down to my credit cards and do 2011 0 2011 01 2011 02 notice the the logic that I’m using for these okay I’m trying to keep them into like logical sequence so when they’re organized like that and then the equity accounts they’re all start with three so let’s do 30101 and then I go down here and just assign mul actually opening balance Equity I don’t use that one so I would never put a number on something that I don’t mean to use and that’s kind of like how I that’s kind of how I how I see uh Logic on these things um where if I know for a fact I don’t mean to use it then I don’t put an account number on it so I’m just going in here these are the equity accounts so I’m putting account numbers on those and again I’m not going to do it um in all of them I just kind of want to show you uh the process let’s go down down here to travel and let’s say travel is going to be 60700 and then my expenses are going to be 60701 I want miscellaneous to be the last one so let’s do 60702 skip miscellaneous 6073 vehicle rent or 6074 and then for miscellaneous I’ll do 6075 so notice I’m I’m overriding the numbers in here so I can see the accounts on a very specific order and that’s what I’m going to that’s what I’m trying to show you that the the the account numbers actually have rhyme reason and logic to them so let’s go back into my profit and loss account report click on reports notice that the two accounts I want to use have numbers the ones that I don’t don’t and that’s kind of how I differentiate between the chart of accounts I meant to put together and the chart of accounts that QuickBooks is forcing on me if I can delete the accounts go down and look at my travel notice that my travel is showing number one because none of the s have numbers so of course numbers take priorities and notice that QuickBooks is now respecting the number sequence all of these accounts need to have a a natural number sequence and especially if they’re going to be sub accounts make sure that you um make the parent account a z0 or something like that so you have plenty of numbers under that so you can have a logical sequence inside of those parent accounts and that’s essentially how you organize your chart of accounts and essentially what the chart of accounts means to you is the way you organize your categories of your income and expenses so you can put them in a financial reports in ways that it that it’s useful and meaningful to you so anyway this is that was the chart of accounts master class hopefully that was helpful hopefully you get acquainted with your own chart of accounts that way you um you have a really pleasant experience using QuickBooks I do sell my chart of accounts for advanced users for accountants that like my own chart of accounts I’ll put a link into that in the description somewhere if you want to buy the chart of accounts and import it into your QuickBooks online if you’re a brand new user if you’re not an accountant I don’t recommend you just import your accounts in your QuickBook file because it could become a mess so that’s really for the advanced type of users and if you need private one-on-one support um to help you set up your own chart of accounts I’ll put my contact information my firm’s contact information down in in the description and you can schedule and oneon-one with one of the consultants in my firm to walk you through this process and make this a real uh a personal experience that pertains to your business that way your chart of accounts doesn’t have anything you don’t need only the stuff you actually need and understand anyway hope this video was useful check out the description for all other videos that we recommend you watch after this as part of you know a multi-part series And subscribe to the channel to to be notified when I create another video just like this thank you and I’ll see you on the next one

    By Amjad Izhar
    Contact: amjad.izhar@gmail.com
    https://amjadizhar.blog

  • ABBA in Switzerland (1979)

    ABBA in Switzerland (1979)

    ABBA in Switzerland (1979)
    THE SHOW a Tribute to ABBA

    By Amjad Izhar
    Contact: amjad.izhar@gmail.com
    https://amjadizhar.blog