How jean-patrick2026/rot_tom- works
Rotten_Tomattoes is a Next.js film-catalogue and community app, with account/profile management, user ratings and comments, favorites, and admin movie/user screens. The visible rating workflow runs from the review form through a server action that authenticates the user, stores or updates a review, recalculates the film average, and revalidates pages. The README documents Prisma/MySQL models; sampled code confirms some database access paths, but not all UI wiring or service implementations, so uncertain connections are omitted.
Main entry points: auth.ts Auth configuration · prisma.ts Prisma client · reviewAction.ts Save rating · user.service.ts User service
Components 25
Film experience
- Home page
app/page.tsx - Movie catalogue
components/movie/MoviesCatalogue.tsx - Film detail
app/film/[id]/page.tsx - Review form
components/review.tsx - Save rating
app/actions/reviewAction.ts - Comments API
app/api/comment/route.ts - Delete comment
app/api/comment/[id]/route.ts - Favorites
app/actions/favoriteAction.ts - User dashboard
app/dashboard_user/page.tsx
Accounts and admin
- Login and register
app/(auth)/login/page.tsx - Auth route
app/api/auth/[...nextauth]/route.ts - Auth configuration
lib/auth.ts - Registration API
app/api/register/route.ts - User service
services/user.service.ts - Profile API
app/api/profile/infos/route.ts - Profile pages
app/profile/page.tsx - Admin screens
app/Admin/page.tsx
Movie data
- Catalogue API
app/api/movies/route.ts - Movie service
services/movie.service.ts - TMDB API route
app/api/tmdb/route.ts - TMDB service
services/tmdb.service.ts
Application runtime
- Prisma client
lib/prisma.ts - MySQL database
Other components
- Visitor
- TMDB
Connections 18
- Visitor → Home page: opens
- Visitor → Login and register: signs in
- Visitor → Film detail: views film
- Review form → Save rating: submits rating
- Save rating → Auth configuration: checks session
- Save rating → Prisma client: writes and aggregates
- Comments API → Prisma client: reads and creates
- Delete comment → Auth configuration: checks session
- Delete comment → Prisma client: reads and deletes
- Registration API → User service: registers user
- Registration API → Auth configuration
- User service → Prisma client: reads and creates
- Profile API → Auth configuration: checks session
- Profile API → User service: updates profile
- Catalogue API → Auth configuration: checks admin
- Catalogue API → Movie service: manages movies
- TMDB API route → TMDB service: searches or lists
- TMDB service → TMDB: requests movie data