Feature/tinder (#179)

* basic framework for match/tinder

* working version of swiping

* working version of profile editing

* introducing backend

* working matching system

* working profile updating

* fix all linting issues

* updated events to Enum

* working profile generation

* documentation updates

* general PR feedback

* working profile loading, matches show matchedAt

* slight modification to event strings

* added sql imports
This commit is contained in:
Erik authored and GitHub committed 2021-03-26 13:29:51 -04:00
1 parent b02b19be5f
commit 6b865f2e73
46 files changed
+1932 -49

No files matched your search

+5
View File
@@ -12,6 +12,10 @@ interface TwitterConfig {
maxImages: number;
}
interface MatchConfig {
generateProfileNameFromUsers: boolean;
allowEdtiableProfileName: boolean;
}
interface Debug {
level: 'error' | 'warn' | 'info' | 'verbose' | 'debug';
enabled: boolean;
@@ -40,6 +44,7 @@ export interface IServerConfig {
DestoryChance: number;
DestroyPhoneReCheck: number;
twitter: TwitterConfig;
match: MatchConfig;
bank: BankConfig;
notificationPosition: NotificationConfig;
general: General;
+61
View File
@@ -0,0 +1,61 @@
import { Contact } from './contact';
export interface NewProfile {
name: string;
image: string;
bio: string;
job: string;
location: string;
tags: string;
}
export interface Profile extends NewProfile {
id: number;
identifier: string;
phoneNumber: string;
viewed: boolean;
createdAt: number;
updatedAt: number;
lastActive: number;
}
export interface FormattedProfile extends Profile {
lastActiveFormatted: string;
tagList: string[];
}
export interface Match extends Profile {
matchedAt: number;
}
export interface FormattedMatch extends FormattedProfile {
matchedAtFormatted: string;
}
export interface Like {
id: number; // profile id
liked: boolean;
}
export enum MatchEvents {
INITIALIZE = 'phone:initializeMatch',
GET_PROFILES = 'phone:getMatchProfiles',
GET_PROFILES_SUCCESS = 'phone:getMatchProfilesSuccess',
GET_PROFILES_FAILED = 'phone:getMatchProfilesError',
CREATE_MY_PROFILE = 'phone:createMyProfile',
CREATE_MY_PROFILE_SUCCESS = 'phone:createMyProfileSuccess',
CREATE_MY_PROFILE_FAILED = 'phone:createMyProfileError',
GET_MY_PROFILE = 'phone:getMyProfile',
GET_MY_PROFILE_SUCCESS = 'phone:getMyProfileSuccess',
GET_MY_PROFILE_FAILED = 'phone:getMyProfileError',
UPDATE_MY_PROFILE = 'phone:updateMyProfile',
UPDATE_MY_PROFILE_SUCCESS = 'phone:updateMyProfileSuccess',
UPDATE_MY_PROFILE_FAILED = 'phone:updateMyProfileError',
GET_MATCHES = 'phone:getMatches',
GET_MATCHES_SUCCESS = 'phone:getMatchesSuccess',
GET_MATCHES_FAILED = 'phone:getMatchesError',
SAVE_LIKES = 'phone:saveLikes',
SAVE_LIKES_SUCCESS = 'phone:saveLikesSuccess',
SAVE_LIKES_FAILED = 'phone:saveLikesError',
NEW_MATCH = 'phone:newMatchFound',
}