$\let\l=\lambda \def\tE{t_{\rm E}} \def\xE{x_{\rm E}} $
I'm going to offer you a derivation making no use of time dilation,
length contraction, Lorentz transformations.
You have two (inertial) frames: Earth's one, say E, and spaceship's
one, say S. It's assumed that spaceship is receding from Earth at a
velocity $v$ - the same can be said of Earth in spaceship's frame.
Source in S is emitting a monochromatic wave of period $T$. You want
to know how to find received period $T'$ on Earth, i.e. in E frame.
Instead of thinking of the full wave system it's useful to single out
e.g. wave crests as distinct objects. Two consecutive crests are
separated in time by period $T$ and in space by wavelength $\l=c\,T$.
In all frames crests propagate with velocity $c$.
Assume a given crest #1 is emitted form source in $x=0$ at time $t=0$.
(Actually this is no assumption - we simply choose origins of space and
time coordinates in S accordingly.) We may think of a crest as having
a world-line in spacetime: its equation is
$$x_1 = c\,t_1.\tag1$$
The next crest #2 is emitted in $x_2=0$ at time $t_2=T$, so its
world-line equation is
$$x_2 = c\,(t_2 - T).\tag2$$
A third step is to write Earth's world-line equation in S. It is
$$\xE = a + v\,\tE.\tag3$$
The constant $a$ is unknown but you'll see it disappears in the
following.
And now we have to consider arrival events $E_1$, $E_2$ when both
crests reach the Earth. As to $E_1$ this happens when
$$t_1 = \tE \qquad x_1 = \xE.$$
Using (1) and (3) we find
$$t_1 = {a \over c - v} \qquad x_1 = {a\,c \over c - v}.\tag4$$
As to $E_2$ we have
$$t_2 = \tE \qquad x_2 = \xE$$
and from (2), (3) we get
$$t_2 = {a + c\,T \over c - v} \qquad
x_2 = {c\,(a + v\,T) \over c - v}.\tag5$$
This far SR almost didn't enter - almost, because we assumed that
light speed is $c$ in spaceship's frame and this frame has nothing
special, so how can we assume that? Of course, thanks to SR's
postulates.
But now the time has come to make a heavier use of SR. As I said in
the beginning I'll use neither dilations nor contractions nor Lorentz.
I'll only apply invariance of spacetime interval. In defining
spacetime interval not a single event is involved but a couple of
events, e.g. our $E_1$ and $E_2$. Given their coordinates in a frame,
like S, the spacetime interval between $E_1$ and $E_2$ is defined as
$$s = c^2 (t_2 - t_1)^2 - (x_2 - x_1)^2.$$
For the same events we can also compute interval in another frame, say
E. If coordinates in E are $(t_1',x_1')$ for $E_1$, $(t_2',x_2')$ for
$E_2$, the spacetime interval in E is
$$s' = c^2 (t_2' - t_1')^2 - (x_2' - x_1')^2.$$
Invariance simply means $s=s'$ (actually, spacetime interval has the
same value in every inertial frame).
Since we know coordinates in S (eqs. (4), (5)) we can compute $s$. But
what about frame E? Although we don't know the $x'$-coordinates, we are
certain they are the same for both events, since both happen on Earth.
As to time coordinates, their difference $t_2'-t_1'$ is nothing but
the received period $T'$. So
$$s' = c^2 {T'}^2.\tag6$$
Let's compute $s$:
$$s = c^2 {c^2 T^2 \over (c - v)^2} - {c^2 v^2 T^2 \over (c - v)^2} =
c^2 T^2 {c^2 - v^2 \over (c - v)^2} = c^2 T^2\,{c + v \over c - v}.\tag7$$
By comparing (6) and (7) we obtain $T'$:
$$T' = T\,\sqrt{c + v \over c - v}.$$
Once you know $T'$ it's easy to deduce $\l'$ and $f'$.