├── client ├── src │ ├── assets │ │ ├── .gitkeep │ │ └── user.png │ ├── app │ │ ├── app.component.css │ │ ├── home │ │ │ ├── home.component.css │ │ │ ├── home.component.html │ │ │ └── home.component.ts │ │ ├── list │ │ │ ├── list.component.css │ │ │ ├── list.component.ts │ │ │ └── list.component.html │ │ ├── _forms │ │ │ ├── date-input │ │ │ │ ├── date-input.component.css │ │ │ │ ├── date-input.component.html │ │ │ │ └── date-input.component.ts │ │ │ └── text-input │ │ │ │ ├── text-input.component.css │ │ │ │ ├── text-input.component.ts │ │ │ │ └── text-input.component.html │ │ ├── admin │ │ │ ├── admin-panel │ │ │ │ ├── admin-panel.component.css │ │ │ │ ├── admin-panel.component.ts │ │ │ │ └── admin-panel.component.html │ │ │ ├── user-management │ │ │ │ ├── user-management.component.css │ │ │ │ ├── user-management.component.html │ │ │ │ └── user-management.component.ts │ │ │ └── photo-management │ │ │ │ ├── photo-management.component.css │ │ │ │ ├── photo-management.component.html │ │ │ │ └── photo-management.component.ts │ │ ├── errors │ │ │ ├── not-found │ │ │ │ ├── not-found.component.css │ │ │ │ ├── not-found.component.html │ │ │ │ └── not-found.component.ts │ │ │ ├── server-error │ │ │ │ ├── server-error.component.css │ │ │ │ ├── server-error.component.ts │ │ │ │ └── server-error.component.html │ │ │ └── test-errors │ │ │ │ ├── test-errors.component.css │ │ │ │ ├── test-errors.component.html │ │ │ │ └── test-errors.component.ts │ │ ├── reset-password │ │ │ ├── reset-password.component.css │ │ │ ├── reset-password.component.html │ │ │ └── reset-password.component.ts │ │ ├── forgot-password │ │ │ ├── forgot-password.component.css │ │ │ ├── forgot-password.component.ts │ │ │ └── forgot-password.component.html │ │ ├── modals │ │ │ ├── roles-modal │ │ │ │ ├── roles-modal.component.css │ │ │ │ ├── roles-modal.component.ts │ │ │ │ └── roles-modal.component.html │ │ │ └── confirm-dialog │ │ │ │ ├── confirm-dialog.component.css │ │ │ │ ├── confirm-dialog.component.html │ │ │ │ └── confirm-dialog.component.ts │ │ ├── confirm-password-sent │ │ │ ├── confirm-password-sent.component.css │ │ │ ├── confirm-password-sent.component.html │ │ │ └── confirm-password-sent.component.ts │ │ ├── confirmation-email-sent │ │ │ ├── confirmation-email-sent.component.css │ │ │ ├── confirmation-email-sent.component.html │ │ │ └── confirmation-email-sent.component.ts │ │ ├── reset-password-complete │ │ │ ├── reset-password-complete.component.css │ │ │ ├── reset-password-complete.component.html │ │ │ └── reset-password-complete.component.ts │ │ ├── messages │ │ │ ├── messages.component.css │ │ │ ├── messages.component.ts │ │ │ └── messages.component.html │ │ ├── login │ │ │ ├── login.component.css │ │ │ ├── login.component.ts │ │ │ └── login.component.html │ │ ├── confirm-email │ │ │ ├── confirm-email.component.css │ │ │ ├── confirm-email.component.html │ │ │ └── confirm-email.component.ts │ │ ├── register │ │ │ ├── register.component.css │ │ │ └── register.component.ts │ │ ├── _models │ │ │ ├── photo.ts │ │ │ ├── user.ts │ │ │ ├── group.ts │ │ │ ├── pagination.ts │ │ │ ├── message.ts │ │ │ ├── userParams.ts │ │ │ └── member.ts │ │ ├── nav │ │ │ ├── nav.component.css │ │ │ ├── nav.component.ts │ │ │ └── nav.component.html │ │ ├── app.component.html │ │ ├── members │ │ │ ├── member-list │ │ │ │ ├── member-list.component.css │ │ │ │ ├── member-list.component.ts │ │ │ │ └── member-list.component.html │ │ │ ├── member-edit │ │ │ │ ├── member-edit.component.css │ │ │ │ ├── member-edit.component.ts │ │ │ │ └── member-edit.component.html │ │ │ ├── member-detail │ │ │ │ ├── member-detail.component.css │ │ │ │ ├── member-detail.component.html │ │ │ │ └── member-detail.component.ts │ │ │ ├── member-messages │ │ │ │ ├── member-messages.component.css │ │ │ │ ├── member-messages.component.ts │ │ │ │ └── member-messages.component.html │ │ │ ├── photo-editor │ │ │ │ ├── photo-editor.component.css │ │ │ │ └── photo-editor.component.ts │ │ │ └── member-card │ │ │ │ ├── member-card.component.css │ │ │ │ ├── member-card.component.ts │ │ │ │ └── member-card.component.html │ │ ├── _resolvers │ │ │ └── member-detailed.resolver.ts │ │ ├── _services │ │ │ ├── busy.service.ts │ │ │ ├── paginationHelper.ts │ │ │ ├── admin.service.ts │ │ │ ├── confirm.service.ts │ │ │ ├── presence.service.ts │ │ │ ├── account.service.ts │ │ │ ├── message.service.ts │ │ │ └── members.service.ts │ │ ├── _interceptors │ │ │ ├── loading.interceptor.ts │ │ │ ├── jwt.interceptor.ts │ │ │ └── error.interceptor.ts │ │ ├── _guards │ │ │ ├── prevent-unsaved-changes.guard.ts │ │ │ ├── auth.guard.ts │ │ │ └── admin.guard.ts │ │ ├── _directives │ │ │ └── has-role.directive.ts │ │ ├── app.component.spec.ts │ │ ├── _modules │ │ │ └── shared.module.ts │ │ ├── app.component.ts │ │ └── app-routing.module.ts │ ├── favicon.ico │ ├── environments │ │ ├── environment.prod.ts │ │ └── environment.ts │ ├── index.html │ ├── main.ts │ ├── test.ts │ ├── styles.css │ └── polyfills.ts ├── .editorconfig ├── e2e │ ├── src │ │ ├── app.po.ts │ │ └── app.e2e-spec.ts │ ├── tsconfig.json │ └── protractor.conf.js ├── tsconfig.app.json ├── tsconfig.spec.json ├── tsconfig.json ├── .gitignore ├── .browserslistrc ├── README.md ├── karma.conf.js └── package.json ├── API ├── wwwroot │ ├── favicon.ico │ ├── assets │ │ └── user.png │ ├── fontawesome-webfont.1e59d2330b4c6deb84b3.ttf │ ├── fontawesome-webfont.8b43027f47b20503057d.eot │ ├── fontawesome-webfont.20fd1704ea223900efa9.woff2 │ ├── fontawesome-webfont.f691f37e57f04c152e23.woff │ ├── index.html │ └── runtime.acf0dec4155e77772545.js ├── DTOs │ ├── ConfirmEmailDto.cs │ ├── CreateMessageDto.cs │ ├── LoginDTO.cs │ ├── ResetPasswordDto.cs │ ├── ForgotPasswordDto.cs │ ├── PhotoDto.cs │ ├── PhotoForApprovalDto.cs │ ├── UserDto.cs │ ├── MemberUpdateDTO.cs │ ├── LikeDTO.cs │ ├── MemberDto.cs │ ├── RegisterDto.cs │ └── MessageDto.cs ├── Helpers │ ├── LikesParams.cs │ ├── MessageParams.cs │ ├── CloudinarySettings.cs │ ├── PaginationParams.cs │ ├── UserParams.cs │ ├── PaginationHeader.cs │ ├── HttpExtensions.cs │ ├── LogUserActivity.cs │ ├── AutomapperProfiles.cs │ ├── PageList.cs │ └── URLBuilder.cs ├── Interfaces │ ├── ITokenService.cs │ ├── IPhotoService.cs │ ├── IPhotoRepository.cs │ ├── IUnitOfWork.cs │ ├── ILikeRepository.cs │ ├── IUserRepository.cs │ └── IMessageRepository.cs ├── Entities │ ├── AppRole.cs │ ├── AppUserRole.cs │ ├── UserLike.cs │ ├── Connection.cs │ ├── Group.cs │ ├── Photo.cs │ ├── Message.cs │ └── AppUser.cs ├── Controllers │ ├── BaseAPIController.cs │ ├── FallbackController.cs │ ├── BuggyController.cs │ ├── LikesController.cs │ └── MessagesController.cs ├── Extentions │ ├── DateTimeExtensions.cs │ ├── ClaimsPrincipleExtentions.cs │ ├── IdentityServiceExtensions.cs │ └── ApplicationServiceExtensions.cs ├── Errors │ └── ApiException.cs ├── Data │ ├── ForgotPasswordRepository.cs │ ├── UnitOfWork.cs │ ├── PhotoRepository.cs │ ├── Seed.cs │ └── LikesRepository.cs ├── appsettings.Development.json ├── appsettings.json ├── Properties │ └── launchSettings.json ├── SignalR │ ├── PresenceHub.cs │ └── PresenceTracker.cs ├── API.csproj ├── Middleware │ └── ExceptionMiddleware.cs ├── Program.cs ├── Services │ ├── PhotoService.cs │ └── TokenService.cs └── Startup.cs ├── EmailService ├── IEmailSender.cs ├── EmailConfiguration.cs ├── EmailService.csproj └── Message.cs ├── .vscode ├── tasks.json └── launch.json ├── DatingApp.sln └── .gitattributes /client/src/assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /client/src/app/app.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /client/src/app/home/home.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /client/src/app/list/list.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /client/src/app/_forms/date-input/date-input.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /client/src/app/_forms/text-input/text-input.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /client/src/app/admin/admin-panel/admin-panel.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /client/src/app/errors/not-found/not-found.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /client/src/app/reset-password/reset-password.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /client/src/app/errors/server-error/server-error.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /client/src/app/errors/test-errors/test-errors.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /client/src/app/forgot-password/forgot-password.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /client/src/app/modals/roles-modal/roles-modal.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /client/src/app/admin/user-management/user-management.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /client/src/app/modals/confirm-dialog/confirm-dialog.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /client/src/app/confirm-password-sent/confirm-password-sent.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /client/src/app/confirmation-email-sent/confirmation-email-sent.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /client/src/app/reset-password-complete/reset-password-complete.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /client/src/app/messages/messages.component.css: -------------------------------------------------------------------------------- 1 | .img-circle{ 2 | max-height: 50px; 3 | } -------------------------------------------------------------------------------- /API/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonymatute/DatingApp/HEAD/API/wwwroot/favicon.ico -------------------------------------------------------------------------------- /client/src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonymatute/DatingApp/HEAD/client/src/favicon.ico -------------------------------------------------------------------------------- /client/src/app/login/login.component.css: -------------------------------------------------------------------------------- 1 | 2 | .div-border { 3 | border: 2px solid ; 4 | } 5 | 6 | 7 | -------------------------------------------------------------------------------- /client/src/assets/user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonymatute/DatingApp/HEAD/client/src/assets/user.png -------------------------------------------------------------------------------- /API/wwwroot/assets/user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonymatute/DatingApp/HEAD/API/wwwroot/assets/user.png -------------------------------------------------------------------------------- /client/src/app/confirm-email/confirm-email.component.css: -------------------------------------------------------------------------------- 1 | .div-border { 2 | border: 2px solid ; 3 | } -------------------------------------------------------------------------------- /client/src/app/register/register.component.css: -------------------------------------------------------------------------------- 1 | 2 | .div-border { 3 | border: 2px solid ; 4 | 5 | } -------------------------------------------------------------------------------- /client/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true, 3 | apiUrl: 'api/', 4 | hubUrl: 'hubs/' 5 | }; 6 | -------------------------------------------------------------------------------- /API/wwwroot/fontawesome-webfont.1e59d2330b4c6deb84b3.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonymatute/DatingApp/HEAD/API/wwwroot/fontawesome-webfont.1e59d2330b4c6deb84b3.ttf -------------------------------------------------------------------------------- /API/wwwroot/fontawesome-webfont.8b43027f47b20503057d.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonymatute/DatingApp/HEAD/API/wwwroot/fontawesome-webfont.8b43027f47b20503057d.eot -------------------------------------------------------------------------------- /API/wwwroot/fontawesome-webfont.20fd1704ea223900efa9.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonymatute/DatingApp/HEAD/API/wwwroot/fontawesome-webfont.20fd1704ea223900efa9.woff2 -------------------------------------------------------------------------------- /API/wwwroot/fontawesome-webfont.f691f37e57f04c152e23.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonymatute/DatingApp/HEAD/API/wwwroot/fontawesome-webfont.f691f37e57f04c152e23.woff -------------------------------------------------------------------------------- /client/src/app/_models/photo.ts: -------------------------------------------------------------------------------- 1 | export interface Photo { 2 | id: number; 3 | url: string; 4 | isMain: boolean; 5 | isApproved: boolean; 6 | username?: string; 7 | } 8 | -------------------------------------------------------------------------------- /client/src/app/admin/photo-management/photo-management.component.css: -------------------------------------------------------------------------------- 1 | img-thumbnail { 2 | height: 150px; 3 | min-width: 150px !important; 4 | margin-bottom: 2px; 5 | } -------------------------------------------------------------------------------- /client/src/app/nav/nav.component.css: -------------------------------------------------------------------------------- 1 | .dropdown-toggle,.dropdown-item{ 2 | cursor: pointer; 3 | } 4 | 5 | img{ 6 | max-height: 50px; 7 | border: 2px solid white; 8 | display: inline; 9 | } -------------------------------------------------------------------------------- /client/src/app/_models/user.ts: -------------------------------------------------------------------------------- 1 | export interface User{ 2 | username: string; 3 | token: string; 4 | photoUrl: string; 5 | knownAs: string; 6 | gender: string; 7 | roles: string[]; 8 | } -------------------------------------------------------------------------------- /API/DTOs/ConfirmEmailDto.cs: -------------------------------------------------------------------------------- 1 | namespace API.DTOs 2 | { 3 | public class ConfirmEmailDto 4 | { 5 | public string userid { get; set; } 6 | public string token { get; set; } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /client/src/app/_models/group.ts: -------------------------------------------------------------------------------- 1 | export interface Group { 2 | name: string; 3 | connection: Connection[]; 4 | } 5 | 6 | interface Connection { 7 | connectionId: string; 8 | username: string; 9 | } -------------------------------------------------------------------------------- /client/src/app/confirm-password-sent/confirm-password-sent.component.html: -------------------------------------------------------------------------------- 1 |
An email was sent to your email address with link to change your password.
4 | 5 | 6 | -------------------------------------------------------------------------------- /client/src/app/errors/not-found/not-found.component.html: -------------------------------------------------------------------------------- 1 |Your email address has been confirmed. Proceed to 4 | Login
5 | -------------------------------------------------------------------------------- /API/Helpers/LikesParams.cs: -------------------------------------------------------------------------------- 1 | namespace API.Helpers 2 | { 3 | public class LikesParams : PaginationParams 4 | { 5 | public int UserId { get; set; } 6 | public string Predicate { get; set; } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /client/src/app/reset-password-complete/reset-password-complete.component.html: -------------------------------------------------------------------------------- 1 |Your password has been reset. Proceed to 4 | Login
-------------------------------------------------------------------------------- /client/src/app/app.component.html: -------------------------------------------------------------------------------- 1 |Please click on the link that has just been sent to your email account to verify your email and continue the registration process.
4 | 5 | 6 | -------------------------------------------------------------------------------- /client/src/app/members/member-list/member-list.component.css: -------------------------------------------------------------------------------- 1 | .img-thumbnail { 2 | margin: 25px; 3 | width: 85%; 4 | height: 85%; 5 | } 6 | .card-body { 7 | padding: 0 25px; 8 | } 9 | .card-footer{ 10 | padding:10px 15px; 11 | background-color: white; 12 | border-top: none; 13 | } -------------------------------------------------------------------------------- /API/DTOs/PhotoForApprovalDto.cs: -------------------------------------------------------------------------------- 1 | namespace API.DTOs 2 | { 3 | public class PhotoForApprovalDto 4 | { 5 | public int id { get; set; } 6 | public string Url { get; set; } 7 | public string Username { get; set; } 8 | public bool IsApproved { get; set; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /API/Entities/UserLike.cs: -------------------------------------------------------------------------------- 1 | namespace API.Entities 2 | { 3 | public class UserLike 4 | { 5 | public AppUser SourceUser { get; set; } 6 | public int SourceUserId { get; set; } 7 | public AppUser LikedUser { get; set; } 8 | public int LikedUserId { get; set; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /client/src/app/members/member-edit/member-edit.component.css: -------------------------------------------------------------------------------- 1 | .img-thumbnail { 2 | margin: 25px; 3 | width: 85%; 4 | height: 85; 5 | } 6 | 7 | .card-body { 8 | padding: 0 25px; 9 | } 10 | .card-footer { 11 | padding: 10px 15px; 12 | background-color: white; 13 | border-top: none; 14 | } -------------------------------------------------------------------------------- /client/src/app/members/member-detail/member-detail.component.css: -------------------------------------------------------------------------------- 1 | .img-thumbnail { 2 | margin: 25px; 3 | width: 85%; 4 | height: 85; 5 | } 6 | 7 | .card-body { 8 | padding: 0 25px; 9 | } 10 | .card-footer { 11 | padding: 10px 15px; 12 | background-color: white; 13 | border-top: none; 14 | } -------------------------------------------------------------------------------- /API/Controllers/BaseAPIController.cs: -------------------------------------------------------------------------------- 1 | using API.Helpers; 2 | using Microsoft.AspNetCore.Mvc; 3 | 4 | namespace API.Controllers 5 | { 6 | [ServiceFilter(typeof(LogUserActivity))] 7 | [ApiController] 8 | [Route("api/[controller]")] 9 | public class BaseAPIController: ControllerBase 10 | { 11 | 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /EmailService/IEmailSender.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Threading.Tasks; 5 | 6 | namespace EmailService 7 | { 8 | public interface IEmailSender 9 | { 10 | void SendEmail(Message message); 11 | Task SendEmailAsync(Message message); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /API/DTOs/UserDto.cs: -------------------------------------------------------------------------------- 1 | 2 | namespace API.DTOs 3 | { 4 | public class UserDto 5 | { 6 | public string Username { get; set; } 7 | public string Token { get; set; } 8 | public string PhotoUrl { get; set; } 9 | public string KnownAs { get; set; } 10 | public string Gender { get; set; } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /client/src/app/_models/message.ts: -------------------------------------------------------------------------------- 1 | export interface Message { 2 | id: number; 3 | senderId: number; 4 | senderUsername: string; 5 | senderPhotoUrl: string; 6 | recipientId: number; 7 | recipientUsername: string; 8 | recipientPhotoUrl: string; 9 | content: string; 10 | dateRead: Date; 11 | messageSent: Date; 12 | } -------------------------------------------------------------------------------- /client/.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see https://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.ts] 12 | quote_type = single 13 | 14 | [*.md] 15 | max_line_length = off 16 | trim_trailing_whitespace = false 17 | -------------------------------------------------------------------------------- /client/e2e/src/app.po.ts: -------------------------------------------------------------------------------- 1 | import { browser, by, element } from 'protractor'; 2 | 3 | export class AppPage { 4 | navigateTo(): PromiseCome on in to view your matches.... all you nedd to do is sign up!
5 |{{message}}
6 || Username | 5 |Active Roles | 6 |7 | |
|---|---|---|
| {{user.username}} | 10 |{{user.roles}} | 11 |12 | |
Refreshing the page will make this error dissapear!
4 |Note: if you are seeing this error then Angular is probably not to blame.
8 |What to do next:
9 |Following the stack trace - this is where your invvestigation should start!
17 |{{error.details}}
18 |
4 |
23 | 32 | {{member.city}}, {{member.country}} 33 |
34 |
5 | {{member.city}}, {{member.country}}
12 |{{member.age}}
16 |{{member.lastActive | timeago}}
20 |{{member.created | date: 'longDate'}}
24 |{{member.introduction}}
39 |{{member.lookingFor}}
41 |{{member.introduction}}
45 || Message | 21 |From / To | 22 |Sent / Received | 23 |24 | |
|---|---|---|---|
| {{message.content}} | 30 |
31 |
32 |
37 |
35 | {{message.recipientUsername | titlecase}}
36 |
38 |
43 |
41 | {{message.senderUsername | titlecase}}
42 | |
44 | {{message.messageSent | timeago}} | 45 |46 | 47 | | 48 |
14 | {{member.city}}, {{member.country}}
18 |{{member.age}}
22 |{{member.lastActive | timeago}}
26 |{{member.created | date: 'longDate'}}
30 |