Photon fan speed control

Hello, total beginner here.

I have been looking for ways to regulate the speed of a 12V axial fan.

The simplest way for me seem to be using the Particle Photon with a FET transistor.

I plan to build a simple Blynk app with just ON/OFF and a Slider (PWM).

Here is the sketch so far:

Does it look alright? The diode is 10KΩ.
I have tried to follow some tutorials and guides up to this point, but now I need help from more experienced people.