{"id":28490113,"url":"https://github.com/maxim-francesco/tinder-clone-ng-spring","last_synced_at":"2026-04-09T02:31:00.601Z","repository":{"id":297663196,"uuid":"997519383","full_name":"maxim-francesco/tinder-clone-ng-spring","owner":"maxim-francesco","description":"A modern Tinder-style full-stack dating app built with Angular \u0026 Spring Boot. It supports user authentication, real-time profile swiping, mutual matching, and messaging – all integrated into a clean, responsive UI. Ideal for learning web sockets, relational database design, and component-driven frontend architecture.","archived":false,"fork":false,"pushed_at":"2025-06-06T17:08:45.000Z","size":71842,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-01T07:47:00.926Z","etag":null,"topics":["angular","backend","dating-app","frontend","fullstack","java","jwt-authentication","matchmaking","real-time","relational-database","responsive-ui","rest-api","spring-boot","tailwindcss","tinder-clone","typescript","web-development","websocket"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/maxim-francesco.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}},"created_at":"2025-06-06T17:05:41.000Z","updated_at":"2025-06-06T17:11:56.000Z","dependencies_parsed_at":"2025-06-06T18:38:35.243Z","dependency_job_id":null,"html_url":"https://github.com/maxim-francesco/tinder-clone-ng-spring","commit_stats":null,"previous_names":["maxim-francesco/tinder-clone-ng-spring"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/maxim-francesco/tinder-clone-ng-spring","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxim-francesco%2Ftinder-clone-ng-spring","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxim-francesco%2Ftinder-clone-ng-spring/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxim-francesco%2Ftinder-clone-ng-spring/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxim-francesco%2Ftinder-clone-ng-spring/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maxim-francesco","download_url":"https://codeload.github.com/maxim-francesco/tinder-clone-ng-spring/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxim-francesco%2Ftinder-clone-ng-spring/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31582546,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"online","status_checked_at":"2026-04-09T02:00:06.848Z","response_time":112,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["angular","backend","dating-app","frontend","fullstack","java","jwt-authentication","matchmaking","real-time","relational-database","responsive-ui","rest-api","spring-boot","tailwindcss","tinder-clone","typescript","web-development","websocket"],"created_at":"2025-06-08T07:07:34.432Z","updated_at":"2026-04-09T02:31:00.596Z","avatar_url":"https://github.com/maxim-francesco.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tinder Clone Project\n\n## Overview\n\nThis project is a Tinder-like application that allows users to register, create and manage profiles, swipe on other user profiles (like or dislike), form mutual matches, and communicate via real-time or asynchronous messaging. It consists of:\n\n- **Backend**: Java Spring Boot REST API\n- **Frontend**: Angular SPA (Single-Page Application)\n\n---\n\n## Features\n\n- **User Registration \u0026 Authentication**: Users can sign up with email and password, log in, and log out.\n- **Profile Management**: Create, view, and update a user profile containing name, age, gender, bio, and location.\n- **Swiping \u0026 Matching**: Browse other users’ profiles by swiping “like” or “dislike.” A match is formed when two users mutually “like” each other.\n- **Messaging**: Once matched, users can send and receive text messages, with chat history persisted in the backend.\n- **Likes**: Users can “like” other profiles to express interest. The backend tracks likes to compute matches.\n- **Basic Validation \u0026 Security**: Passwords are hashed before storing. DTOs and input validation ensure data integrity.\n\n---\n\n## Technology Stack\n\n- **Backend**:\n  - Java 17+\n  - Spring Boot 3\n  - Spring Data JPA (Hibernate)\n  - H2 (in-memory) or configurable relational database (PostgreSQL, MySQL, etc.)\n  - Spring Security (for future enhancements)\n  - Lombok (to reduce boilerplate)\n  - MapStruct or custom mappers for DTO conversion\n  - JUnit 5 + Mockito (unit and controller tests)\n\n- **Frontend**:\n  - Angular 15+\n  - TypeScript\n  - Angular Router (SPA navigation)\n  - Angular HttpClient (REST calls)\n  - RxJS (observables, BehaviorSubject)\n  - Tailwind CSS (styling)\n  - Optional: Material or other UI libraries\n\n---\n\n## Prerequisites\n\n- **Backend**:\n  - Java SDK 17+\n  - Maven or Gradle\n- **Frontend**:\n  - Node.js 16+\n  - npm or Yarn\n\n---\n\n## Getting Started\n\n### 1. Clone the Repository\n\n```bash\ngit clone https://github.com/yourusername/tinder-clone.git\ncd tinder-clone\n```\n\n---\n\n## Backend Setup\n\n1. Navigate to the `backend` directory:\n   ```bash\n   cd backend\n   ```\n\n2. Configure the database:\n   - By default, the application uses an in-memory H2 database.\n   - To switch to another database (e.g., PostgreSQL), update `application.properties` or `application.yml` with the correct JDBC URL, username, and password.\n\n3. Build and run the Spring Boot application:\n   ```bash\n   # Using Maven\n   mvn clean install\n   mvn spring-boot:run\n\n   # Or using Gradle\n   ./gradlew clean build\n   ./gradlew bootRun\n   ```\n\n4. The backend server will start on: `http://localhost:8080/`\n\n---\n\n### Backend API Endpoints\n\n- **User Endpoints**:\n  - `POST /user/signup`  \n    - Request: JSON body `{ \"email\": \"...\", \"password\": \"...\", \"profile\": { ... } }`  \n    - Response: `201 Created` + User (password omitted)\n  - `POST /user/login`  \n    - Request: JSON body `{ \"email\": \"...\", \"password\": \"...\" }`  \n    - Response: `200 OK` + User (password omitted) or `400 Bad Request`\n  - `GET /user/all`  \n    - Response: `200 OK` + List of all users (DTOs)\n  - `GET /user/findbyid/{id}`  \n    - Response: `200 OK` + User DTO or `404 Not Found`\n  - `GET /user/findbyemail/{email}`  \n    - Response: `200 OK` + User DTO or `404 Not Found`\n  - `PUT /user/update/{id}`  \n    - Request: JSON body updated UserDTO  \n    - Response: `200 OK` + User DTO or `404 Not Found`\n\n- **Profile Endpoints** (if separated):\n  - `GET /profile/{id}`, `POST /profile`, `PUT /profile/{id}`, etc.\n\n- **Like Endpoints**:\n  - `POST /like/addlike`  \n    - Request: JSON LikeDTO  \n    - Response: `201 Created` + LikeDTO\n\n- **Match Endpoints**:\n  - `POST /match/add`  \n    - Request: JSON MatchDTO `{ \"user1Id\": ..., \"user2Id\": ... }`  \n    - Response: `201 Created` + MatchDTO\n  - `GET /match/findbyid/{userId}`  \n    - Response: `200 OK` + List of MatchDTO\n  - `DELETE /match/deletebyid/{matchId}`  \n    - Response: `204 No Content`\n\n- **Message Endpoints**:\n  - `POST /messages/send`  \n    - Request: JSON MessageDTO `{ \"content\": \"...\", \"senderId\": ..., \"receiverId\": ..., \"matchId\": ... }`  \n    - Response: `200 OK` + MessageDTO\n  - `GET /messages/allbymatch/{matchId}`  \n    - Response: `200 OK` + List of MessageDTO\n\n---\n\n## Frontend Setup\n\n1. Navigate to the `frontend` directory (Angular project):\n   ```bash\n   cd frontend\n   ```\n\n2. Install dependencies:\n   ```bash\n   npm install\n   # or\n   yarn install\n   ```\n\n3. Update environment variables (e.g., API base URL) in `src/environments/environment.ts`:\n   ```ts\n   export const environment = {\n     production: false,\n     apiUrl: 'http://localhost:8080/user'\n   };\n   ```\n\n4. Run the Angular development server:\n   ```bash\n   npm start\n   # or\n   ng serve\n   ```\n\n5. The application will be available at: `http://localhost:4200/`\n\n---\n\n## Angular Services \u0026 Models\n\n- **UserService**:  \n  Provides methods to sign up, log in, log out, fetch all users, fetch by ID or email, and update user.  \n  Stores the current authenticated user in memory using a `BehaviorSubject`.\n\n- **LikeService**:  \n  Provides method to send a like to the backend (`/like/addlike`).\n\n- **MatchService**:  \n  Provides methods to add a match (`/match/add`), fetch matches for a user (`/match/findbyid/{userId}`), and delete matches.\n\n- **MessageService**:  \n  Provides methods to send a message (`/messages/send`) and fetch all messages for a match (`/messages/allbymatch/{matchId}`).\n\n- **Models (TypeScript Interfaces)**:\n  - `UserDTO`: `{ id: number; email: string; password?: string; profileName: string; profileAge: number; profileGender: string; profileBio?: string; profileLocation: string; }`\n  - `LikeDTO`: `{ id?: number; userId: number; targetUserId: number; }`\n  - `MatchDTO`: `{ id?: number; user1Id: number; user2Id: number; }`\n  - `MessageDTO`: `{ id?: number; content: string; senderId: number; receiverId: number; matchId: number; timestamp?: string; }`\n\n---\n\n## Database \u0026 Entities\n\n- **User**:\n  - Fields: `id`, `email` (unique), `password` (hashed), one-to-one `Profile`.\n  - Validations: `@NotBlank` on email/password, custom `@ValidPassword` for password strength.\n\n- **Profile**:\n  - Fields: `id`, `name`, `age`, `gender`, `bio`, `location`.\n\n- **Like**:\n  - Fields: `id`, `sourceUser` (ManyToOne → User), `targetUser` (ManyToOne → User), `timestamp`.\n\n- **Match**:\n  - Fields: `id`, `user1` (ManyToOne → User), `user2` (ManyToOne → User), `createdAt`.\n\n- **Message**:\n  - Fields: `id`, `content`, `sender` (ManyToOne → User), `receiver` (ManyToOne → User), `match` (ManyToOne → Match), `timestamp`.\n\nRelationships are managed via JPA annotations; DTOs decouple the internal models from API.\n\n---\n\n## Running Tests\n\n### Backend\n\n- **Unit \u0026 Controller Tests**:  \n  Located under `backend/src/test/java/...`  \n  Run with:\n  ```bash\n  # Maven\n  mvn test\n\n  # or Gradle\n  ./gradlew test\n  ```\n\nTests cover:\n- `UserControllerTest` (GET all, GET by id/email, POST signup/login, PUT update)\n- `LikeControllerTest` (POST addLike scenarios)\n- `MatchControllerTest` (POST add, GET findById, DELETE delete)\n- `MessageControllerTest` (POST send, GET allByMatch)\n\n### Frontend\n\n- **Angular Tests** (unit \u0026 integration):  \n  Run:\n  ```bash\n  ng test\n  ```\n\n---\n\n## Future Improvements\n\n- **WebSocket Chat**: Implement real-time messaging using STOMP over WebSocket.\n- **Third-Party OAuth**: Sign in via Google, Facebook, etc.\n- **Image Uploads**: Allow users to upload profile photos (Firebase Storage or AWS S3).\n- **Push Notifications**: Notify users of new matches and messages.\n- **Enhanced Security**: Integrate JWT tokens, refresh tokens, and role-based access.\n- **Pagination \u0026 Filtering**: For swiping interface, load profiles in pages and filter by preferences.\n- **Mobile-Friendly UI / PWA**: Improve responsive design or convert frontend into a Progressive Web App.\n- **Deployment**: Dockerize both backend and frontend, configure CI/CD pipelines.\n\n---\n\n## Contributing\n\n1. Fork the repository.\n2. Create a feature branch: `git checkout -b feature/my-feature`.\n3. Commit your changes: `git commit -m \"Add some feature\"`.\n4. Push to the branch: `git push origin feature/my-feature`.\n5. Submit a Pull Request describing your changes.\n\n---\n\n## Contact\n\n- **Author**: Francesco Maxim  \n- **Email**: maaximfrancesco@gmail.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxim-francesco%2Ftinder-clone-ng-spring","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxim-francesco%2Ftinder-clone-ng-spring","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxim-francesco%2Ftinder-clone-ng-spring/lists"}