You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GameDB is a full-stack game discovery platform that connects gamers with their next favorite titles. It integrates the RAWG Video Games Database API to provide a rich catalog of games, complete with details, screenshots, trailers, and ratings. Users can browse, search, review, and wishlist games, while writers can submit custom game entries. Administrators have full moderation and analytics capabilities. Built with modern web technologies, it emphasizes user experience, responsive design, and role-based access control.
Home Page
→ Hero Slider (featured games from RAWG)
→ Popular / New / Upcoming / Top Rated sections
→ Click Game Card
→ Game Detail Page (cover, screenshots, trailers, description, details)
→ Browse Reviews → Submit Review
→ Add to Wishlist
Review Submission Flow
Game Detail Page
→ Review Section
→ Select Rating (1–5 Stars)
→ Write Comment
→ Submit Review (auto-approved for public games)
→ Review appears in game detail & user dashboard
→ Admin can moderate (approve/pending/reject)
Custom Game Publishing Flow
User Dashboard → Custom Games
→ Add New Custom Game
→ Fill Form (Title, Description, Genre, Platforms, Screenshots, Tags)
→ Submit (status: pending)
→ Admin Review → Published / Draft / Archived
→ Appears in Custom Game Catalog (if published)
Authentication & Authorization Flow
Login / Register
→ NextAuth Credentials Provider
→ Password hashing (bcrypt)
→ JWT Session (7-day expiry)
→ Role-based route protection (User / Admin)
→ Ban detection on every request
→ Dashboard Access (user or admin based on role)
API Endpoints
Public Endpoints
Method
Route
Description
GET
/api/games
Fetch games from RAWG
GET
/api/games/[id]/reviews
Paginated approved reviews for a game
GET
/api/hero-games
Featured games for hero slider
POST
/api/register
Create new user account
Authenticated User Endpoints
Method
Route
Description
GET/POST/DELETE
/api/user/favorites
Wishlist CRUD
GET
/api/user/reviews
List user's reviews (paginated, filterable)
GET/POST
/api/user/custom-games
Custom game listing & creation
PATCH
/api/user/custom-games/[id]
Update custom game
GET/PATCH/DELETE
/api/user/profile
Profile management (read, update, delete)
GET
/api/user/stats
User dashboard statistics
GET
/api/user/charts
User chart data (reviews, ratings, wishlist over time)
GET
/api/user/activity
Recent user activity feed
Admin Endpoints
Method
Route
Description
GET
/api/admin/stats
Platform-wide statistics
GET/PATCH/DELETE
/api/admin/users/[id]
User management (ban/unban/delete)
GET
/api/admin/games
Game activity overview
GET/PATCH/DELETE
/api/admin/reviews/[id]
Review moderation (approve/reject/delete)
GET/PATCH/DELETE
/api/admin/custom-games/[id]
Custom game moderation (publish/draft/archive/delete)
GET
/api/admin/charts
Platform chart data
GET
/api/admin/activity
Platform activity feed
Auth Endpoints
Method
Route
Description
GET/POST
/api/auth/[...nextauth]
NextAuth handlers (login, logout, session)
Security Considerations
Authentication: NextAuth v5 with JWT session tokens (7-day expiration) and bcrypt password hashing
Protected Routes: Middleware-based route protection with role-based access control (User/Admin)
Ban System: Banned users are detected in auth middleware and restricted to public pages
Database Security: MongoDB Atlas with environment-variable-secured credentials
Password Protection: Password field excluded from default queries via Mongoose select: false
Input Validation: Mongoose schema validation, max-length constraints on text fields
Session Persistence: JWT tokens survive page reloads; no data loss
Environment Management: All API keys and secrets stored in .env.local (gitignored)
Image Handling: External image domains whitelisted in Next.js config; ImageBB for user uploads
Rate Limiting: RAWG API responses cached with 1-hour ISR revalidation
User Roles & Permissions
<<<<<<< HEAD
Feature
Visitor
User
Admin
Browse Game Catalog
✅
✅
✅
View Game Details
✅
✅
✅
Search & Filter Games
✅
✅
✅
Submit Reviews
❌
✅
✅
Manage Own Reviews
❌
✅
✅
Add to Wishlist
❌
✅
✅
Manage Own Wishlist
❌
✅
✅
Submit Custom Games
❌
✅
✅
Manage Own Custom Games
❌
✅
✅
View Own Dashboard & Analytics
❌
✅
✅
Moderate All Reviews
❌
❌
✅
Moderate All Custom Games
❌
❌
✅
Manage All Users (Ban/Delete)
❌
❌
✅
View Platform Analytics
❌
❌
✅
View Platform Activity Feed
❌
❌
✅
System Status Monitoring
❌
❌
✅
Delete Own Account
❌
✅
❌
=======
Feature
Visitor
User
Admin
:-----------------------------
:-----:
:--:
:---:
Browse Game Catalog
✅
✅
✅
View Game Details
✅
✅
✅
Search & Filter Games
✅
✅
✅
Submit Reviews
❌
✅
✅
Manage Own Reviews
❌
✅
✅
Add to Wishlist
❌
✅
✅
Manage Own Wishlist
❌
✅
✅
Submit Custom Games
❌
✅
✅
Manage Own Custom Games
❌
✅
✅
View Own Dashboard & Analytics
❌
✅
✅
Moderate All Reviews
❌
❌
✅
Moderate All Custom Games
❌
❌
✅
Manage All Users (Ban/Delete)
❌
❌
✅
View Platform Analytics
❌
❌
✅
View Platform Activity Feed
❌
❌
✅
System Status Monitoring
❌
❌
✅
Delete Own Account
❌
✅
❌
0cedaf2 (Added user profile management with image upload and display.)
Performance & Scalability
Pagination: Server-side pagination on reviews, favorites, and custom games for efficient data loading
Skeleton Loaders: Loading states on all pages for improved perceived performance
Image Optimization: Next.js Image component with remote pattern configuration for RAWG CDN
Caching Strategy: RAWG API responses cached with ISR (1-hour revalidation) to stay under rate limits
CDN Delivery: Vercel's edge network for global static asset delivery
Responsive Design: Mobile-first, works across all device sizes
Dark Mode: Built-in theme switching with next-themes
Future Enhancement Opportunities
User Reviews & Ratings: Implement a rating system with user feedback on helpfulness
Advanced Search: Full-text search with Elasticsearch or MongoDB Atlas Search
Social Features: User following system, game recommendations, activity feeds
Gaming Communities: Forums, discussion boards, and community events per game
Game Lists: Curated lists (e.g., "Best RPGs of 2024") and user-created collections
Achievements & Badges: Gamification elements to encourage platform participation
Comparison Tools: Side-by-side game comparisons, price tracking
Mobile App: Native iOS/Android apps for on-the-go game discovery
API Rate Limiting: Implement rate limiting on user-facing API routes
Email Notifications: Review responses, wishlist price changes, new game alerts
OAuth Providers: Add Google, GitHub, or Discord authentication options
Multi-language Support: Internationalization for a global audience
About
A full-stack game discovery and review platform built with Next.js 16, Tailwind CSS, and MongoDB. Features RAWG API integration, role-based user/admin dashboards, review moderation, and personalized wishlists.