How solclarus/movie-log works
Project type and purpose
• This is a full-stack web application built with Next.js (App Router).
• It provides localized pages under app/[locale] (sign-in, sign-up, dashboard, movie/person/search listings).
• It integrates with:
– An external TMDB API for movie/person data (via lib/tmdb/*)
– An authentication layer (via app/api/auth/[...all]/route.ts and lib/auth*)
– A database (Prisma ORM under prisma/) for persisting user records
File structure
• app/
– UI routes (SSR/SSG) per locale
– API routes under app/api/auth
– React server & client components (pages, layouts)
• components/
– Reusable UI primitives and composite widgets (auth forms, movie-cards, UI library)
• lib/
– Data-access modules (auth-client, record, TMDB client)
• prisma/
– Schema and migration scripts for relational database
• config, constants, env.ts, i18n, hooks, schemas
– Configuration, type definitions, internationalization, request schemas
• next.config.ts, middleware.ts
– Next.js configuration, global middleware (locale detection, auth)
Interactions & data flows
• Browser → Next.js Server
– Page requests → SSR/SSG rendering via React server components
– API calls → app/api/auth endpoints (login, logout, session)
• Next.js Server → Database
– Prisma client executes queries for user data, records
• Next.js Server → External TMDB API
– TMDB client modules fetch movie/person/search data
• Middleware
– Reads cookies/headers for auth token & locale, routes or redirects
Architectural patterns
• React Server Components & Client Components (App Router)
• Modular “lib” layer for external integration & business logic
• Prisma ORM for schema-driven data model
• i18n routing via dynamic [locale] segments
• Atomic UI component library for design consistency
Technologies & frameworks
• Next.js with App Router, Middleware
• React + TypeScript
• Prisma ORM + PostgreSQL/MySQL
• TMDB REST API wrapper
• Biome/eslint for linting, PostCSS for styling
• Vercel (likely) for deployment/CDN