Skip to content

NHL-P2-INF2-DP/netflix-clone

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 This is a Next.js project bootstrapped with create-next-app.

👥 Project Members

  • Bram Suurd #5371333
  • Jesse van der Voet #5405416
  • Elmedin Arifi #5429897
  • Bryan Potze #5378265

🚧 Getting Started

To deploy this project using Docker Compose, follow these steps:

  1. Clone the repository:
git clone https://github.com/NHL-P2-INF2-DP/netflix-clone.git
cd netflix-clone
  1. Copy the .env.example file to .env and update the environment variables as needed:
cp .env.example .env
  1. Start the Docker containers:
docker-compose up --build

The application and the PostgreSQL database will now be running. The application will be accessible at http://localhost:3000.

Open http://localhost:3000/api/v1/documentation with your browser to see the full documentation for all the routes. (build on top of the OpenAPI specification)

Default Login Credentials

You will be able to login with the following credentials:




🚀 Extra Libraries used

🚧 Commit Message Guidelines

This project follows a specific commit message format. Please use one of the following types:

  • ci: Changes to CI configuration files and scripts
  • chore: Maintenance tasks, such as updating dependencies or fixing code style
  • docs: Changes to documentation
  • ticket: Changes related to a specific ticket or issue
  • feat: New features or functionality
  • fix: Bug fixes
  • perf: Performance improvements
  • refactor: Code refactoring
  • revert: Reverting previous changes
  • style: Changes to code style or formatting

you wont be able to commit without a type, so make sure to add one.

🚨 Quirks

  • To add new env variables, add them to the .env.example file and head over to @/lib/env.ts to add them to the EnvSchema. this will allow you to access them in your app in a type-safe manner.

Documentation

The ERD for this project can be found in the documentation/erd.md file.

The routes for this project can be found in the documentation/routes.md file.

The class-diagram for this project can be found in the documentation/class-diagram.md file.

🔄 Database Backup System

The project includes an automatic backup system for the PostgreSQL database.

Automatic Backups

  • Backups are created automatically every 4 hours
  • The system keeps the last 5 backups plus a latest.sql file
  • Backups are stored in the ./backups directory

Manual Operations

You can manually trigger backup and restore operations:

# Create a backup
docker-compose exec -T backup-service ./backup-service.sh create_backup

# Restore from latest backup
docker-compose exec -T backup-service ./backup-service.sh restore_from_backup

The -T flag makes the command run non-interactively (returns to prompt after completion).

Backup Files

  • Latest backup: ./backups/latest.sql
  • Timestamped backups: ./backups/backup_YYYYMMDD_HHMMSS.sql

Important Notes

  • The backup service runs automatically in the background
  • Manual operations don't interrupt the automatic backup schedule
  • Restoring will completely replace the current database with the backup
  • Make sure to backup before any major changes
  • Database restoration only occurs when manually triggered with the restore command

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published