GirlsFlix is a web app that allows you to search for TV series and add your favorites so you never miss any new episode.
It is a Java school project developed by 3 students from CentraleSupélec : Jihane, Sophie, and Delphine as part of the POOA Module.
The GirlsFlix web app allows you to:
- 📺 Browse through TV series
- 🔍 Search for specific series and filter by genre
- 📄 Get details about a series
- 👤 Log in to your profile and customize it
- 🌟 Add your favorites
- 📬 Get a notification when a new episode of one of your favorite series will be aired soon
- 🎁 Be surprised with a random popular series suggestion
- 💬 Get recommendations based on your preferred genres
If you want to test notifications quickly, try adding a series with a "Prochainement" badge. 😉
Add Keys.java
in src/main/java/com.gfx
(ignored by Git).
package com.gfx;
public class Keys {
public static final String apiKey = "${tmdb_api_key}";
public static final String mongoUser = "${mongo_user}";
public static final String mongoPwd = "${mongo_password}";
public static final String mongoHost = "${mongo_host}";
public static final String mongoDb = "${mongo_db}";
public static final String mysqlUser = "${mysql_user}";
public static final String mysqlPwd = "${mysql_password}";
public static final String mysqlHost = "${mysql_host}";
public static final String mysqlDb = "${mysql_db}";
}
Eclipse IDE for Java EE
Web Developers (Photon v4.9.0
) - download link.
File -> Import...
Maven -> Existing Maven Projects -> Next
Browse
girlsflix/GirlsFlix -> Finish
In the Project Explorer panel, Right Click on the project GirlsFlix -> Maven -> Update Maven Project -> Force Update of Snapshots/Releases
In the Project Explorer panel, Right Click on the project GirlsFlix -> Run As -> Maven Build...
Add Goals
: clean install
. Click Apply
and Run
.
In the Project Explorer panel, Right Click on the project GirlsFlix -> Run As -> Run on Server
You can then go to localhost:8080/GirlsFlix and voilà! 🎉
If you have a bad internet connection, fetching all the series from the database might take more than 45s so you will want to increase start up time.
Open the Servers view -> double click tomcat -> drop down the timeouts section -> increase Start time
This is normal. The text that is in red is being written to the System.err stream, the text in black is written to System.out. Nothing is inherently wrong, that's just how the system is differentiating the output streams. You can configure the display to your liking by : right-click in the console > "Preferences" > "Standard Error text" > Choose the color you want, for example black.
Technology stack:
src
└─ main
├─ java // nos classes java
| └─ com
| └─ gfx // com.gfx notre package de base
| ├─ controller // nos controllers qui reçoivent les requêtes, utilisent les services et préparent les données renvoyées avec les vues jsp
| ├─ domain // classes qui définissent notre domaine
| | ├─ series // classes qui définissent les séries
| | └─ users // classes qui définissent les utilisateurs
| ├─ service // les services
| ├─ Config.java // configuration générale
| ├─ Keys.java // clés et mots de passe
| ├─ SpringConfig.java // la configation de spring
| └─ SpringSecurity.java // les profils d'exécution
└─ webapp // les fichiers qui vont à la racine de l'application web
├─ css
├─ js
├─ lib
└─ WEB-INF
├─ jsp // les templates jsp qui produisent le html
├─ tags // les tag files (morceaux de template)
├─ dispatcher-servlet.xml // configuration web de spring
└─ web.xml // configuration web d'une application
pom.xml // fichier de configuration de maven
UML diagram (can be found in the images
folder) :
Spring Framework for web apps.
The starting point is the web.xml
file in src/main/webapp/WEB-INF
. This file defines the different app configurations and uses the dispatcher-servlet.xml
for dispatching incoming requests towards the right controllers and views.
dispatcher-servlet.xml
also initiates the scheduled task com.gfx.service.Scheduler
in the background, which will:
- Update data in Mongo from the TMDB API;
- Update the Java objects from Mongo;
- Launch the notification process for episodes airing soon.
For now, the scheduler is set to be repeated every 5 min for testing purposes, but it is meant to be run every day early in the morning:
<property name="period" value = "300000"/>
Handles authentication and sessions. It is configured in com.gfx.SpringSecurity.java
.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
- Jihane Bennis | [email protected] | @JihaneBennis
- Sophie Dambricourt | [email protected] | @SophieKaramazov
- Delphine Shi | [email protected] | @dlphn