Introduction

This project is a Next.js template for applications that include a social feed with posts, authentication, and a modular frontend architecture. It is designed to work with a backend built with NestJS, Prisma ORM, PostgreSQL, and Docker.

Project Purpose

The template provides a production-ready base with email/password login, a social feed (posts with text, photo, and video), and clear separation of concerns across the frontend layers.

Tech Stack

Frontend

  • Next.js 16 (App Router)
  • TypeScript
  • ShadcnUI + Tailwind CSS
  • next-intl (i18n: English, Japanese)
  • React Hook Form + Zod (validation)
  • NextAuth.js (session, credentials provider)

Backend

The API is built with NestJS, Prisma ORM, PostgreSQL, and Docker. See the Backend section for details.

Architecture

The frontend follows a 5-layer modular structure to keep imports one-directional and features self-contained:

  • App (src/app/) — Routing only
  • Features (src/features/) — Business modules (auth, social, docs)
  • Shared (src/shared/) — Cross-feature code
  • Core (src/core/) — Infrastructure (API client, auth config, utils)
  • UI (src/components/ui/) — ShadcnUI primitives

Lower layers do not import from higher layers. Each feature exposes a public API via index.ts.