Skip to content

Web application to manage your movie library. Track watched, pending, and in-progress movies with automatic TMDB synchronization.

License

Notifications You must be signed in to change notification settings

IvanPerez9/WatchLog

Repository files navigation

WatchLog - Movie Tracker

Web application to manage your movie library. Track watched, pending, and in-progress movies with automatic TMDB synchronization.

πŸ“– Read this in: EspaΓ±ol

🌐 Live Demo

https://watchlog-vtlx.netlify.app/ - Hosted on Netlify

See all features in action: authentication, adding movies with poster search, rating system, filters, and more.

WatchLog Demo

πŸ“‹ Table of Contents

πŸ“– Description

Web application to manage your movie library. Track watched, pending, and in-progress movies with automatic TMDB synchronization.

Why does it exist?

WatchLog was born from the need to have a single centralized place to manage all your entertainment content. Tired of using third-party applications or CSVs to record what movies you watched.

Future vision: Expand beyond movies to include TV series and books. A unified space where you own your data and can access it from any device, anytime.

Principles

  • 🎯 Centralized - All your content in one place
  • πŸ”’ Private - Your data, your server, no spying algorithms
  • πŸ“± Accessible - From mobile, tablet or desktop
  • πŸš€ Open - Open source, you can fork and customize

✨ Features

Core

  • 🎬 Complete CRUD - Create, read, update and delete movies
  • πŸ” Secure Authentication - Token-based with database validation
  • πŸ’Ύ Persistence - All data stored in PostgreSQL (Supabase)

Search and Filtering

  • πŸ” Global Search - By title or year across your entire library
  • 🎭 Filter by Status - Pending, Watched, Watching, Favorite
  • πŸ“Š Statistics - Visualize movie count by status

Data and Synchronization

  • πŸ–ΌοΈ Automatic Posters - TMDB synchronization
  • πŸ’» Background Sync - Non-blocking interface for poster sync

Interface

  • πŸ“± Responsive Design - Works on mobile, tablet and desktop
  • ⚑ Ultra Fast - Instant loading, built with Vite

πŸ“‹ Requirements

  • Node.js 16 or higher
  • npm or yarn
  • Account on Supabase (free)
  • API key from TMDB (free)

πŸš€ Installation

1. Fork the repository

πŸ‘‰ Click "Fork" button on GitHub to create your own copy.

Then clone your fork:

git clone https://github.com/YOUR-USERNAME/WatchLog.git
cd WatchLog

2. Install dependencies

npm install

3. Configure Supabase

  1. Create a free account on Supabase
  2. Create a new project
  3. Go to SQL Editor and execute SUPABASE_SETUP.sql from this repo
  4. Copy your credentials:
    • VITE_SUPABASE_URL: Settings β†’ API β†’ Project URL
    • VITE_SUPABASE_ANON_KEY: Settings β†’ API β†’ anon key

4. Configure environment variables

Create a .env file in the root (never commit this!):

VITE_SUPABASE_URL=https://your-project.supabase.co
VITE_SUPABASE_ANON_KEY=your_anon_key
VITE_TMDB_API_KEY=your_tmdb_api_key
VITE_AUTH_TOKEN=your_secret_token_here

⚠️ Security: Add .env to .gitignore - it's already there, never push this file!

Reference: See .env.example for the structure

5. Get TMDB API Key (Optional but Recommended)

  1. Register on TMDB
  2. Create an API key (free tier available)
  3. Add it to .env as VITE_TMDB_API_KEY

6. Create your auth token

Generate a strong random token (no spaces):

# Linux/Mac
node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"

# Or use any online generator: https://random.org/strings/

Then:

  1. Add it to .env as VITE_AUTH_TOKEN
  2. Add it to Supabase: SQL Editor β†’ Insert into valid_tokens table

7. Start development

npm run dev

Open http://localhost:3000

πŸ’» Usage

Public Access (Read-Only)

  • πŸ‘οΈ View your movies
  • πŸ” Search by title or year
  • 🎭 Filter by status
  • πŸ“Š View statistics

Authenticated Access (Write)

Enter your token in the app to:

  • βž• Add new movies
  • ✏️ Change movie status
  • πŸ—‘οΈ Delete movies
  • πŸ”„ Auto-sync posters with TMDB

πŸš€ Deploy

Netlify (Recommended)

  1. Push to GitHub
  2. Connect to Netlify
  3. Automatic configuration:
    • Build: npm run build
    • Publish: dist
  4. Add environment variables in dashboard
  5. ✨ Automatic deploy on each push

πŸ› οΈ Technologies

Layer Technology Purpose
Frontend React + Vite Interactive UI
Styles Tailwind CSS Responsive styling
Icons Lucide React Modern icons
Backend Supabase PostgreSQL + REST API
External Data TMDB API Movie information
Auth Token-based Security

πŸ“ Project Structure

watchlog/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ app.jsx              # Main component
β”‚   β”œβ”€β”€ config.js            # Configuration
β”‚   β”œβ”€β”€ api/
β”‚   β”‚   β”œβ”€β”€ supabase.js      # REST client
β”‚   β”‚   └── tmdb.js          # TMDB client
β”‚   β”œβ”€β”€ auth/
β”‚   β”‚   └── useAuth.js       # Auth hook
β”‚   └── components/
β”‚       β”œβ”€β”€ MovieCard.jsx    
β”‚       β”œβ”€β”€ AddMovie.jsx     
β”‚       β”œβ”€β”€ Filters.jsx      
β”‚       └── Stats.jsx        
β”œβ”€β”€ index.html
β”œβ”€β”€ package.json
β”œβ”€β”€ vite.config.js
β”œβ”€β”€ .env.example
└── README.md

πŸ’» Development

Available Scripts

npm run dev      # Development with HMR
npm run build    # Optimized build
npm run preview  # Build preview

Environment variables in development

Use .env.example as reference for new contributors.

πŸ“„ License

This project is under the MIT license.

You are free to:

  • βœ… Use in personal projects
  • βœ… Use in commercial projects
  • βœ… Modify the code
  • βœ… Distribute

Conditions:

  • πŸ“ Include copy of the license

See LICENSE for more details.

πŸš€ Future Improvements

Phase 2 - Export & Analytics

  • CSV/JSON export functionality
  • Advanced filters (by year range, director, etc.)
  • Sort options (by rating, date added, etc.)

Phase 3 - TV Series Support

  • Separate series table in database
  • TMDB TV API integration
  • Series card component with episodes/seasons
  • Series management (add, edit, delete, rate)
  • Search and filter for series

Phase 4 - Books Support (Q2 2026)

  • Separate books table in database
  • Google Books API or OpenLibrary integration
  • Book card component with author/ISBN
  • ISBN search capability
  • Books management (add, edit, delete, rate)

Phase 5 - Advanced Features

  • Custom lists and collections
  • Dark/Light theme toggle
  • ...

About

Web application to manage your movie library. Track watched, pending, and in-progress movies with automatic TMDB synchronization.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published