MediaRate is a full‑stack personal media platform where users can discover and rate movies and books, create custom lists, and interact with other users. The project consists of a Node.js & Express.js RESTful API, a PostgreSQL database, and a Tailwind CSS + Vanilla JavaScript web frontend.
-
User Management
- Register / login / logout
- JWT‑based authentication
- Password reset flow
- Profile editing (avatar, bio, etc.)
-
Content Management
- Movie and book search
- Detailed content pages
- TMDb and Google Books API integrations
- Persisting content to the database with simple caching logic
-
Ratings & Reviews
- 1–10 rating system
- Add, edit, and delete reviews
- Average rating and user history
-
Social Features
- Follow / unfollow users
- Personalized feed (activities of followed users)
- Like and comment on activities
-
List Management
- Default lists: Watched, Watchlist, Read, To‑Read
- Create, edit, and delete custom lists
- Public / private lists
- Cover image previews on list cards
-
User Experience
- Responsive (mobile‑friendly) design
- Dark / Light theme support
- Toast notifications and loading states
- Infinite scroll for a smooth feed experience
-
Backend
- Node.js
- Express.js
- PostgreSQL
- JWT (JSON Web Token)
- bcrypt
- dotenv
- axios
-
Frontend
- HTML5
- Tailwind CSS
- Vanilla JavaScript
-
External Services
- TMDb (The Movie Database) API
- Google Books API
.
├── backend/ # Node.js/Express API server
│ ├── config/ # Database configuration
│ ├── controllers/ # Business logic (auth, feed, content, lists, etc.)
│ ├── middleware/ # Auth, upload, and other middleware
│ ├── routes/ # REST API endpoints
│ ├── uploads/ # Uploaded avatars and other files
│ └── server.js # Express entry point
├── database/ # PostgreSQL connection and table setup scripts
│ ├── db.js
│ └── tables.js
└── frontend/ # Static frontend (HTML, CSS, JS)
├── index.html
├── pages/ # Feed, profile, content, lists, auth pages
└── scripts/ # Page‑specific JS filesThe following steps are for running the project in a local development environment.
git clone https://github.com/Prolab-Project/Kisisel-Medya-Platformu.git
cd Kisisel-Medya-Platformu-
Create a PostgreSQL database:
CREATE DATABASE mediarate;
-
Update connection settings in
database/db.js(host, user, password, database, port) according to your local environment. -
Create tables and relationships:
cd database npm install # if needed node tables.js cd ..
cd backend
npm installCreate a .env file in the backend directory and add at least the following variables (example):
PORT=5000
JWT_SECRET=super_secret_key
PGHOST=localhost
PGUSER=postgres
PGPASSWORD=postgres
PGDATABASE=mediarate
PGPORT=5432
TMDB_API_KEY=YOUR_TMDB_KEY
GOOGLE_BOOKS_API_KEY=YOUR_GOOGLE_BOOKS_KEYnpm start
# or
node server.jsBy default, the server will run at http://localhost:5000.
The frontend is a static application and can be served in two ways:
backend/server.js is configured to serve the frontend folder statically. Once the backend is running, you can access the UI via:
http://localhost:5000/index.html- or specific pages such as
feed.html,login.html, etc.
If you prefer to run a separate dev server for the frontend:
cd frontend
# For example, using live-server:
npx live-server .For all endpoints, please check the
backend/routesandbackend/controllersdirectories.
-
Auth
POST /auth/register– RegisterPOST /auth/login– LoginPOST /auth/forgot-password– Request password resetPOST /auth/reset-password– Reset password
-
User & Profile
GET /users/me– Get current userGET /profile/:username– Get user profile and statsPUT /profile– Update profile
-
Feed & Social
GET /feed– Get feed of followed usersPOST /follow/:userId– Follow userDELETE /follow/:userId– Unfollow user
-
Content
GET /content/search– Search movies/booksGET /content/:id– Get content detailsPOST /rating– Add or update ratingPOST /review– Add review
-
Lists
GET /list– Get user listsPOST /list– Create new listPOST /user-lists/:listId/items– Add item to list
- The project follows a modular architecture (clear separation of controllers, routes, middleware).
- Database relations (users, contents, ratings, reviews, activities, user_lists, followers, likes, comments, etc.) are modeled in detail.
- Security relies on JWT, bcrypt, and dedicated auth middleware.
- On the frontend, Tailwind CSS is used for rapid prototyping and responsive design.
- Fork this repository.
- Create a new branch:
feature/your-feature-name - Commit your changes.
- Open a Pull Request.
This project has been developed for educational purposes. A dedicated LICENSE file can be added to this repository if needed.