Questions about epimorphisms and projectives in functor categories Suppose $I$ is a small category, $R$ is a ring and $_R\mathrm{Mod}$ is the category of left $R$-modules. How do I show that the category $[I,~_R\mathrm{Mod}]$ of all functors from $I$ to $_R\mathrm{Mod}$ is an abelian category with enough projectives and injectives?
It's my first time verifying the axioms of an abelian category and looking at projectives/injectives in a context different than that of modules. I think I can handle the abelian part on my own. However, in order to get a feel for the projectives I would like to ask a few questions:


*

*A natural transformation $F\stackrel{\alpha}{\Rightarrow} G$ with all $\alpha_i~(i\in I)$ epimorphisms is an epimorphism in the functor category. Are there any others?

*Are the functors $P:I\to~_R\mathrm{Mod}$, with all $P_i$ projective, projective, is this condition even necessary or sufficient? Is there a description of the projectives?

*Given a functor $F$, is there a simple description of a projective $P$ and an epimorphism $P\Rightarrow F\Rightarrow 0$? 


Even the simplest of examples $I\equiv\bullet\rightarrow\bullet$ i don't understand.
 A: Let $\mathcal{R} = [\mathcal{I}, R\text{-}\mathbf{Mod}]$, let $\mathcal{A} = [\mathcal{I}, \mathbf{Ab}]$, and let $\mathcal{S} = [\mathcal{I}, \mathbf{Set}]$. First, observe the following: there is an evident forgetful functor $\mathrm{Hom}_R (R, -) : \mathcal{R} \to \mathcal{A}$, and it has both a left adjoint $R \otimes_\mathbb{Z} {-} : \mathcal{A} \to \mathcal{R}$ and a right adjoint $\mathrm{Hom}_\mathbb{Z} (R, -) : \mathcal{A} \to \mathcal{R}$, induced by the corresponding functors when $\mathcal{I}$ is the terminal category. There is also an adjunction
$$F \dashv U : \mathcal{A} \to \mathcal{S}$$
that corresponds to the usual free–forgetful adjunction.
A well-known fact about functor categories $[\mathcal{I}, \mathcal{C}]$ is that the monomorphisms and epimorphisms are precisely the componentwise ones when $\mathcal{C}$ has kernel pairs and cokernel pairs. (Use the fact that a morphism is a monomorphism if and only if its kernel pair is trivial, and the fact that kernel pairs in $[\mathcal{I}, \mathcal{C}]$ are computed componentwise when $\mathcal{C}$ has kernel pairs.) This is true in particular for $\mathcal{R}$, $\mathcal{S}$, and $\mathcal{A}$. Thus we deduce that $\mathrm{Hom}_R (R, -)$ and $U$ preserve monomorphisms and epimorphisms. 
It is straightforward to show that $\mathcal{S}$ has enough projectives: indeed, every representable presheaf is projective (because they are free!), and every presheaf is a quotient of a coproduct of representable presheaves in a canonical way. Since $U$ preserves epimorphisms, we can use the adjunction $F \dashv U$ to deduce that $\mathcal{A}$ has enough projectives, and then we use $R \otimes_\mathbb{Z} {-} \dashv \mathrm{Hom}_R (R, -)$ to deduce that $\mathcal{R}$ has enough projectives. Note that componentwise projective diagrams need not be projective; see here for the case where $\mathcal{I} = \{ \cdots \to \bullet \to \bullet \to \bullet \to \cdots \}$.
For injectives, we have to do something non-trivial. I appeal to the following result:
Theorem. If $\mathcal{E}$ is a Grothendieck topos, then the category of internal abelian groups in $\mathcal{E}$ has enough injectives.
Of course, $\mathcal{S}$ is a Grothendieck topos, so we deduce $\mathcal{A}$ has enough injectives. Since $\mathrm{Hom}_R (R, -)$ preserves monomorphisms, we can use the adjunction $\mathrm{Hom}_R (R, -) \dashv \mathrm{Hom}_\mathbb{Z} (R, -)$ to deduce that $\mathcal{R}$ also has enough injectives. (An alternative approach would be to show that $\mathcal{R}$ is a Grothendieck abelian category; this is not too difficult since $\mathcal{R}$ is a locally finitely presentable category.)
A: @ZhenLin This is too long to fit into a comment.

Could you please give me some details? I don't understand what you mean by "Each representable presheaf $\mathcal I(i,−)$ is free because it occurs as the image of $1$ under the left adjoint of the evaluation-at-$i$ functor." I can see that there is an "evaluation at $i$ functor" given by
$$\begin{array}{rccl}
@_i:&[\mathcal{I},\mathbf{Set}]&\to&\mathbf{Set},\\
&F&\mapsto& Fi,\\
&\lbrace F\stackrel{\alpha}{\Rightarrow}G\rbrace&\mapsto &\lbrace Fi\stackrel{\alpha_i}{\rightarrow}Gi\rbrace
\end{array},$$
and that these most likely fit together to form a functor $@:\mathcal{I}\to [[\mathcal{I},\mathbf{Set}],\mathbf{Set}]$
I also know Yoneda lemma which describes the natural transformations from a represented, set-valued functor to any other set valued functor. Given 
$$\begin{array}{rcl}
h:&\mathcal I^{op}&\to&[\mathcal I,\mathbf{Set}],\\
&i&\mapsto&\mathrm{Hom}_{\mathcal I}(i,-)
\end{array},$$
there is a natural bijection
$$\mathrm{Hom}_{[\mathcal I,\mathbf{Set}]}(h(i),F)\simeq F(i)=@_i(F)$$
but I don't see how you get an adjunction (and between what categories?).
