diff --git a/sae/.vscode/settings.json b/sae/.vscode/settings.json
new file mode 100644
index 0000000000000000000000000000000000000000..2c88a5598a37d7afc8a58e30f921c8a101c708d6
--- /dev/null
+++ b/sae/.vscode/settings.json
@@ -0,0 +1,56 @@
+{
+  "java.project.sourcePaths": [
+    "WEB-INF/src"
+  ],
+  "java.project.referencedLibraries": [
+    "/home/infoetu/othemane.khachnane.etu/tomcat/lib/websocket-client-api.jar",
+    "/home/infoetu/othemane.khachnane.etu/tomcat/lib/websocket-api.jar",
+    "/home/infoetu/othemane.khachnane.etu/tomcat/lib/tomcat-websocket.jar",
+    "/home/infoetu/othemane.khachnane.etu/tomcat/lib/tomcat-util-scan.jar",
+    "/home/infoetu/othemane.khachnane.etu/tomcat/lib/tomcat-util.jar",
+    "/home/infoetu/othemane.khachnane.etu/tomcat/lib/tomcat-jni.jar",
+    "/home/infoetu/othemane.khachnane.etu/tomcat/lib/tomcat-jdbc.jar",
+    "/home/infoetu/othemane.khachnane.etu/tomcat/lib/tomcat-i18n-zh-CN.jar",
+    "/home/infoetu/othemane.khachnane.etu/tomcat/lib/tomcat-i18n-ru.jar",
+    "/home/infoetu/othemane.khachnane.etu/tomcat/lib/tomcat-i18n-pt-BR.jar",
+    "/home/infoetu/othemane.khachnane.etu/tomcat/lib/tomcat-i18n-ko.jar",
+    "/home/infoetu/othemane.khachnane.etu/tomcat/lib/tomcat-i18n-ja.jar",
+    "/home/infoetu/othemane.khachnane.etu/tomcat/lib/tomcat-i18n-fr.jar",
+    "/home/infoetu/othemane.khachnane.etu/tomcat/lib/tomcat-i18n-es.jar",
+    "/home/infoetu/othemane.khachnane.etu/tomcat/lib/tomcat-i18n-de.jar",
+    "/home/infoetu/othemane.khachnane.etu/tomcat/lib/tomcat-i18n-cs.jar",
+    "/home/infoetu/othemane.khachnane.etu/tomcat/lib/tomcat-dbcp.jar",
+    "/home/infoetu/othemane.khachnane.etu/tomcat/lib/tomcat-coyote-ffm.jar",
+    "/home/infoetu/othemane.khachnane.etu/tomcat/lib/tomcat-coyote.jar",
+    "/home/infoetu/othemane.khachnane.etu/tomcat/lib/tomcat-api.jar",
+    "/home/infoetu/othemane.khachnane.etu/tomcat/lib/stax2-api-4.2.2.jar",
+    "/home/infoetu/othemane.khachnane.etu/tomcat/lib/servlet-api.jar",
+    "/home/infoetu/othemane.khachnane.etu/tomcat/lib/postgresql-42.7.5.jar",
+    "/home/infoetu/othemane.khachnane.etu/tomcat/lib/postgresql-42.2.16.jar",
+    "/home/infoetu/othemane.khachnane.etu/tomcat/lib/jsp-api.jar",
+    "/home/infoetu/othemane.khachnane.etu/tomcat/lib/jjwt-jackson-0.12.5.jar",
+    "/home/infoetu/othemane.khachnane.etu/tomcat/lib/jjwt-impl-0.12.5.jar",
+    "/home/infoetu/othemane.khachnane.etu/tomcat/lib/jjwt-api-0.12.5.jar",
+    "/home/infoetu/othemane.khachnane.etu/tomcat/lib/jaspic-api.jar",
+    "/home/infoetu/othemane.khachnane.etu/tomcat/lib/jasper-el.jar",
+    "/home/infoetu/othemane.khachnane.etu/tomcat/lib/jasper.jar",
+    "/home/infoetu/othemane.khachnane.etu/tomcat/lib/jakartaee-migration-1.0.9-shaded.jar",
+    "/home/infoetu/othemane.khachnane.etu/tomcat/lib/jakartaee-migration-1.0.8-shaded.jar",
+    "/home/infoetu/othemane.khachnane.etu/tomcat/lib/jackson-datatype-jsr310-2.13.0.jar",
+    "/home/infoetu/othemane.khachnane.etu/tomcat/lib/jackson-dataformat-xml-2.15.3.jar",
+    "/home/infoetu/othemane.khachnane.etu/tomcat/lib/jackson-databind-2.15.3.jar",
+    "/home/infoetu/othemane.khachnane.etu/tomcat/lib/jackson-core-2.15.3.jar",
+    "/home/infoetu/othemane.khachnane.etu/tomcat/lib/jackson-annotations-2.15.3.jar",
+    "/home/infoetu/othemane.khachnane.etu/tomcat/lib/el-api.jar",
+    "/home/infoetu/othemane.khachnane.etu/tomcat/lib/ecj-4.27.jar",
+    "/home/infoetu/othemane.khachnane.etu/tomcat/lib/commons-text-1.13.0.jar",
+    "/home/infoetu/othemane.khachnane.etu/tomcat/lib/commons-lang3-3.17.0.jar",
+    "/home/infoetu/othemane.khachnane.etu/tomcat/lib/catalina-tribes.jar",
+    "/home/infoetu/othemane.khachnane.etu/tomcat/lib/catalina-storeconfig.jar",
+    "/home/infoetu/othemane.khachnane.etu/tomcat/lib/catalina-ssi.jar",
+    "/home/infoetu/othemane.khachnane.etu/tomcat/lib/catalina-ha.jar",
+    "/home/infoetu/othemane.khachnane.etu/tomcat/lib/catalina-ant.jar",
+    "/home/infoetu/othemane.khachnane.etu/tomcat/lib/catalina.jar",
+    "/home/infoetu/othemane.khachnane.etu/tomcat/lib/annotations-api.jar"
+  ]
+}
diff --git a/sae/README.md b/sae/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..244d8e92aa883a9dabda225f8e64112cce541b8a
--- /dev/null
+++ b/sae/README.md
@@ -0,0 +1,93 @@
+# S4.A02.1-H-Adrien.fryson-Othemane.khachnane
+
+
+
+## Getting started
+
+To make it easy for you to get started with GitLab, here's a list of recommended next steps.
+
+Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)!
+
+## Add your files
+
+- [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files
+- [ ] [Add files using the command line](https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line) or push an existing Git repository with the following command:
+
+```
+cd existing_repo
+git remote add origin https://gitlab.univ-lille.fr/othemane.khachnane.etu/s4.a02.1-h-adrien.fryson-othemane.khachnane.git
+git branch -M main
+git push -uf origin main
+```
+
+## Integrate with your tools
+
+- [ ] [Set up project integrations](https://gitlab.univ-lille.fr/othemane.khachnane.etu/s4.a02.1-h-adrien.fryson-othemane.khachnane/-/settings/integrations)
+
+## Collaborate with your team
+
+- [ ] [Invite team members and collaborators](https://docs.gitlab.com/ee/user/project/members/)
+- [ ] [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html)
+- [ ] [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically)
+- [ ] [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/)
+- [ ] [Set auto-merge](https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html)
+
+## Test and Deploy
+
+Use the built-in continuous integration in GitLab.
+
+- [ ] [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/quick_start/index.html)
+- [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing (SAST)](https://docs.gitlab.com/ee/user/application_security/sast/)
+- [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html)
+- [ ] [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/)
+- [ ] [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html)
+
+***
+
+# Editing this README
+
+When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thanks to [makeareadme.com](https://www.makeareadme.com/) for this template.
+
+## Suggestions for a good README
+
+Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.
+
+## Name
+Choose a self-explaining name for your project.
+
+## Description
+Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.
+
+## Badges
+On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge.
+
+## Visuals
+Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method.
+
+## Installation
+Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection.
+
+## Usage
+Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.
+
+## Support
+Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.
+
+## Roadmap
+If you have ideas for releases in the future, it is a good idea to list them in the README.
+
+## Contributing
+State if you are open to contributions and what your requirements are for accepting them.
+
+For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.
+
+You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.
+
+## Authors and acknowledgment
+Show your appreciation to those who have contributed to the project.
+
+## License
+For open source projects, say how it is licensed.
+
+## Project status
+If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.
diff --git a/sae/WEB-INF/classes/controleur/Accueil.class b/sae/WEB-INF/classes/controleur/Accueil.class
new file mode 100644
index 0000000000000000000000000000000000000000..1a28c778be963150fd134e64f332347b3b53d4ab
Binary files /dev/null and b/sae/WEB-INF/classes/controleur/Accueil.class differ
diff --git a/sae/WEB-INF/classes/controleur/CreerFil.class b/sae/WEB-INF/classes/controleur/CreerFil.class
new file mode 100644
index 0000000000000000000000000000000000000000..68182c701dd8a0f5026c6dd3e090b40856ded113
Binary files /dev/null and b/sae/WEB-INF/classes/controleur/CreerFil.class differ
diff --git a/sae/WEB-INF/classes/controleur/EnvoyerMessage.class b/sae/WEB-INF/classes/controleur/EnvoyerMessage.class
new file mode 100644
index 0000000000000000000000000000000000000000..a85ec4e38e5a09c52765c899b4c08ee18966cc1d
Binary files /dev/null and b/sae/WEB-INF/classes/controleur/EnvoyerMessage.class differ
diff --git a/sae/WEB-INF/classes/controleur/Fil.class b/sae/WEB-INF/classes/controleur/Fil.class
new file mode 100644
index 0000000000000000000000000000000000000000..3ed1a7e3d82fe9b323a3251fdcfa8663664d9470
Binary files /dev/null and b/sae/WEB-INF/classes/controleur/Fil.class differ
diff --git a/sae/WEB-INF/classes/controleur/GetFils.class b/sae/WEB-INF/classes/controleur/GetFils.class
new file mode 100644
index 0000000000000000000000000000000000000000..0a1a34ef3ccc10154a256dde033a045c5df81264
Binary files /dev/null and b/sae/WEB-INF/classes/controleur/GetFils.class differ
diff --git a/sae/WEB-INF/classes/controleur/ListerFil.class b/sae/WEB-INF/classes/controleur/ListerFil.class
new file mode 100644
index 0000000000000000000000000000000000000000..2b87ced72d52b7cd0b0429fc1e91fa962be23a88
Binary files /dev/null and b/sae/WEB-INF/classes/controleur/ListerFil.class differ
diff --git a/sae/WEB-INF/classes/controleur/Login.class b/sae/WEB-INF/classes/controleur/Login.class
new file mode 100644
index 0000000000000000000000000000000000000000..d41d887165f8658b7f4d0bb7ec25ce9a839d7bfe
Binary files /dev/null and b/sae/WEB-INF/classes/controleur/Login.class differ
diff --git a/sae/WEB-INF/classes/controleur/Logout.class b/sae/WEB-INF/classes/controleur/Logout.class
new file mode 100644
index 0000000000000000000000000000000000000000..47db334fd4f25652266583b20ac7307fa5ad19d7
Binary files /dev/null and b/sae/WEB-INF/classes/controleur/Logout.class differ
diff --git a/sae/WEB-INF/classes/controleur/Register.class b/sae/WEB-INF/classes/controleur/Register.class
new file mode 100644
index 0000000000000000000000000000000000000000..3ad8ee7a3668bb5e3ee876f44783e5867731b463
Binary files /dev/null and b/sae/WEB-INF/classes/controleur/Register.class differ
diff --git a/sae/WEB-INF/classes/controleur/SuivreFil.class b/sae/WEB-INF/classes/controleur/SuivreFil.class
new file mode 100644
index 0000000000000000000000000000000000000000..a300bccc79e70957f3d3a2d461ecbe356c26c148
Binary files /dev/null and b/sae/WEB-INF/classes/controleur/SuivreFil.class differ
diff --git a/sae/WEB-INF/classes/modele/Abonnement.class b/sae/WEB-INF/classes/modele/Abonnement.class
new file mode 100644
index 0000000000000000000000000000000000000000..ee41e5d8f300de99d400c65350de040019988fdf
Binary files /dev/null and b/sae/WEB-INF/classes/modele/Abonnement.class differ
diff --git a/sae/WEB-INF/classes/modele/AbonnementDao.class b/sae/WEB-INF/classes/modele/AbonnementDao.class
new file mode 100644
index 0000000000000000000000000000000000000000..81902b953d1071f9235d21aa8cc166c1e97b8116
Binary files /dev/null and b/sae/WEB-INF/classes/modele/AbonnementDao.class differ
diff --git a/sae/WEB-INF/classes/modele/DS.class b/sae/WEB-INF/classes/modele/DS.class
new file mode 100644
index 0000000000000000000000000000000000000000..0c876cb2214110b5d54f530a86c7693661d5ef41
Binary files /dev/null and b/sae/WEB-INF/classes/modele/DS.class differ
diff --git a/sae/WEB-INF/classes/modele/FilDeDiscussion.class b/sae/WEB-INF/classes/modele/FilDeDiscussion.class
new file mode 100644
index 0000000000000000000000000000000000000000..af362b08855ab40f70ebaea35cdc9fc11329cb1a
Binary files /dev/null and b/sae/WEB-INF/classes/modele/FilDeDiscussion.class differ
diff --git a/sae/WEB-INF/classes/modele/FilDeDiscussionDAO.class b/sae/WEB-INF/classes/modele/FilDeDiscussionDAO.class
new file mode 100644
index 0000000000000000000000000000000000000000..e9ac7a035fe79dcdda1a830dc60a468eaae94523
Binary files /dev/null and b/sae/WEB-INF/classes/modele/FilDeDiscussionDAO.class differ
diff --git a/sae/WEB-INF/classes/modele/Message.class b/sae/WEB-INF/classes/modele/Message.class
new file mode 100644
index 0000000000000000000000000000000000000000..2deedf46a92b710b28785acd9f7e0bca2f388681
Binary files /dev/null and b/sae/WEB-INF/classes/modele/Message.class differ
diff --git a/sae/WEB-INF/classes/modele/MessageDao.class b/sae/WEB-INF/classes/modele/MessageDao.class
new file mode 100644
index 0000000000000000000000000000000000000000..233da6210d41314d7a9ca38de6f36051e97bf56a
Binary files /dev/null and b/sae/WEB-INF/classes/modele/MessageDao.class differ
diff --git a/sae/WEB-INF/classes/modele/Utilisateur.class b/sae/WEB-INF/classes/modele/Utilisateur.class
new file mode 100644
index 0000000000000000000000000000000000000000..0f9e1d29260afe61797c09c56070ffccb66a82ed
Binary files /dev/null and b/sae/WEB-INF/classes/modele/Utilisateur.class differ
diff --git a/sae/WEB-INF/classes/modele/UtilisateurDao.class b/sae/WEB-INF/classes/modele/UtilisateurDao.class
new file mode 100644
index 0000000000000000000000000000000000000000..ec400bcf77f08c69a12bdf1fd4bdb55c1d6e6361
Binary files /dev/null and b/sae/WEB-INF/classes/modele/UtilisateurDao.class differ
diff --git a/sae/WEB-INF/src/controleur/GetFils.java b/sae/WEB-INF/src/controleur/GetFils.java
index d7376b1e928b424939b07460b4d0ecb04e914334..f9fe82c5bb0991cf3814fc1b24b884d6df7668fc 100644
--- a/sae/WEB-INF/src/controleur/GetFils.java
+++ b/sae/WEB-INF/src/controleur/GetFils.java
@@ -22,6 +22,8 @@ import modele.FilDeDiscussionDAO;
 import modele.Message;
 import modele.MessageDao;
 
+//http GET http://localhost:8080/sae/getFils Cookie:"JSESSIONID=ton_session_id" --> F12>Storage>JSESSIONID
+
 @WebServlet("/getFils")
 public class GetFils extends HttpServlet {
     @Override
diff --git a/sae/WEB-INF/src/controleur/Like.java b/sae/WEB-INF/src/controleur/Like.java
new file mode 100644
index 0000000000000000000000000000000000000000..6224d8e54ca69df6621d57d328c1c561ca28acd9
--- /dev/null
+++ b/sae/WEB-INF/src/controleur/Like.java
@@ -0,0 +1,38 @@
+package controleur;
+
+
+import java.io.IOException;
+
+import jakarta.servlet.ServletException;
+import jakarta.servlet.annotation.WebServlet;
+import jakarta.servlet.http.HttpServlet;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
+import modele.MessageDao;
+
+@WebServlet("/Like")
+public class Like extends HttpServlet {
+
+    @Override
+    protected void service(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException {
+        String userEmail = (String) req.getSession().getAttribute("email");
+        if (userEmail == null) {
+            res.sendRedirect(req.getContextPath() + "/login");
+            return;
+        }
+
+        int messageId = Integer.parseInt(req.getParameter("messageId"));
+        MessageDao messageDao = new MessageDao();
+
+        if (req.getParameter("like") != null) {
+            messageDao.like(messageId, userEmail);
+        } else {
+            messageDao.unlike(messageId, userEmail);
+        }
+
+        res.sendRedirect(req.getHeader("Referer"));
+
+        //TODO: Implement the like and unlike methods in MessageDao
+    }
+    
+}
diff --git a/sae/WEB-INF/src/modele/DS.java b/sae/WEB-INF/src/modele/DS.java
index 9c3ebc1ddd0e4e86c6e183c8792aedc477adf5bb..f34509cee1b54bec3d01ee14d49f973f613189ac 100644
--- a/sae/WEB-INF/src/modele/DS.java
+++ b/sae/WEB-INF/src/modele/DS.java
@@ -15,9 +15,9 @@ public class DS {
     }
 
     public Connection getConnection() {
-        String url = "jdbc:postgresql://localhost:5432/postgres";
-        String login = "postgres";
-        String pwd = "";
+        String url = "jdbc:postgresql://psqlserv/but2";
+        String login = "othemanekhachnaneetu";
+        String pwd = "moi";
         Connection con = null;
         try {
             con = DriverManager.getConnection(url, login, pwd);
@@ -26,4 +26,4 @@ public class DS {
         }
         return con;
     }
-}
+}
\ No newline at end of file
diff --git a/sae/WEB-INF/src/modele/Message.java b/sae/WEB-INF/src/modele/Message.java
index f046418cb3b21f768fae07681774cebbc5b0154d..6bdb0bb2c450b58c4c220d511453e9d00549cb62 100644
--- a/sae/WEB-INF/src/modele/Message.java
+++ b/sae/WEB-INF/src/modele/Message.java
@@ -12,17 +12,20 @@ public class Message {
     private int filId;
     private String auteurEmail;
     private String fileName;
+    private int likeCount;
 
     public Message() {
     }
 
-    public Message(int id, String contenu, LocalDateTime datePublication, int filId, String auteurEmail, String fileName) {
+    public Message(int id, String contenu, LocalDateTime datePublication, int filId, String auteurEmail,
+            String fileName) {
         this.id = id;
         this.contenu = contenu;
         this.datePublication = datePublication;
         this.filId = filId;
         this.auteurEmail = auteurEmail;
         this.fileName = fileName;
+        this.likeCount = 0;
     }
 
     public int getId() {
@@ -73,8 +76,17 @@ public class Message {
         this.fileName = fileName;
     }
 
+    public int getLikeCount() {
+        return likeCount;
+    }
+
+    public void setLikeCount(int likeCount) {
+        this.likeCount = likeCount;
+    }
+
     @Override
     public String toString() {
-        return "Message{" + "id=" + id + ", contenu=" + contenu + ", datePublication=" + datePublication + ", filId=" + filId + ", auteurEmail=" + auteurEmail + '}';
+        return "Message{" + "id=" + id + ", contenu=" + contenu + ", datePublication=" + datePublication + ", filId="
+                + filId + ", auteurEmail=" + auteurEmail + "like" + likeCount + '}';
     }
 }
diff --git a/sae/WEB-INF/src/modele/MessageDao.java b/sae/WEB-INF/src/modele/MessageDao.java
index 0687ea35a169c515a13790b2a13e294558bf86c3..4294c7bb736e8ba8f42c8834ef876ed3b52e76f0 100644
--- a/sae/WEB-INF/src/modele/MessageDao.java
+++ b/sae/WEB-INF/src/modele/MessageDao.java
@@ -21,6 +21,7 @@ public class MessageDao {
                 message.setFilId(rs.getInt("filId"));
                 message.setAuteurEmail(rs.getString("auteurEmail"));
                 message.setFileName(rs.getString("fileName"));
+                message.setLikeCount(rs.getInt("likeCount"));
             } else {
                 System.out.println("Message inexistant");
             }
@@ -43,6 +44,7 @@ public class MessageDao {
                 message.setFilId(rs.getInt("filId"));
                 message.setAuteurEmail(rs.getString("auteurEmail"));
                 message.setFileName(rs.getString("fileName"));
+                message.setLikeCount(rs.getInt("likeCount"));
                 messages.add(message);
             }
         } catch (Exception e) {
@@ -65,6 +67,7 @@ public class MessageDao {
                 message.setFilId(rs.getInt("filId"));
                 message.setAuteurEmail(rs.getString("auteurEmail"));
                 message.setFileName(rs.getString("fileName"));
+                message.setLikeCount(rs.getInt("likeCount"));
                 messages.add(message);
             }
         } catch (Exception e) {
@@ -112,4 +115,37 @@ public class MessageDao {
             System.out.println(e.getMessage());
         }
     }
+
+    public boolean like(int id, String email) {
+        boolean liked = false;
+        try(Connection con = DS.instance.getConnection()) {
+            PreparedStatement ps = con.prepareStatement("SELECT * FROM like WHERE messageid = ? AND auteuremail = ?");
+            ps.setInt(1, id);
+            ps.setString(2, email);
+            ResultSet rs = ps.executeQuery();
+            if (rs.next()) {
+                liked = true;
+            }
+        } catch (Exception e) {
+            System.out.println(e.getMessage());
+        }
+        return liked;
+    }
+
+    public boolean unlike(int id, String email) {
+        boolean unliked = false;
+        try(Connection con = DS.instance.getConnection()) {
+            PreparedStatement ps = con.prepareStatement("SELECT * FROM like WHERE messageid = ? AND auteuremail = ?");
+            ps.setInt(1, id);
+            ps.setString(2, email);
+            ResultSet rs = ps.executeQuery();
+            if (rs.next()) {
+                unliked = true;
+            }
+        } catch (Exception e) {
+            System.out.println(e.getMessage());
+        }
+        return unliked;
+    }
+
 }
diff --git a/sae/compilation.md b/sae/compilation.md
new file mode 100644
index 0000000000000000000000000000000000000000..ed1bf26d20b435da9ae80c9eed39cd9ea782f165
--- /dev/null
+++ b/sae/compilation.md
@@ -0,0 +1 @@
+javac -d WEB-INF/classes -cp ../../lib/servlet-api.jar:../../lib/commons-lang3-3.17.0.jar:../../lib/commons-text-1.13.0.jar:../../lib/jackson-datatype-jsr310-2.13.0.jar:../../lib/jackson-annotations-2.15.3.jar:../../lib/jackson-core-2.15.3.jar:../../lib/jackson-databind-2.15.3.jar:../../lib/jackson-dataformat-xml-2.15.3.jar  WEB-INF/src/controleur/*.java WEB-INF/src/modele/*.java
diff --git a/sae/script.sql b/sae/script.sql
new file mode 100644
index 0000000000000000000000000000000000000000..1932907db6070b58bda405f1a5072841cd6f8e15
--- /dev/null
+++ b/sae/script.sql
@@ -0,0 +1,151 @@
+DROP TABLE IF EXISTS Abonnement;
+DROP TABLE IF EXISTS Message;
+DROP TABLE IF EXISTS FilDeDiscussion;
+DROP TABLE IF EXISTS Utilisateur;
+
+CREATE TABLE Utilisateur (
+    email VARCHAR(100) UNIQUE NOT NULL,
+    nom VARCHAR(100) NOT NULL,
+    motDePasse VARCHAR(255) NOT NULL,
+    dateInscription TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+    CONSTRAINT pk_utilisateur PRIMARY KEY (email)
+);
+
+CREATE TABLE FilDeDiscussion (
+    id SERIAL,
+    nom VARCHAR(100) NOT NULL,
+    dateCreation TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+    createurEmail VARCHAR(100),
+    description TEXT,
+    CONSTRAINT pk_fil PRIMARY KEY (id),
+    CONSTRAINT fk_createur FOREIGN KEY (createurEmail) REFERENCES Utilisateur(email)
+        ON DELETE SET NULL
+);
+
+CREATE TABLE Message (
+    id SERIAL,
+    contenu TEXT NOT NULL,
+    datePublication TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+    filId INTEGER,
+    auteurEmail VARCHAR(100),
+    fileName VARCHAR(255),
+    likeCount Boolean DEFAULT FALSE,
+    CONSTRAINT pk_message PRIMARY KEY (id),
+    CONSTRAINT fk_fil FOREIGN KEY (filId) REFERENCES FilDeDiscussion(id)
+        ON DELETE CASCADE,
+    CONSTRAINT fk_auteur FOREIGN KEY (auteurEmail) REFERENCES Utilisateur(email)
+        ON DELETE SET NULL
+);
+
+CREATE TABLE Abonnement (
+    utilisateurEmail VARCHAR(100),
+    filId INTEGER,
+    dateAbonnement TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+    CONSTRAINT pk_abonnement PRIMARY KEY (utilisateurEmail, filId),
+    CONSTRAINT fk_utilisateur FOREIGN KEY (utilisateurEmail) REFERENCES Utilisateur(email)
+        ON DELETE CASCADE,
+    CONSTRAINT fk_fil FOREIGN KEY (filId) REFERENCES FilDeDiscussion(id)
+        ON DELETE CASCADE
+);
+
+-- Insertion des utilisateurs
+INSERT INTO Utilisateur (email, nom, motDePasse)
+VALUES 
+('utilisateur1@exemple.com', 'Utilisateur 1', MD5('motdepasse123')),
+('utilisateur2@exemple.com', 'Utilisateur 2', MD5('motdepasse123')),
+('utilisateur3@exemple.com', 'Utilisateur 3', MD5('motdepasse123'));
+
+-- Insertion des fils de discussion
+INSERT INTO FilDeDiscussion (nom, createurEmail, description)
+VALUES 
+('Discussion Générale', 'utilisateur1@exemple.com', 'Un fil pour discuter de tout et de rien.'),
+('Tech Talk', 'utilisateur2@exemple.com', 'Discussions sur les dernières technologies.'),
+('Sports', 'utilisateur3@exemple.com', 'Discussions sur les sports et les événements sportifs.');
+
+-- Insertion des messages
+INSERT INTO Message (contenu, filId, auteurEmail, fileName) VALUES 
+('Bonjour, ceci est mon premier message !', 1, 'utilisateur1@exemple.com', NULL),
+('Quelquun a des nouvelles sur la dernière mise à jour de Java ?', 2, 'utilisateur2@exemple.com', NULL),
+('Qui a regardé le match hier soir ?', 3, 'utilisateur3@exemple.com', NULL),
+('Bienvenue à tous dans ce fil de discussion !', 1, 'utilisateur2@exemple.com', NULL),
+('Je pense que la nouvelle version de Python est géniale.', 2, 'utilisateur3@exemple.com', NULL),
+('Le match était incroyable, quelle performance !', 3, 'utilisateur1@exemple.com', NULL);
+
+-- Insertion des abonnements
+INSERT INTO Abonnement (utilisateurEmail, filId)
+VALUES 
+('utilisateur1@exemple.com', 1),
+('utilisateur1@exemple.com', 2),
+('utilisateur2@exemple.com', 1),
+('utilisateur2@exemple.com', 3),
+('utilisateur3@exemple.com', 2),
+('utilisateur3@exemple.com', 3);
+
+-- Lister tous les utilisateurs :
+
+-- SELECT * FROM Utilisateur;
+
+-- Lister tous les fils de discussion avec le nom du créateur :
+
+-- SELECT f.id, f.nom, u.nom AS nomCreateur
+-- FROM FilDeDiscussion f
+-- JOIN Utilisateur u ON f.createurEmail = u.email;
+
+-- Lister tous les messages d'un fil de discussion spécifique avec le nom de l'auteur :
+
+-- SELECT m.contenu, u.nom AS nomAuteur, m.datePublication
+-- FROM Message m
+-- JOIN Utilisateur u ON m.auteurEmail = u.email
+-- WHERE m.filId = 1
+-- ORDER BY m.datePublication;
+
+-- Lister tous les abonnements d'un utilisateur spécifique :
+
+-- SELECT f.nom AS nomFil, a.dateAbonnement
+-- FROM Abonnement a
+-- JOIN FilDeDiscussion f ON a.filId = f.id
+-- WHERE a.utilisateurEmail = 'utilisateur1@exemple.com';
+
+-- Lister les fils de discussion auxquels un utilisateur n'est pas abonné :
+
+-- SELECT f.id, f.nom
+-- FROM FilDeDiscussion f
+-- LEFT JOIN Abonnement a ON f.id = a.filId AND a.utilisateurEmail = 'utilisateur1@exemple.com'
+-- WHERE a.utilisateurEmail IS NULL;
+
+-- Compter le nombre de messages par fil de discussion :
+
+-- SELECT f.nom AS nomFil, COUNT(m.id) AS nombreMessages
+-- FROM FilDeDiscussion f
+-- LEFT JOIN Message m ON f.id = m.filId
+-- GROUP BY f.nom;
+
+-- Trouver les utilisateurs qui ont publié des messages dans un fil spécifique :
+
+-- SELECT DISTINCT u.nom, u.email
+-- FROM Utilisateur u
+-- JOIN Message m ON u.email = m.auteurEmail
+-- WHERE m.filId = 1;
+
+-- Lister les 5 derniers messages publiés dans un fil de discussion :
+
+-- SELECT m.contenu, u.nom AS nomAuteur, m.datePublication
+-- FROM Message m
+-- JOIN Utilisateur u ON m.auteurEmail = u.email
+-- WHERE m.filId = 1
+-- ORDER BY m.datePublication DESC
+-- LIMIT 5;
+
+-- Compter le nombre d'abonnés par fil de discussion :
+
+-- SELECT f.nom AS nomFil, COUNT(a.utilisateurEmail) AS nombreAbonnes
+-- FROM FilDeDiscussion f
+-- LEFT JOIN Abonnement a ON f.id = a.filId
+-- GROUP BY f.nom;
+
+-- Lister les utilisateurs qui ne sont abonnés à aucun fil de discussion :
+
+-- SELECT u.email, u.nom
+-- FROM Utilisateur u
+-- LEFT JOIN Abonnement a ON u.email = a.utilisateurEmail
+-- WHERE a.utilisateurEmail IS NULL;
\ No newline at end of file
diff --git a/sae/uploads/Abr.png b/sae/uploads/Abr.png
new file mode 100644
index 0000000000000000000000000000000000000000..104b2328ee7164628311b8ee28dc54376ec0b75d
Binary files /dev/null and b/sae/uploads/Abr.png differ