Is hassidut based on the canonical Jewish texts (Tanakh, Mishna, Midrash, Gemara)? What is its basis? In other words, how do we know that hassidut has divine roots and presents us with ontological truths?
The first part of your question is:
Is hassidut based on the canonical Jewish texts (Tanakh, Mishna, Midrash, Gemara)?
The truth is that question is at the very heart of the debate over the validity of Chassidus that arose shortly after it began. The Misnagdim answered emphatically that no, it is not based on Jewish texts.
Chassidim, on the other hand, say that it is based on Jewish texts, primarily the Kabbalah. Misnagdim reply that the Chassidim misunderstand these texts. In addition, anything new in Chassidus isn't good, while anything good isn't new.
Rabbi Elyakim Schlesinger in his book Hador v'Hatekufa (page 32) says that the Brisker Rav told him that once he was asked by a group of Chassidim what he has against Chassidus. He responded, "You tell me what Chassidus is, and I will tell you why I am against it." In the next paragraph, he says that after Rav Menachem Mendel of Kotzk, only two (unnamed) groups of Chassidim were still problematic.
Obviously, a Chassid would give you a very different answer, but this is the response of the Misnagdim.
My understanding of chassidut is this: the fundamental mechanics of existence are explained in mind numbing detail by authentic kabbalah. It is through this discipline that human intelligence is capable of interfacing with higher intelligence.
Rabbinic judaism is the tradition of those individuals in the human species who mastered this kabbalistic science. These individuals developed systems for living life based on the knowledge they received from higher intelligence. This body of knowledge was recorded over some time to form the corpus of texts of "rabbinic judaism."
It is only due to the fact the texts were written down and the Israelites endured a multi-millennia exile that the wifi connection with higher intelligence was temporarily severed, thus the texts themselves took the place of the direct interface with higher intelligence.
In the broader scheme of things the epistemological ground for true knowledge is not what is written in texts but in the experience of direct reception from higher intelligence.
It takes an extremely unique kind of mind to be capable of receiving wisdom from higher intelligence. One who is able to do so will experience a profound kind of delight. Not all are gifted with this ability. In essence, chassidut was developed by the people who possessed the knowledge of how to generate the delight to those who were created to received but not generate, the delight. It is true that chassidut does enable reception of wisdom from above but it is incomparable to that received by a master of the kabbalistic wisdom itself.
Originally all the Children of Israel had received directly from higher intelligence and all possessed a comprehension of this kabbalistic wisdom. When exile occurred and the Children of Israel were dispersed, as I said, the wifi connection with higher intelligence was severed.
What intuition they had remained with them but dwindled over the course of the millennia - as they had no constant connection with the source to provide sustained nourishment to their intellects.
There came a time when the sages of the generation saw the plight the Children of Israel were in and decided they would have to do something unprecedented. They developed a new technology, based on the original wisdom of kabbalah which some of them had retained a masterful knowledge of. This technology which became the chassidic tradition, would be capable of supplying the lost intuitive knowing to the children of Israel without their having to master the kabbalah as they had in ages past.
The purpose of chassidut is this: the intuition itself, even without knowing the wisdom which generates this intuition, serves as a receptacle for the original wisdom. If enough people possess a strong intuition higher intelligence will be able to reveal the wisdom once again like it did on Mount Sinai and the Children of Israel will be restored to their original pure state. An age of unprecedented flourishing will result for all humanity once a certain threshold is met. By the look of things, this process seems to be accelerating in real time.
First of all, I think the sources I mentioned in your previous question can also answer this question(s).
You ask, "is hassidut based on Tanach, Mishnah, Midrash or Gemara"? My short answer is, both! According to the Rambam (Hilchos Talmud Torah 1:12), the concept of "Pardes" (Peshat, Remez, Derush and Sod) can be found in the Talmud.
Rabbi Chayim Vital writes in his Shaarei Kedushah (1:2:8) that Pardes is the acronym for:
a) Peshat (the straightforward, simple meaning of the verses) b) Remez (the meaning that is intimated but not explicitly stated in the verses) c) Deroosh (The meaning arrived at through deeper investigation and analysis of the verses) d) Sod (The esoteric secrets of the verses) the Ruach level of his intellectual soul becomes a seat for the four letters of G-d’s name (הוי"ה) in the world of Formation (Yetzirah). Chassidus can be seen as the esoteric secrets of the Torah, also known as Sod.
Similary, the Maharal in his Gevuros HaShem explains:
In this respect, there is a difference between wisdom and prophecy. The scholar comprehending through intellect can grasp the most abstract and esoteric concepts.
And that is what Chassidus is all about, "comprehending through intellect in order to grasp the most abstract and esoteric concepts of Torah".
I would like to give you an explanation on what you ask "how do we know that hassidut has divine roots".
In different places, the concept of "words of the living G-d" is explained.
See for example the Gemara in Eruvin 13b:
Both these and those are the words of the living G-d.
The Gemara in Yoma 35b mentions that Hillel the Elder ascended to the roof of the study hall in order to hear the words of the living G-d from the spiritual leaders of that generation:
He ascended to the roof, suspended himself, and sat at the edge of the skylight in order to hear the words of the Torah of the living God from the mouths of Shemaya and Avtalyon, the spiritual leaders of that generation.
And, in Gittin 6b, Rabbi Evyatar asks Eliyahu if there is any uncertainty before Heaven:
Rabbi Evyatar said to him: G-d forbid, is there uncertainty before Heaven? Doesn’t G-d know what happened? Why does He mention both opinions? Elijah said to him: Both these and those are the words of the living G-d
Similary, see the story of the Rebbe Rashab where he encounters several men who were debating political opinions. They brought legit sources when answering and asked the Rebbe which one of the answers was right. The Rebbe answered that since the Torah is the absolute perfection of truth and goodness, it contains the best ideas which one may find in all ideologies (see: אגרות קודש אדמו"ר מוהרש"ב ד, Igrot Kodesh vol. 4, p. 200, cited from here: Inyana Shel Toras HaChassidus, III Torah: The Epitome of Perfection).
See footnote 6 to Inyana Shel Toras HaChassidus:
The Tzemach Tzedek knew what Chasidus is— a divine level of wisdom, the inner dimension of Torah
Sources that should be interesting for you to learn in order to get familiair with this concept:
- Kuntres Eitz HaChayim; by the Rebbe Rashab
- On the Study of Chassidus; by the Rebbe Rayatz (Frierdiker Rebbe)
- Tanya; by the Alter Rebbe
- Letter no. 475, 7 Nissan 5709 by the Lubavitcher Rebbe (Making beginning steps in the study of Chassidus)