🚀 This is a Next.js project bootstrapped with create-next-app
.
- Bram Suurd #5371333
- Jesse van der Voet #5405416
- Elmedin Arifi #5429897
- Bryan Potze #5378265
To deploy this project using Docker Compose, follow these steps:
- Clone the repository:
git clone https://github.com/NHL-P2-INF2-DP/netflix-clone.git
cd netflix-clone
- Copy the .env.example file to .env and update the environment variables as needed:
cp .env.example .env
- 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)
You will be able to login with the following credentials:
- Email:
[email protected]
- Password:
password123
- Role:
Junior
- Email:
[email protected]
- Password:
password123
- Role:
Medior
- Email:
[email protected]
- Password:
password123
- Role:
Senior
- @tanstack/react-query - Fetching data on the client
- @tanstack/react-table - Table component
- zod - Validation
- ShadCN - UI components
- better-auth - Authentication
- prisma - Database ORM
- pino - Logging
- scalar - Documentation
This project follows a specific commit message format. Please use one of the following types:
ci
: Changes to CI configuration files and scriptschore
: Maintenance tasks, such as updating dependencies or fixing code styledocs
: Changes to documentationticket
: Changes related to a specific ticket or issuefeat
: New features or functionalityfix
: Bug fixesperf
: Performance improvementsrefactor
: Code refactoringrevert
: Reverting previous changesstyle
: Changes to code style or formatting
you wont be able to commit without a type, so make sure to add one.
- To add new env variables, add them to the
.env.example
file and head over to@/lib/env.ts
to add them to theEnvSchema
. this will allow you to access them in your app in a type-safe manner.
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.
The project includes an automatic backup system for the PostgreSQL database.
- 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
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).
- Latest backup:
./backups/latest.sql
- Timestamped backups:
./backups/backup_YYYYMMDD_HHMMSS.sql
- 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