Full Stack Web App with Next.js App Router and PostgreSQL - Movie App

Jul 3, 2025

software-development

Lately, I built a full stack movie app using Next.js App Router and PostgreSQL to get more comfortable with the App Router features. I’ve also decided to share it. This post serves as a companion to the source code, aiming to help readers understand the project by providing an overview of the project structure along with explanations of various files and directories. In case reader is interested in a specific file, they can dive into the source code, which also contains comments.

It is assumed that the reader has a basic familiarity with the Next.js App Router. If so, this post should be a helpful addition—together with the source code—for anyone trying to understand how this project was implemented.

Below is the project structure with explanations. Feel free to expand the sections you’re interested in.

movie-app source code:

+
actions
Contains server actions.
+
app
This is Nextjs app directory. Folders inside it define route structures.
+
components
React client/server components.
+
hooks
Custom React hooks.
+
lib
Folder for some server-side logic.
middleware.ts
Middleware for protecting routes based on authentication.
utils.ts
Shared utilities for server and client.

Source Code

You can find the source code here.