{"id":30812790,"url":"https://github.com/ibrahimalsabr/chatop","last_synced_at":"2026-04-07T07:47:40.924Z","repository":{"id":313406212,"uuid":"1051282501","full_name":"IbrahimAlsabr/ChaTop","owner":"IbrahimAlsabr","description":"ChâTop is a Spring Boot backend API for rental property management. It offers REST endpoints for authentication, property listings, and messaging, serving as the backend for an Angular frontend and replacing the previous system.","archived":false,"fork":false,"pushed_at":"2026-03-06T15:42:25.000Z","size":90,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-07T07:47:38.164Z","etag":null,"topics":["crud-operations","java","jwt-authentication","jwt-token","layered-architecture","maven","mysql","openapi","resr-api","spring-boot","spring-security","swagger"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/IbrahimAlsabr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-05T18:17:19.000Z","updated_at":"2026-03-06T15:42:30.000Z","dependencies_parsed_at":"2025-09-05T21:25:44.499Z","dependency_job_id":"126090f0-fac8-44ee-bc3e-f3f0f40d5474","html_url":"https://github.com/IbrahimAlsabr/ChaTop","commit_stats":null,"previous_names":["ibrahimalsabr/chatop"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/IbrahimAlsabr/ChaTop","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IbrahimAlsabr%2FChaTop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IbrahimAlsabr%2FChaTop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IbrahimAlsabr%2FChaTop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IbrahimAlsabr%2FChaTop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IbrahimAlsabr","download_url":"https://codeload.github.com/IbrahimAlsabr/ChaTop/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IbrahimAlsabr%2FChaTop/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31504897,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T03:10:19.677Z","status":"ssl_error","status_checked_at":"2026-04-07T03:10:13.982Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["crud-operations","java","jwt-authentication","jwt-token","layered-architecture","maven","mysql","openapi","resr-api","spring-boot","spring-security","swagger"],"created_at":"2025-09-06T07:10:21.974Z","updated_at":"2026-04-07T07:47:40.912Z","avatar_url":"https://github.com/IbrahimAlsabr.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ChâTop: Rental Backend API\r\n\r\n[Lire ce fichier en français](#châtop-api-backend-de-location)\r\n\r\n## Description\r\n\r\nChâTop is a rental property management backend API built with Spring Boot. This project provides a comprehensive REST API for managing rental properties in tourist areas, including user authentication, property listings, and messaging system. The backend serves as the foundation for the existing Angular frontend application, replacing the previously used mock data from Mockoon and Postman.\r\n\r\n## Technologies Used\r\n\r\n![Spring Boot](https://img.shields.io/badge/Spring%20Boot-3.5.5-6DB33F?style=for-the-badge\u0026logo=spring-boot\u0026logoColor=white)\r\n![Java](https://img.shields.io/badge/Java-21-ED8B00?style=for-the-badge\u0026logo=openjdk\u0026logoColor=white)\r\n![MySQL](https://img.shields.io/badge/MySQL-8.0-4479A1?style=for-the-badge\u0026logo=mysql\u0026logoColor=white)\r\n![Spring Security](https://img.shields.io/badge/Spring%20Security-6.5.2-6DB33F?style=for-the-badge\u0026logo=spring-security\u0026logoColor=white)\r\n![JWT](https://img.shields.io/badge/JWT-000000?style=for-the-badge\u0026logo=jsonwebtokens\u0026logoColor=white)\r\n![Maven](https://img.shields.io/badge/Maven-3.9-C71A36?style=for-the-badge\u0026logo=apache-maven\u0026logoColor=white)\r\n![OpenAPI](https://img.shields.io/badge/OpenAPI-3.0-6BA539?style=for-the-badge\u0026logo=openapi-initiative\u0026logoColor=white)\r\n\r\n## Features\r\n\r\n- **User Authentication \u0026 Authorization**: JWT-based authentication system\r\n- **Rental Property Management**: CRUD operations for rental properties\r\n- **User Management**: User registration, login, and profile management\r\n- **Messaging System**: Communication between users and property owners\r\n- **RESTful API**: Well-structured REST endpoints\r\n- **Database Integration**: MySQL database with JPA/Hibernate\r\n- **API Documentation**: OpenAPI/Swagger documentation\r\n- **Security**: Spring Security with OAuth2 resource server\r\n\r\n## Prerequisites\r\n\r\nBefore running this project, make sure you have the following installed:\r\n\r\n- **Java 21** or higher\r\n- **Maven 3.9** or higher\r\n- **MySQL 8.0** or higher\r\n- **Git** (for cloning the repository)\r\n\r\n## Installation\r\n\r\n### 1. Clone the Repository\r\n\r\n```bash\r\ngit clone https://github.com/IbrahimAlsabr/ChaTop.git\r\ncd rentals-backend\r\n```\r\n\r\n### 2. Database Setup\r\n\r\n1. Create a MySQL database named `rentals_database`\r\n2. Update the database credentials in `src/main/resources/application.properties`:\r\n    ```properties\r\n    spring.datasource.url=jdbc:mysql://localhost:3306/rentals_database\r\n    spring.datasource.username=your_username\r\n    spring.datasource.password=your_password\r\n    ```\r\n\r\n### 3. Build and Run\r\n\r\n#### Using Maven Wrapper (Recommended)\r\n\r\n```bash\r\n# On Windows\r\n./mvnw.cmd spring-boot:run\r\n\r\n# On Unix/Linux/macOS\r\n./mvnw spring-boot:run\r\n```\r\n\r\n#### Using Maven (if installed globally)\r\n\r\n```bash\r\nmvn spring-boot:run\r\n```\r\n\r\nThe application will start on `http://localhost:8080`\r\n\r\n## API Documentation\r\n\r\nOnce the application is running, you can access the interactive API documentation at:\r\n\r\n- **Swagger UI**: `http://localhost:8080/swagger-ui.html`\r\n- **OpenAPI JSON**: `http://localhost:8080/v3/api-docs`\r\n\r\n## Architecture\r\n\r\nThe project follows a layered architecture pattern with clear separation of concerns:\r\n\r\n- **Controller Layer**: REST controllers handle HTTP requests and responses, implementing the API endpoints\r\n- **Service Layer**: Business logic implementation, containing the core application functionality\r\n- **Repository Layer**: Data access abstraction using Spring Data JPA repositories\r\n- **Entity Layer**: JPA entities representing the database schema\r\n- **DTO Layer**: Data Transfer Objects for API communication and data validation\r\n- **Configuration Layer**: Security configuration, JWT setup, and application configuration\r\n\r\nThis architecture ensures maintainability, testability, and follows Spring Boot best practices for enterprise applications.\r\n\r\n## API Endpoints\r\n\r\n### Authentication\r\n\r\n- `POST /api/auth/login` - User login\r\n- `POST /api/auth/register` - User registration\r\n- `GET /api/auth/me` - Get current user profile\r\n\r\n### Users\r\n\r\n- `GET /api/user/{id}` - Get user by ID (authenticated)\r\n\r\n### Rentals\r\n\r\n- `GET /api/rentals` - Get all rental properties\r\n- `GET /api/rentals/{id}` - Get rental by ID\r\n- `POST /api/rentals` - Create new rental (authenticated)\r\n- `PUT /api/rentals/{id}` - Update rental (authenticated)\r\n\r\n### Messages\r\n\r\n- `POST /api/messages` - Send message (authenticated)\r\n\r\n## Building for Production\r\n\r\nTo build the application for production:\r\n\r\n```bash\r\n./mvnw clean package\r\n```\r\n\r\nThe JAR file will be created in the `target/` directory.\r\n\r\n## Frontend Integration\r\n\r\nThis backend is designed to work with the existing Angular frontend. The frontend repository can be found at:\r\n[OpenClassrooms Frontend Repository](https://github.com/OpenClassrooms-Student-Center/Developpez-le-back-end-en-utilisant-Java-et-Spring)\r\n\r\n## Author\r\n\r\n### Ibrahim Alsabr\r\n\r\n[![GitHub](https://img.shields.io/badge/GitHub-100000?style=for-the-badge\u0026logo=github\u0026logoColor=white)](https://github.com/IbrahimAlsabr) [![LinkedIn](https://img.shields.io/badge/LinkedIn-0077B5?style=for-the-badge\u0026logo=linkedin\u0026logoColor=white)](https://www.linkedin.com/in/ibrahim-alsabr-188939231/) [![Twitter](https://img.shields.io/badge/Twitter-1DA1F2?style=for-the-badge\u0026logo=twitter\u0026logoColor=white)](https://twitter.com/home?lang=fr)\r\n\r\n---\r\n\r\n---\r\n\r\n---\r\n\r\n---\r\n\r\n\u003cbr\u003e\r\n\r\n# ChâTop : API Backend de Location\r\n\r\n[Read this file in English](#châtop-rental-backend-api)\r\n\r\n## Description\r\n\r\nChâTop est une API backend de gestion de locations immobilières construite avec Spring Boot. Ce projet fournit une API REST complète pour gérer les propriétés locatives dans les zones touristiques, incluant l'authentification des utilisateurs, les annonces de propriétés et le système de messagerie. Le backend sert de fondation pour l'application frontend Angular existante, remplaçant les données mockées précédemment utilisées via Mockoon et Postman.\r\n\r\n## Technologies Utilisées\r\n\r\n![Spring Boot](https://img.shields.io/badge/Spring%20Boot-3.5.5-6DB33F?style=for-the-badge\u0026logo=spring-boot\u0026logoColor=white)\r\n![Java](https://img.shields.io/badge/Java-21-ED8B00?style=for-the-badge\u0026logo=openjdk\u0026logoColor=white)\r\n![MySQL](https://img.shields.io/badge/MySQL-8.0-4479A1?style=for-the-badge\u0026logo=mysql\u0026logoColor=white)\r\n![Spring Security](https://img.shields.io/badge/Spring%20Security-6.5.2-6DB33F?style=for-the-badge\u0026logo=spring-security\u0026logoColor=white)\r\n![JWT](https://img.shields.io/badge/JWT-000000?style=for-the-badge\u0026logo=jsonwebtokens\u0026logoColor=white)\r\n![Maven](https://img.shields.io/badge/Maven-3.9-C71A36?style=for-the-badge\u0026logo=apache-maven\u0026logoColor=white)\r\n![OpenAPI](https://img.shields.io/badge/OpenAPI-3.0-6BA539?style=for-the-badge\u0026logo=openapi-initiative\u0026logoColor=white)\r\n\r\n## Fonctionnalités\r\n\r\n- **Authentification et Autorisation des Utilisateurs** : Système d'authentification basé sur JWT\r\n- **Gestion des Propriétés Locatives** : Opérations CRUD pour les propriétés locatives\r\n- **Gestion des Utilisateurs** : Inscription, connexion et gestion des profils utilisateurs\r\n- **Système de Messagerie** : Communication entre utilisateurs et propriétaires\r\n- **API RESTful** : Points de terminaison REST bien structurés\r\n- **Intégration Base de Données** : Base de données MySQL avec JPA/Hibernate\r\n- **Documentation API** : Documentation OpenAPI/Swagger\r\n- **Sécurité** : Spring Security avec serveur de ressources OAuth2\r\n\r\n## Prérequis\r\n\r\nAvant d'exécuter ce projet, assurez-vous d'avoir installé :\r\n\r\n- **Java 21** ou supérieur\r\n- **Maven 3.9** ou supérieur\r\n- **MySQL 8.0** ou supérieur\r\n- **Git** (pour cloner le dépôt)\r\n\r\n## Installation\r\n\r\n### 1. Cloner le Dépôt\r\n\r\n```bash\r\ngit clone https://github.com/IbrahimAlsabr/ChaTop.git\r\ncd rentals-backend\r\n```\r\n\r\n### 2. Configuration de la Base de Données\r\n\r\n1. Créez une base de données MySQL nommée `rentals_database`\r\n2. Mettez à jour les identifiants de la base de données dans `src/main/resources/application.properties` :\r\n    ```properties\r\n    spring.datasource.url=jdbc:mysql://localhost:3306/rentals_database\r\n    spring.datasource.username=votre_nom_utilisateur\r\n    spring.datasource.password=votre_mot_de_passe\r\n    ```\r\n\r\n### 3. Construction et Exécution\r\n\r\n#### Utilisation du Maven Wrapper (Recommandé)\r\n\r\n```bash\r\n# Sur Windows\r\n./mvnw.cmd spring-boot:run\r\n\r\n# Sur Unix/Linux/macOS\r\n./mvnw spring-boot:run\r\n```\r\n\r\n#### Utilisation de Maven (si installé globalement)\r\n\r\n```bash\r\nmvn spring-boot:run\r\n```\r\n\r\nL'application démarrera sur `http://localhost:8080`\r\n\r\n## Documentation API\r\n\r\nUne fois l'application en cours d'exécution, vous pouvez accéder à la documentation interactive de l'API à :\r\n\r\n- **Swagger UI** : `http://localhost:8080/swagger-ui.html`\r\n- **OpenAPI JSON** : `http://localhost:8080/v3/api-docs`\r\n\r\n## Architecture\r\n\r\nLe projet suit un modèle d'architecture en couches avec une séparation claire des responsabilités :\r\n\r\n- **Couche Contrôleur** : Les contrôleurs REST gèrent les requêtes et réponses HTTP, implémentant les points de terminaison de l'API\r\n- **Couche Service** : Implémentation de la logique métier, contenant les fonctionnalités principales de l'application\r\n- **Couche Repository** : Abstraction d'accès aux données utilisant les repositories Spring Data JPA\r\n- **Couche Entité** : Entités JPA représentant le schéma de base de données\r\n- **Couche DTO** : Objets de Transfert de Données pour la communication API et la validation des données\r\n- **Couche Configuration** : Configuration de sécurité, configuration JWT et configuration de l'application\r\n\r\nCette architecture assure la maintenabilité, la testabilité et suit les meilleures pratiques Spring Boot pour les applications d'entreprise.\r\n\r\n## Points de Terminaison API\r\n\r\n### Authentification\r\n\r\n- `POST /api/auth/login` - Connexion utilisateur\r\n- `POST /api/auth/register` - Inscription utilisateur\r\n- `GET /api/auth/me` - Obtenir le profil de l'utilisateur actuel\r\n\r\n### Utilisateurs\r\n\r\n- `GET /api/user/{id}` - Obtenir un utilisateur par ID (authentifié)\r\n\r\n### Locations\r\n\r\n- `GET /api/rentals` - Obtenir toutes les propriétés locatives\r\n- `GET /api/rentals/{id}` - Obtenir une location par ID\r\n- `POST /api/rentals` - Créer une nouvelle location (authentifié)\r\n- `PUT /api/rentals/{id}` - Mettre à jour une location (authentifié)\r\n\r\n### Messages\r\n\r\n- `POST /api/messages` - Envoyer un message (authentifié)\r\n\r\n## Construction pour la Production\r\n\r\nPour construire l'application pour la production :\r\n\r\n```bash\r\n./mvnw clean package\r\n```\r\n\r\nLe fichier JAR sera créé dans le répertoire `target/`.\r\n\r\n## Intégration Frontend\r\n\r\nCe backend est conçu pour fonctionner avec le frontend Angular existant. Le dépôt frontend peut être trouvé à :\r\n[Dépôt Frontend OpenClassrooms](https://github.com/OpenClassrooms-Student-Center/Developpez-le-back-end-en-utilisant-Java-et-Spring)\r\n\r\n## Auteur\r\n\r\n### Ibrahim Alsabr\r\n\r\n[![GitHub](https://img.shields.io/badge/GitHub-100000?style=for-the-badge\u0026logo=github\u0026logoColor=white)](https://github.com/IbrahimAlsabr) [![LinkedIn](https://img.shields.io/badge/LinkedIn-0077B5?style=for-the-badge\u0026logo=linkedin\u0026logoColor=white)](https://www.linkedin.com/in/ibrahim-alsabr-188939231/) [![Twitter](https://img.shields.io/badge/Twitter-1DA1F2?style=for-the-badge\u0026logo=twitter\u0026logoColor=white)](https://twitter.com/home?lang=fr)\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fibrahimalsabr%2Fchatop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fibrahimalsabr%2Fchatop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fibrahimalsabr%2Fchatop/lists"}