Some background, I've been a fullstack developer for some years now and have worked as a contractor for the last 1.5 years.
I've been with the same employer throughout my time as a contractor, and for the first 6 or 7 months I was working on an external project so it was already established (in other words we had no input on the tech stack since it was already a half finished product from another company). He worked as the liaison between the company and me as the sole developer (so he did not do any programming at all). When we finished working on the external project my employer extended my contract to the end of this year (2019) and transitioned into a startup to work on one of his ideas.
My employer asked me to be the technical lead, so throughout the development, I made decisions based on languages I'm very familiar with and can develop quickly in, which he was fine with. In particular some of the frameworks/libraries/languages used are React, ReactNative, NodeJS and so on.
Several times in the past my employer has aggressively argued about why my decisions have been terrible and has stated outright nonsensical facts about newer languages/frameworks. An example is recently the snide comment I received about how large the codebase is when 'all it does is insert into a database' when referring to the backend API I wrote. He also adamantly believes that using git to version control my code is 'absolute worst possible practice' (???). An argument that always pops up is his adamant belief that PHP is the greatest and only language anyone should use when writing anything server side.
I've also recently discovered that he doesn't actually know what object orientation is in programming and cannot actually program in any language other than quite admittedly basic PHP, HTML and CSS.
This is the tip of the iceberg as sometimes he brings his personal problems into the workplace, takes it out on me and always refuses to acknowledge when he's at fault. While not having the technical knowledge, he expects me to be able to do everything at light speed and is constantly disappointed/aggravated when something takes me longer than a day.
TL;DR;
Older employer I've worked with for a while questions and berates my decisions and refuses to even try to understand newer tech, while also maintaining he can't do this project without my technical knowledge.
I've never been in this situation before, so I'm unsure how to handle communication between us as he gets very personal and applies the strawman fallacy in every single discussion.
I want to quietly leave when my contract expires at the end of this year, although I fear he really wants to me stay on board since he's aware that he cannot complete this project without me.
In the meantime, how can I communicate effectively that if he constantly questions my decisions, I am unable accomplish anything and that his comments about my decisions (which he thinks are focused on the technology, but are actually very personally pointed to me) are actually incredibly unproductive and rude, and how do I let him know that I plan to seek other opportunities in the new year?
Posting as anonymous for obvious reasons.