diff --git a/.idea/dataSources.local.xml b/.idea/dataSources.local.xml index 6bea2b4..9e885e4 100644 --- a/.idea/dataSources.local.xml +++ b/.idea/dataSources.local.xml @@ -1,6 +1,6 @@ - + " diff --git a/.idea/dataSources/723637bc-6ce3-4bbe-afb3-d88730c75a1b.xml b/.idea/dataSources/723637bc-6ce3-4bbe-afb3-d88730c75a1b.xml index 79223f4..c4e5736 100644 --- a/.idea/dataSources/723637bc-6ce3-4bbe-afb3-d88730c75a1b.xml +++ b/.idea/dataSources/723637bc-6ce3-4bbe-afb3-d88730c75a1b.xml @@ -1,6 +1,6 @@ - + mdy 1||-9223372036854775808|c|G @@ -4851,115 +4851,115 @@ true posixrules pg_database_owner - bigint|0s 16396 1 1 747 + bigint|0s postgres - bigint|0s 17069 1 1 3790 + bigint|0s postgres - bigint|0s 16981 1 1 1416 + bigint|0s postgres - bigint|0s 16402 1 1 752 + bigint|0s postgres - bigint|0s 16408 1 1 757 + bigint|0s postgres - bigint|0s 16414 1 1 762 + bigint|0s postgres - bigint|0s 16426 1 1 772 + bigint|0s postgres - bigint|0s 16438 1 1 782 + bigint|0s postgres - bigint|0s 16444 1 1 787 + bigint|0s postgres - bigint|0s 16450 1 1 792 + bigint|0s postgres - bigint|0s 16456 1 1 797 + bigint|0s postgres - bigint|0s 17805 1 1 25805 + bigint|0s postgres - bigint|0s 18214 1 1 39862 + bigint|0s postgres - bigint|0s 18203 1 1 39859 + bigint|0s postgres @@ -5048,66 +5048,66 @@ true posixrules postgres
- bigint|0s nextval('identity_account_contacts_id_seq'::regclass) 1 1 800 + bigint|0s 16396 20 - timestamp with time zone|0s 2 745 + timestamp with time zone|0s 1184 - timestamp with time zone|0s 3 745 + timestamp with time zone|0s 1184 - timestamp with time zone|0s 4 745 + timestamp with time zone|0s 1184 - smallint|0s 5 745 + smallint|0s 21 - text|0s 6 745 + text|0s 25 - boolean|0s 7 745 + boolean|0s 16 - boolean|0s 8 745 + boolean|0s 16 - timestamp with time zone|0s 9 745 + timestamp with time zone|0s 1184 - bigint|0s 10 745 + bigint|0s 20 @@ -5176,54 +5176,54 @@ true posixrules 17778 - bigint|0s nextval('identity_account_friendships_id_seq'::regclass) 1 1 3790 + bigint|0s 17069 20 - timestamp with time zone|0s 2 3790 + timestamp with time zone|0s 1184 - timestamp with time zone|0s 3 3790 + timestamp with time zone|0s 1184 - timestamp with time zone|0s 4 3790 + timestamp with time zone|0s 1184 - bigint|0s 5 3790 + bigint|0s 20 - bigint|0s 6 3790 + bigint|0s 20 - smallint|0s 7 3790 + smallint|0s 21 - bigint|0s 8 7471 + bigint|0s 20 @@ -5281,60 +5281,60 @@ true posixrules 17074 - bigint|0s nextval('identity_account_pages_id_seq'::regclass) 1 1 1416 + bigint|0s 16981 20 - timestamp with time zone|0s 2 1416 + timestamp with time zone|0s 1184 - timestamp with time zone|0s 3 1416 + timestamp with time zone|0s 1184 - timestamp with time zone|0s 4 1416 + timestamp with time zone|0s 1184 - text|0s 5 1416 + text|0s 25 - text|0s 6 1416 + text|0s 25 - text|0s 7 1416 + text|0s 25 - jsonb|0s 8 1416 + jsonb|0s 3802 - bigint|0s 9 1416 + bigint|0s 20 @@ -5378,60 +5378,60 @@ true posixrules 16988 - bigint|0s nextval('identity_account_profiles_id_seq'::regclass) 1 1 801 + bigint|0s 16402 20 - timestamp with time zone|0s 2 750 + timestamp with time zone|0s 1184 - timestamp with time zone|0s 3 750 + timestamp with time zone|0s 1184 - timestamp with time zone|0s 4 750 + timestamp with time zone|0s 1184 - text|0s 5 750 + text|0s 25 - text|0s 6 750 + text|0s 25 - bigint|0s 7 750 + bigint|0s 20 - timestamp with time zone|0s 8 750 + timestamp with time zone|0s 1184 - bigint|0s 9 750 + bigint|0s 20 @@ -5475,72 +5475,72 @@ true posixrules 16470 - bigint|0s nextval('identity_accounts_id_seq'::regclass) 1 1 802 + bigint|0s 16408 20 - timestamp with time zone|0s 2 755 + timestamp with time zone|0s 1184 - timestamp with time zone|0s 3 755 + timestamp with time zone|0s 1184 - timestamp with time zone|0s 4 755 + timestamp with time zone|0s 1184 - text|0s 5 755 + text|0s 25 - text|0s 6 755 + text|0s 25 - text|0s 7 755 + text|0s 25 - text|0s 8 755 + text|0s 25 - timestamp with time zone|0s 9 755 + timestamp with time zone|0s 1184 - bigint|0s 10 755 + bigint|0s 20 - text|0s 11 755 + text|0s 25 @@ -5595,66 +5595,66 @@ true posixrules 17757 - bigint|0s nextval('identity_action_events_id_seq'::regclass) 1 1 803 + bigint|0s 16414 20 - timestamp with time zone|0s 2 760 + timestamp with time zone|0s 1184 - timestamp with time zone|0s 3 760 + timestamp with time zone|0s 1184 - timestamp with time zone|0s 4 760 + timestamp with time zone|0s 1184 - text|0s 5 760 + text|0s 25 - text|0s 6 760 + text|0s 25 - text|0s 7 760 + text|0s 25 - text|0s 8 760 + text|0s 25 - text|0s 9 760 + text|0s 25 - bigint|0s 10 760 + bigint|0s 20 @@ -5698,54 +5698,54 @@ true posixrules 16474 - bigint|0s nextval('identity_auth_factors_id_seq'::regclass) 1 1 805 + bigint|0s 16426 20 - timestamp with time zone|0s 2 770 + timestamp with time zone|0s 1184 - timestamp with time zone|0s 3 770 + timestamp with time zone|0s 1184 - timestamp with time zone|0s 4 770 + timestamp with time zone|0s 1184 - smallint|0s 5 770 + smallint|0s 21 - text|0s 6 770 + text|0s 25 - jsonb|0s 7 770 + jsonb|0s 3802 - bigint|0s 8 770 + bigint|0s 20 @@ -5789,120 +5789,120 @@ true posixrules 16478 - bigint|0s nextval('passport_auth_tickets_id_seq'::regclass) 1 1 25805 + bigint|0s 17805 20 - timestamp with time zone|0s 2 25805 + timestamp with time zone|0s 1184 - timestamp with time zone|0s 3 25805 + timestamp with time zone|0s 1184 - timestamp with time zone|0s 4 25805 + timestamp with time zone|0s 1184 - text|0s 5 25805 + text|0s 25 - text|0s 6 25805 + text|0s 25 - text|0s 7 25805 + text|0s 25 - boolean|0s 8 25805 + boolean|0s 16 - boolean|0s 9 25805 + boolean|0s 16 - jsonb|0s 10 25805 + jsonb|0s 3802 - jsonb|0s 11 25805 + jsonb|0s 3802 - text|0s 12 25805 + text|0s 25 - text|0s 13 25805 + text|0s 25 - text|0s 14 25805 + text|0s 25 - timestamp with time zone|0s 15 25805 + timestamp with time zone|0s 1184 - timestamp with time zone|0s 16 25805 + timestamp with time zone|0s 1184 - timestamp with time zone|0s 17 25805 + timestamp with time zone|0s 1184 - bigint|0s 18 25805 + bigint|0s 20 - bigint|0s 19 25805 + bigint|0s 20 @@ -5942,54 +5942,54 @@ true posixrules 17812 - bigint|0s nextval('identity_magic_tokens_id_seq'::regclass) 1 1 807 + bigint|0s 16438 20 - timestamp with time zone|0s 2 780 + timestamp with time zone|0s 1184 - timestamp with time zone|0s 3 780 + timestamp with time zone|0s 1184 - timestamp with time zone|0s 4 780 + timestamp with time zone|0s 1184 - text|0s 5 780 + text|0s 25 - smallint|0s 6 780 + smallint|0s 21 - bigint|0s 7 780 + bigint|0s 20 - timestamp with time zone|0s 8 780 + timestamp with time zone|0s 1184 @@ -6033,54 +6033,54 @@ true posixrules 16482 - bigint|0s nextval('identity_notification_subscribers_id_seq'::regclass) 1 1 808 + bigint|0s 16444 20 - timestamp with time zone|0s 2 785 + timestamp with time zone|0s 1184 - timestamp with time zone|0s 3 785 + timestamp with time zone|0s 1184 - timestamp with time zone|0s 4 785 + timestamp with time zone|0s 1184 - text|0s 5 785 + text|0s 25 - text|0s 6 785 + text|0s 25 - text|0s 7 785 + text|0s 25 - bigint|0s 8 785 + bigint|0s 20 @@ -6149,72 +6149,72 @@ true posixrules 17848 - bigint|0s nextval('identity_notifications_id_seq'::regclass) 1 1 809 + bigint|0s 16450 20 - timestamp with time zone|0s 2 790 + timestamp with time zone|0s 1184 - timestamp with time zone|0s 3 790 + timestamp with time zone|0s 1184 - timestamp with time zone|0s 4 790 + timestamp with time zone|0s 1184 - text|0s 5 790 + text|0s 25 - text|0s 6 790 + text|0s 25 - jsonb|0s 7 790 + jsonb|0s 3802 - boolean|0s 8 790 + boolean|0s 16 - timestamp with time zone|0s 9 790 + timestamp with time zone|0s 1184 - bigint|0s 10 790 + bigint|0s 20 - bigint|0s 11 790 + bigint|0s 20 @@ -6272,48 +6272,48 @@ true posixrules 16486 - bigint|0s nextval('passport_realm_members_id_seq'::regclass) 1 1 39862 + bigint|0s 18214 20 - timestamp with time zone|0s 2 39862 + timestamp with time zone|0s 1184 - timestamp with time zone|0s 3 39862 + timestamp with time zone|0s 1184 - timestamp with time zone|0s 4 39862 + timestamp with time zone|0s 1184 - bigint|0s 5 39862 + bigint|0s 20 - bigint|0s 6 39862 + bigint|0s 20 - bigint|0s 7 39862 + bigint|0s 20 @@ -6360,66 +6360,66 @@ true posixrules 18219 - bigint|0s nextval('passport_realms_id_seq'::regclass) 1 1 39859 + bigint|0s 18203 20 - timestamp with time zone|0s 2 39859 + timestamp with time zone|0s 1184 - timestamp with time zone|0s 3 39859 + timestamp with time zone|0s 1184 - timestamp with time zone|0s 4 39859 + timestamp with time zone|0s 1184 - text|0s 5 39859 + text|0s 25 - text|0s 6 39859 + text|0s 25 - text|0s 7 39859 + text|0s 25 - boolean|0s 8 39859 + boolean|0s 16 - boolean|0s 9 39859 + boolean|0s 16 - bigint|0s 10 39859 + bigint|0s 20 @@ -6455,78 +6455,78 @@ true posixrules 18210 - bigint|0s nextval('identity_third_clients_id_seq'::regclass) 1 1 810 + bigint|0s 16456 20 - timestamp with time zone|0s 2 795 + timestamp with time zone|0s 1184 - timestamp with time zone|0s 3 795 + timestamp with time zone|0s 1184 - timestamp with time zone|0s 4 795 + timestamp with time zone|0s 1184 - text|0s 5 795 + text|0s 25 - text|0s 6 795 + text|0s 25 - text|0s 7 795 + text|0s 25 - text|0s 8 795 + text|0s 25 - jsonb|0s 9 795 + jsonb|0s 3802 - jsonb|0s 10 795 + jsonb|0s 3802 - boolean|0s 11 795 + boolean|0s 16 - bigint|0s 12 795 + bigint|0s 20 diff --git a/.idea/dataSources/74bcf3ef-a2b9-435b-b9e5-f32902a33b25.xml b/.idea/dataSources/74bcf3ef-a2b9-435b-b9e5-f32902a33b25.xml index e7c8c61..83da32f 100644 --- a/.idea/dataSources/74bcf3ef-a2b9-435b-b9e5-f32902a33b25.xml +++ b/.idea/dataSources/74bcf3ef-a2b9-435b-b9e5-f32902a33b25.xml @@ -1,6 +1,6 @@ - + mdy 1||-9223372036854775808|c|G @@ -4256,147 +4256,147 @@ false Zulu pg_database_owner - bigint|0s 37369 1 1 6233 + bigint|0s littlesheep - bigint|0s 47483 1 1 10189 + bigint|0s postgres - bigint|0s 47473 1 1 10185 + bigint|0s postgres - bigint|0s 37339 1 1 6229 + bigint|0s littlesheep - bigint|0s 47423 1 1 10149 + bigint|0s postgres - bigint|0s 37313 1 1 6224 + bigint|0s littlesheep - bigint|0s 37474 1 1 6247 + bigint|0s littlesheep - bigint|0s 47413 1 1 10006 + bigint|0s postgres - bigint|0s 37324 1 1 6227 + bigint|0s littlesheep - bigint|0s 37526 1 1 6259 + bigint|0s littlesheep - bigint|0s 47120 1 1 8941 + bigint|0s postgres - bigint|0s 37459 1 1 6245 + bigint|0s littlesheep - bigint|0s 37509 1 1 6251 + bigint|0s littlesheep - bigint|0s 37489 1 1 6249 + bigint|0s littlesheep - bigint|0s 37562 1 1 6430 + bigint|0s littlesheep - bigint|0s 37551 1 1 6427 + bigint|0s littlesheep - bigint|0s 47321 1 1 9536 + bigint|0s postgres - bigint|0s 37403 1 1 6238 + bigint|0s littlesheep @@ -4508,66 +4508,66 @@ false Zulu littlesheep
- bigint|0s nextval('passport_account_contacts_id_seq'::regclass) 1 1 6233 + bigint|0s 37369 20 - timestamp with time zone|0s 2 6233 + timestamp with time zone|0s 1184 - timestamp with time zone|0s 3 6233 + timestamp with time zone|0s 1184 - timestamp with time zone|0s 4 6233 + timestamp with time zone|0s 1184 - smallint|0s 5 6233 + smallint|0s 21 - text|0s 6 6233 + text|0s 25 - boolean|0s 7 6233 + boolean|0s 16 - boolean|0s 8 6233 + boolean|0s 16 - timestamp with time zone|0s 9 6233 + timestamp with time zone|0s 1184 - bigint|0s 10 6233 + bigint|0s 20 @@ -4610,42 +4610,42 @@ false Zulu 37376 - bigint|0s nextval('passport_account_group_members_id_seq'::regclass) 1 1 10189 + bigint|0s 47483 20 - timestamp with time zone|0s 2 10189 + timestamp with time zone|0s 1184 - timestamp with time zone|0s 3 10189 + timestamp with time zone|0s 1184 - timestamp with time zone|0s 4 10189 + timestamp with time zone|0s 1184 - bigint|0s 5 10189 + bigint|0s 20 - bigint|0s 6 10189 + bigint|0s 20 @@ -4685,42 +4685,42 @@ false Zulu 47488 - bigint|0s nextval('passport_account_groups_id_seq'::regclass) 1 1 10185 + bigint|0s 47473 20 - timestamp with time zone|0s 2 10185 + timestamp with time zone|0s 1184 - timestamp with time zone|0s 3 10185 + timestamp with time zone|0s 1184 - timestamp with time zone|0s 4 10185 + timestamp with time zone|0s 1184 - text|0s 5 10185 + text|0s 25 - jsonb|0s 6 10185 + jsonb|0s 3802 @@ -4746,66 +4746,66 @@ false Zulu 47480 - bigint|0s nextval('passport_account_profiles_id_seq'::regclass) 1 1 6229 + bigint|0s 37339 20 - timestamp with time zone|0s 2 6229 + timestamp with time zone|0s 1184 - timestamp with time zone|0s 3 6229 + timestamp with time zone|0s 1184 - timestamp with time zone|0s 4 6229 + timestamp with time zone|0s 1184 - text|0s 5 6229 + text|0s 25 - text|0s 6 6229 + text|0s 25 - bigint|0s 7 6229 + bigint|0s 20 - timestamp with time zone|0s 8 6229 + timestamp with time zone|0s 1184 - bigint|0s 9 6229 + bigint|0s 20 - timestamp with time zone|0s 10 9548 + timestamp with time zone|0s 1184 @@ -4838,54 +4838,54 @@ false Zulu 37346 - bigint|0s nextval('passport_account_relationships_id_seq'::regclass) 1 1 10149 + bigint|0s 47423 20 - timestamp with time zone|0s 2 10149 + timestamp with time zone|0s 1184 - timestamp with time zone|0s 3 10149 + timestamp with time zone|0s 1184 - timestamp with time zone|0s 4 10149 + timestamp with time zone|0s 1184 - bigint|0s 5 10149 + bigint|0s 20 - bigint|0s 6 10149 + bigint|0s 20 - smallint|0s 7 10149 + smallint|0s 21 - jsonb|0s 8 10149 + jsonb|0s 3802 @@ -4925,84 +4925,84 @@ false Zulu 47430 - bigint|0s nextval('passport_accounts_id_seq'::regclass) 1 1 6224 + bigint|0s 37313 20 - timestamp with time zone|0s 2 6224 + timestamp with time zone|0s 1184 - timestamp with time zone|0s 3 6224 + timestamp with time zone|0s 1184 - timestamp with time zone|0s 4 6224 + timestamp with time zone|0s 1184 - text|0s 5 6224 + text|0s 25 - text|0s 6 6224 + text|0s 25 - text|0s 7 6224 + text|0s 25 - timestamp with time zone|0s 10 6224 + timestamp with time zone|0s 1184 - bigint|0s 11 6224 + bigint|0s 20 - jsonb|0s 12 7177 + jsonb|0s 3802 - bigint|0s 13 7431 + bigint|0s 20 - bigint|0s 14 7432 + bigint|0s 20 - timestamp with time zone|0s 15 10120 + timestamp with time zone|0s 1184 @@ -5038,66 +5038,66 @@ false Zulu 37320 - bigint|0s nextval('passport_action_events_id_seq'::regclass) 1 1 6247 + bigint|0s 37474 20 - timestamp with time zone|0s 2 6247 + timestamp with time zone|0s 1184 - timestamp with time zone|0s 3 6247 + timestamp with time zone|0s 1184 - timestamp with time zone|0s 4 6247 + timestamp with time zone|0s 1184 - text|0s 5 6247 + text|0s 25 - text|0s 6 6247 + text|0s 25 - text|0s 7 6247 + text|0s 25 - text|0s 8 6247 + text|0s 25 - text|0s 9 6247 + text|0s 25 - bigint|0s 10 6247 + bigint|0s 20 @@ -5130,60 +5130,60 @@ false Zulu 37481 - bigint|0s nextval('passport_audit_records_id_seq'::regclass) 1 1 10006 + bigint|0s 47413 20 - timestamp with time zone|0s 2 10006 + timestamp with time zone|0s 1184 - timestamp with time zone|0s 3 10006 + timestamp with time zone|0s 1184 - timestamp with time zone|0s 4 10006 + timestamp with time zone|0s 1184 - text|0s 5 10006 + text|0s 25 - jsonb|0s 6 10006 + jsonb|0s 3802 - text|0s 7 10006 + text|0s 25 - text|0s 8 10006 + text|0s 25 - bigint|0s 9 10006 + bigint|0s 20 @@ -5209,54 +5209,54 @@ false Zulu 47420 - bigint|0s nextval('passport_auth_factors_id_seq'::regclass) 1 1 6227 + bigint|0s 37324 20 - timestamp with time zone|0s 2 6227 + timestamp with time zone|0s 1184 - timestamp with time zone|0s 3 6227 + timestamp with time zone|0s 1184 - timestamp with time zone|0s 4 6227 + timestamp with time zone|0s 1184 - smallint|0s 5 6227 + smallint|0s 21 - text|0s 6 6227 + text|0s 25 - jsonb|0s 7 6227 + jsonb|0s 3802 - bigint|0s 8 6227 + bigint|0s 20 @@ -5289,120 +5289,120 @@ false Zulu 37331 - bigint|0s nextval('passport_auth_tickets_id_seq'::regclass) 1 1 6259 + bigint|0s 37526 20 - timestamp with time zone|0s 2 6259 + timestamp with time zone|0s 1184 - timestamp with time zone|0s 3 6259 + timestamp with time zone|0s 1184 - timestamp with time zone|0s 4 6259 + timestamp with time zone|0s 1184 - text|0s 5 6259 + text|0s 25 - text|0s 6 6259 + text|0s 25 - text|0s 7 6259 + text|0s 25 - boolean|0s 8 6259 + boolean|0s 16 - boolean|0s 9 6259 + boolean|0s 16 - jsonb|0s 10 6259 + jsonb|0s 3802 - jsonb|0s 11 6259 + jsonb|0s 3802 - text|0s 12 6259 + text|0s 25 - text|0s 13 6259 + text|0s 25 - text|0s 14 6259 + text|0s 25 - timestamp with time zone|0s 15 6259 + timestamp with time zone|0s 1184 - timestamp with time zone|0s 16 6259 + timestamp with time zone|0s 1184 - timestamp with time zone|0s 17 6259 + timestamp with time zone|0s 1184 - bigint|0s 18 6259 + bigint|0s 20 - bigint|0s 19 6259 + bigint|0s 20 @@ -5449,60 +5449,60 @@ false Zulu 37533 - bigint|0s nextval('passport_badges_id_seq'::regclass) 1 1 8941 + bigint|0s 47120 20 - timestamp with time zone|0s 2 8941 + timestamp with time zone|0s 1184 - timestamp with time zone|0s 3 8941 + timestamp with time zone|0s 1184 - timestamp with time zone|0s 4 8941 + timestamp with time zone|0s 1184 - text|0s 5 8941 + text|0s 25 - text|0s 6 8941 + text|0s 25 - text|0s 7 8941 + text|0s 25 - bigint|0s 8 8941 + bigint|0s 20 - jsonb|0s 9 8945 + jsonb|0s 3802 @@ -5535,60 +5535,60 @@ false Zulu 47127 - bigint|0s nextval('passport_magic_tokens_id_seq'::regclass) 1 1 6245 + bigint|0s 37459 20 - timestamp with time zone|0s 2 6245 + timestamp with time zone|0s 1184 - timestamp with time zone|0s 3 6245 + timestamp with time zone|0s 1184 - timestamp with time zone|0s 4 6245 + timestamp with time zone|0s 1184 - text|0s 5 6245 + text|0s 25 - smallint|0s 6 6245 + smallint|0s 21 - bigint|0s 7 6245 + bigint|0s 20 - timestamp with time zone|0s 8 6245 + timestamp with time zone|0s 1184 - bigint|0s 9 9525 + bigint|0s 20 @@ -5621,60 +5621,60 @@ false Zulu 37466 - bigint|0s nextval('passport_notification_subscribers_id_seq'::regclass) 1 1 6251 + bigint|0s 37509 20 - timestamp with time zone|0s 2 6251 + timestamp with time zone|0s 1184 - timestamp with time zone|0s 3 6251 + timestamp with time zone|0s 1184 - timestamp with time zone|0s 4 6251 + timestamp with time zone|0s 1184 - text|0s 5 6251 + text|0s 25 - text|0s 6 6251 + text|0s 25 - text|0s 7 6251 + text|0s 25 - bigint|0s 8 6251 + bigint|0s 20 - text|0s 9 7011 + text|0s 25 @@ -5717,126 +5717,126 @@ false Zulu 37516 - bigint|0s nextval('passport_notifications_id_seq'::regclass) 1 1 6249 + bigint|0s 37489 20 - timestamp with time zone|0s 2 6249 + timestamp with time zone|0s 1184 - timestamp with time zone|0s 3 6249 + timestamp with time zone|0s 1184 - timestamp with time zone|0s 4 6249 + timestamp with time zone|0s 1184 - text|0s 5 6249 + text|0s 25 - text|0s 6 6249 + text|0s 25 - jsonb|0s 7 6249 + jsonb|0s 3802 - boolean|0s 8 6249 + boolean|0s 16 - timestamp with time zone|0s 9 6249 + timestamp with time zone|0s 1184 - bigint|0s 10 6249 + bigint|0s 20 - bigint|0s 11 6249 + bigint|0s 20 - text|0s 12 8943 + text|0s 25 - jsonb|0s 13 8944 + jsonb|0s 3802 - text|0s 14 10152 + text|0s 25 - text|0s 15 10153 + text|0s 25 - text|0s 16 10154 + text|0s 25 - text|0s 17 10155 + text|0s 25 - bigint|0s 18 10156 + bigint|0s 20 - text|0s 19 10187 + text|0s 25 - text|0s 20 10188 + text|0s 25 @@ -5876,48 +5876,48 @@ false Zulu 37496 - bigint|0s nextval('passport_realm_members_id_seq'::regclass) 1 1 6430 + bigint|0s 37562 20 - timestamp with time zone|0s 2 6430 + timestamp with time zone|0s 1184 - timestamp with time zone|0s 3 6430 + timestamp with time zone|0s 1184 - timestamp with time zone|0s 4 6430 + timestamp with time zone|0s 1184 - bigint|0s 5 6430 + bigint|0s 20 - bigint|0s 6 6430 + bigint|0s 20 - bigint|0s 7 6430 + bigint|0s 20 @@ -5971,66 +5971,66 @@ false Zulu 37567 - bigint|0s nextval('passport_realms_id_seq'::regclass) 1 1 6427 + bigint|0s 37551 20 - timestamp with time zone|0s 2 6427 + timestamp with time zone|0s 1184 - timestamp with time zone|0s 3 6427 + timestamp with time zone|0s 1184 - timestamp with time zone|0s 4 6427 + timestamp with time zone|0s 1184 - text|0s 5 6427 + text|0s 25 - text|0s 6 6427 + text|0s 25 - text|0s 7 6427 + text|0s 25 - boolean|0s 8 6427 + boolean|0s 16 - boolean|0s 9 6427 + boolean|0s 16 - bigint|0s 10 6427 + bigint|0s 20 @@ -6066,72 +6066,72 @@ false Zulu 37558 - bigint|0s nextval('passport_statuses_id_seq'::regclass) 1 1 9536 + bigint|0s 47321 20 - timestamp with time zone|0s 2 9536 + timestamp with time zone|0s 1184 - timestamp with time zone|0s 3 9536 + timestamp with time zone|0s 1184 - timestamp with time zone|0s 4 9536 + timestamp with time zone|0s 1184 - text|0s 5 9536 + text|0s 25 - text|0s 6 9536 + text|0s 25 - smallint|0s 7 9536 + smallint|0s 21 - boolean|0s 8 9536 + boolean|0s 16 - boolean|0s 9 9536 + boolean|0s 16 - bigint|0s 10 9536 + bigint|0s 20 - timestamp with time zone|0s 11 9549 + timestamp with time zone|0s 1184 @@ -6164,78 +6164,78 @@ false Zulu 47328 - bigint|0s nextval('passport_third_clients_id_seq'::regclass) 1 1 6238 + bigint|0s 37403 20 - timestamp with time zone|0s 2 6238 + timestamp with time zone|0s 1184 - timestamp with time zone|0s 3 6238 + timestamp with time zone|0s 1184 - timestamp with time zone|0s 4 6238 + timestamp with time zone|0s 1184 - text|0s 5 6238 + text|0s 25 - text|0s 6 6238 + text|0s 25 - text|0s 7 6238 + text|0s 25 - text|0s 8 6238 + text|0s 25 - jsonb|0s 9 6238 + jsonb|0s 3802 - jsonb|0s 10 6238 + jsonb|0s 3802 - boolean|0s 11 6238 + boolean|0s 16 - bigint|0s 12 6238 + bigint|0s 20 diff --git a/.idea/workspace.xml b/.idea/workspace.xml index f21eba0..936825d 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -4,7 +4,13 @@
- + + + + + + + - { - "keyToString": { - "DefaultGoTemplateProperty": "Go File", - "Go Build.Backend.executor": "Run", - "Go 构建.Backend.executor": "Run", - "RunOnceActivity.ShowReadmeOnStart": "true", - "RunOnceActivity.go.formatter.settings.were.checked": "true", - "RunOnceActivity.go.migrated.go.modules.settings": "true", - "RunOnceActivity.go.modules.automatic.dependencies.download": "true", - "RunOnceActivity.go.modules.go.list.on.any.changes.was.set": "true", - "git-widget-placeholder": "master", - "go.import.settings.migrated": "true", - "go.sdk.automatically.set": "true", - "last_opened_file_path": "/Users/littlesheep/Documents/Projects/Hydrogen/Passport/web/src/components/admin", - "node.js.detected.package.eslint": "true", - "node.js.selected.package.eslint": "(autodetect)", - "nodejs_package_manager_path": "npm", - "run.code.analysis.last.selected.profile": "pProject Default", - "settings.editor.selected.configurable": "preferences.pluginManager", - "ts.external.directory.path": "/Users/littlesheep/Documents/Projects/Hydrogen/Passport/web/node_modules/typescript/lib", - "vue.rearranger.settings.migration": "true" + +}]]> @@ -109,8 +115,8 @@ - @@ -150,7 +156,6 @@ - @@ -175,7 +180,8 @@ - true diff --git a/Dockerfile b/Dockerfile index 048ec55..af19f58 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,23 +1,14 @@ # Building Backend FROM golang:alpine as passport-server -RUN apk add nodejs npm - WORKDIR /source COPY . . - -WORKDIR /source/web -RUN npm install -RUN npm run build - -WORKDIR /source RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -buildvcs -o /dist ./pkg/main.go # Runtime FROM golang:alpine COPY --from=passport-server /dist /passport/server -COPY --from=passport-server /source/web/dist /passport/web EXPOSE 8444 diff --git a/go.mod b/go.mod index 51ed962..27d686b 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.21.6 toolchain go1.22.1 require ( - git.solsynth.dev/hydrogen/dealer v0.0.0-20240721055146-d74cdddbaf49 + git.solsynth.dev/hydrogen/dealer v0.0.0-20240801060523-8cf0feb09a27 github.com/go-playground/validator/v10 v10.17.0 github.com/gofiber/fiber/v2 v2.52.4 github.com/golang-jwt/jwt/v5 v5.2.0 diff --git a/go.sum b/go.sum index 53ebc75..483be55 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,7 @@ git.solsynth.dev/hydrogen/dealer v0.0.0-20240721055146-d74cdddbaf49 h1:DMmCBcnCO0qcER/p4EQ04CmWleb4YI3Br6QK5F8Q628= git.solsynth.dev/hydrogen/dealer v0.0.0-20240721055146-d74cdddbaf49/go.mod h1:IZd94qZZIj+MO9EqjGDqnAD9nWurlNPyhVPKemAY5lw= +git.solsynth.dev/hydrogen/dealer v0.0.0-20240801060523-8cf0feb09a27 h1:KQzeOI2ou240SXiL1hxMYDvZpYKtCFblCGDusFyGyBY= +git.solsynth.dev/hydrogen/dealer v0.0.0-20240801060523-8cf0feb09a27/go.mod h1:IZd94qZZIj+MO9EqjGDqnAD9nWurlNPyhVPKemAY5lw= github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8= github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= diff --git a/pkg/internal/server/api/well_known_api.go b/pkg/internal/server/api/well_known_api.go index df62e03..1c95935 100644 --- a/pkg/internal/server/api/well_known_api.go +++ b/pkg/internal/server/api/well_known_api.go @@ -12,7 +12,7 @@ func getOidcConfiguration(c *fiber.Ctx) error { basepath := fmt.Sprintf("https://%s", domain) return c.JSON(fiber.Map{ - "issuer": basepath, + "issuer": viper.GetString("security.issuer"), "authorization_endpoint": fmt.Sprintf("%s/authorize", basepath), "token_endpoint": fmt.Sprintf("%s/api/auth/token", basepath), "userinfo_endpoint": fmt.Sprintf("%s/api/users/me", basepath), diff --git a/pkg/internal/services/jwt.go b/pkg/internal/services/jwt.go index 9391ef0..00365e1 100644 --- a/pkg/internal/services/jwt.go +++ b/pkg/internal/services/jwt.go @@ -20,7 +20,7 @@ type PayloadClaims struct { Nick string `json:"preferred_username,omitempty"` Email string `json:"email,omitempty"` - // Additonal Stuff + // Additional Stuff AuthorizedParties string `json:"azp,omitempty"` Nonce string `json:"nonce,omitempty"` Type string `json:"typ"` @@ -44,7 +44,7 @@ func EncodeJwt(id string, typ, sub, sed string, nonce *string, aud []string, exp RegisteredClaims: jwt.RegisteredClaims{ Subject: sub, Audience: aud, - Issuer: fmt.Sprintf("https://%s", viper.GetString("domain")), + Issuer: viper.GetString("security.issuer"), ExpiresAt: jwt.NewNumericDate(exp), NotBefore: jwt.NewNumericDate(time.Now()), IssuedAt: jwt.NewNumericDate(time.Now()), diff --git a/pkg/internal/services/ticket.go b/pkg/internal/services/ticket.go index 188e145..681320e 100644 --- a/pkg/internal/services/ticket.go +++ b/pkg/internal/services/ticket.go @@ -11,7 +11,7 @@ import ( "github.com/samber/lo" ) -const InternalTokenAudience = "passport" +const InternalTokenAudience = "solar-network" func DetectRisk(user models.Account, ip, ua string) bool { var clue int64 diff --git a/settings.toml b/settings.toml index bca1738..ace5b52 100644 --- a/settings.toml +++ b/settings.toml @@ -1,12 +1,12 @@ id = "passport01" name = "Solarpass" -frontend_app = "web/dist" - bind = "0.0.0.0:8444" grpc_bind = "0.0.0.0:7444" domain = "localhost" +domain = "id.solsynth.dev" + content_endpoint = "https://usercontent.solsynth.dev" default_user_group = 1 @@ -21,6 +21,7 @@ print_routes = false addr = "127.0.0.1:7442" [security] +issuer = "https://solsynth.dev" cookie_domain = "localhost" cookie_samesite = "Lax" access_token_duration = 300 diff --git a/web/.eslintrc.cjs b/web/.eslintrc.cjs deleted file mode 100755 index 11cf3e4..0000000 --- a/web/.eslintrc.cjs +++ /dev/null @@ -1,18 +0,0 @@ -/* eslint-env node */ -require("@rushstack/eslint-patch/modern-module-resolution") - -module.exports = { - root: true, - extends: [ - "plugin:vue/vue3-essential", - "eslint:recommended", - "@vue/eslint-config-typescript", - "@vue/eslint-config-prettier/skip-formatting", - ], - parserOptions: { - ecmaVersion: "latest", - }, - rules: { - "vue/multi-word-component-names": "off", - } -} diff --git a/web/.gitignore b/web/.gitignore deleted file mode 100755 index 3740343..0000000 --- a/web/.gitignore +++ /dev/null @@ -1,32 +0,0 @@ -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* -pnpm-debug.log* -lerna-debug.log* - -node_modules -.DS_Store -dist -dist-ssr -coverage -*.local - -/cypress/videos/ -/cypress/screenshots/ - -# Editor directories and files -.vscode/* -!.vscode/extensions.json -.idea -*.suo -*.ntvs* -*.njsproj -*.sln -*.sw? - -*.tsbuildinfo - -.vite \ No newline at end of file diff --git a/web/.prettierrc.json b/web/.prettierrc.json deleted file mode 100755 index 6404b10..0000000 --- a/web/.prettierrc.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "$schema": "https://json.schemastore.org/prettierrc", - "semi": false, - "tabWidth": 2, - "singleQuote": false, - "printWidth": 120, - "trailingComma": "all" -} diff --git a/web/.vite/deps/_metadata.json b/web/.vite/deps/_metadata.json deleted file mode 100644 index d806bde..0000000 --- a/web/.vite/deps/_metadata.json +++ /dev/null @@ -1,85 +0,0 @@ -{ - "hash": "8b6d0833", - "configHash": "9db2f33b", - "lockfileHash": "f7feab31", - "browserHash": "0decaeb8", - "optimized": { - "vue": { - "src": "../../node_modules/vue/dist/vue.runtime.esm-bundler.js", - "file": "vue.js", - "fileHash": "1913939b", - "needsInterop": false - }, - "pinia": { - "src": "../../node_modules/pinia/dist/pinia.mjs", - "file": "pinia.js", - "fileHash": "4c101c90", - "needsInterop": false - }, - "vuetify": { - "src": "../../node_modules/vuetify/lib/framework.mjs", - "file": "vuetify.js", - "fileHash": "3ab2542c", - "needsInterop": false - }, - "vuetify/blueprints": { - "src": "../../node_modules/vuetify/lib/blueprints/index.mjs", - "file": "vuetify_blueprints.js", - "fileHash": "b34fe63c", - "needsInterop": false - }, - "vuetify/components": { - "src": "../../node_modules/vuetify/lib/components/index.mjs", - "file": "vuetify_components.js", - "fileHash": "42f8a374", - "needsInterop": false - }, - "vuetify/labs/components": { - "src": "../../node_modules/vuetify/lib/labs/components.mjs", - "file": "vuetify_labs_components.js", - "fileHash": "a46a672a", - "needsInterop": false - }, - "vuetify/directives": { - "src": "../../node_modules/vuetify/lib/directives/index.mjs", - "file": "vuetify_directives.js", - "fileHash": "66c34130", - "needsInterop": false - }, - "vue-router": { - "src": "../../node_modules/vue-router/dist/vue-router.mjs", - "file": "vue-router.js", - "fileHash": "56488480", - "needsInterop": false - } - }, - "chunks": { - "chunk-WKTZ3I3B": { - "file": "chunk-WKTZ3I3B.js" - }, - "chunk-XJKCW2PU": { - "file": "chunk-XJKCW2PU.js" - }, - "chunk-VFMM6PD2": { - "file": "chunk-VFMM6PD2.js" - }, - "chunk-XREPMAG4": { - "file": "chunk-XREPMAG4.js" - }, - "chunk-ZUZRGUJJ": { - "file": "chunk-ZUZRGUJJ.js" - }, - "chunk-V6X3YB3T": { - "file": "chunk-V6X3YB3T.js" - }, - "chunk-6CN2GOSH": { - "file": "chunk-6CN2GOSH.js" - }, - "chunk-AYVSL3LM": { - "file": "chunk-AYVSL3LM.js" - }, - "chunk-Q5PGHB6G": { - "file": "chunk-Q5PGHB6G.js" - } - } -} \ No newline at end of file diff --git a/web/.vite/deps/package.json b/web/.vite/deps/package.json deleted file mode 100644 index 3dbc1ca..0000000 --- a/web/.vite/deps/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "type": "module" -} diff --git a/web/README.md b/web/README.md deleted file mode 100755 index bdb10ae..0000000 --- a/web/README.md +++ /dev/null @@ -1,39 +0,0 @@ -# views - -This template should help get you started developing with Vue 3 in Vite. - -## Recommended IDE Setup - -[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur). - -## Type Support for `.vue` Imports in TS - -TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) to make the TypeScript language service aware of `.vue` types. - -## Customize configuration - -See [Vite Configuration Reference](https://vitejs.dev/config/). - -## Project Setup - -```sh -npm install -``` - -### Compile and Hot-Reload for Development - -```sh -npm run dev -``` - -### Type-Check, Compile and Minify for Production - -```sh -npm run build -``` - -### Lint with [ESLint](https://eslint.org/) - -```sh -npm run lint -``` diff --git a/web/bun.lockb b/web/bun.lockb deleted file mode 100755 index 29dcf9b..0000000 Binary files a/web/bun.lockb and /dev/null differ diff --git a/web/env.d.ts b/web/env.d.ts deleted file mode 100755 index 11f02fe..0000000 --- a/web/env.d.ts +++ /dev/null @@ -1 +0,0 @@ -/// diff --git a/web/index.html b/web/index.html deleted file mode 100755 index c61a7b4..0000000 --- a/web/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - Solarpass - - -
- - - diff --git a/web/package.json b/web/package.json deleted file mode 100755 index 886e629..0000000 --- a/web/package.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "passport-web", - "version": "1.0.0", - "type": "module", - "scripts": { - "dev": "vite", - "build": "run-p type-check \"build-only {@}\" --", - "preview": "vite preview", - "build-only": "vite build", - "type-check": "vue-tsc --build --force", - "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore", - "format": "prettier --write src/" - }, - "dependencies": { - "@fontsource/roboto": "^5.0.13", - "@mdi/font": "^7.4.47", - "@unocss/reset": "^0.61.0", - "dompurify": "^3.1.5", - "marked": "^12.0.2", - "pinia": "^2.1.7", - "universal-cookie": "^7.1.4", - "unocss": "^0.61.0", - "vue": "^3.4.30", - "vue-router": "^4.4.0", - "vuetify": "^3.6.10" - }, - "devDependencies": { - "@rushstack/eslint-patch": "^1.10.3", - "@tsconfig/node20": "^20.1.4", - "@types/dompurify": "^3.0.5", - "@types/node": "^20.14.8", - "@vitejs/plugin-vue": "^5.0.5", - "@vitejs/plugin-vue-jsx": "^3.1.0", - "@vue/eslint-config-prettier": "^8.0.0", - "@vue/eslint-config-typescript": "^12.0.0", - "@vue/tsconfig": "^0.5.1", - "eslint": "^8.57.0", - "eslint-plugin-vue": "^9.26.0", - "npm-run-all2": "^6.2.0", - "prettier": "^3.3.2", - "typescript": "^5.4.5", - "vite": "^5.3.1", - "vue-tsc": "^2.0.22" - } -} diff --git a/web/public/favicon.png b/web/public/favicon.png deleted file mode 100755 index 2ca2d07..0000000 Binary files a/web/public/favicon.png and /dev/null differ diff --git a/web/src/assets/utils.css b/web/src/assets/utils.css deleted file mode 100755 index fd368b0..0000000 --- a/web/src/assets/utils.css +++ /dev/null @@ -1,14 +0,0 @@ -html, -body, -#app, -.v-application { - font-family: "Roboto Sans", ui-sans-serif, system-ui, sans-serif; -} - -.no-scrollbar { - scrollbar-width: none; -} - -.no-scrollbar::-webkit-scrollbar { - width: 0; -} diff --git a/web/src/components/Copyright.vue b/web/src/components/Copyright.vue deleted file mode 100755 index 873ab83..0000000 --- a/web/src/components/Copyright.vue +++ /dev/null @@ -1,6 +0,0 @@ - diff --git a/web/src/components/GoUseSolian.vue b/web/src/components/GoUseSolian.vue deleted file mode 100644 index 834cfc9..0000000 --- a/web/src/components/GoUseSolian.vue +++ /dev/null @@ -1,19 +0,0 @@ - \ No newline at end of file diff --git a/web/src/components/NotificationList.vue b/web/src/components/NotificationList.vue deleted file mode 100755 index 9dbaf39..0000000 --- a/web/src/components/NotificationList.vue +++ /dev/null @@ -1,79 +0,0 @@ - - - diff --git a/web/src/components/UserMenu.vue b/web/src/components/UserMenu.vue deleted file mode 100755 index 4fe1467..0000000 --- a/web/src/components/UserMenu.vue +++ /dev/null @@ -1,53 +0,0 @@ - - - diff --git a/web/src/components/admin/UserAssignPermsPanel.vue b/web/src/components/admin/UserAssignPermsPanel.vue deleted file mode 100644 index 8218150..0000000 --- a/web/src/components/admin/UserAssignPermsPanel.vue +++ /dev/null @@ -1,165 +0,0 @@ - - - diff --git a/web/src/components/admin/UserDetailPanel.vue b/web/src/components/admin/UserDetailPanel.vue deleted file mode 100644 index 41afbb0..0000000 --- a/web/src/components/admin/UserDetailPanel.vue +++ /dev/null @@ -1,47 +0,0 @@ - - - - - \ No newline at end of file diff --git a/web/src/components/admin/UserFactorPanel.vue b/web/src/components/admin/UserFactorPanel.vue deleted file mode 100644 index 3eebcb3..0000000 --- a/web/src/components/admin/UserFactorPanel.vue +++ /dev/null @@ -1,74 +0,0 @@ - - - \ No newline at end of file diff --git a/web/src/components/auth/Authenticate.vue b/web/src/components/auth/Authenticate.vue deleted file mode 100755 index 6056427..0000000 --- a/web/src/components/auth/Authenticate.vue +++ /dev/null @@ -1,65 +0,0 @@ - - - diff --git a/web/src/components/auth/AuthenticateCompleted.vue b/web/src/components/auth/AuthenticateCompleted.vue deleted file mode 100644 index 2f71ddc..0000000 --- a/web/src/components/auth/AuthenticateCompleted.vue +++ /dev/null @@ -1,67 +0,0 @@ - - - \ No newline at end of file diff --git a/web/src/components/auth/CallbackNotify.vue b/web/src/components/auth/CallbackNotify.vue deleted file mode 100755 index d63c6d6..0000000 --- a/web/src/components/auth/CallbackNotify.vue +++ /dev/null @@ -1,16 +0,0 @@ - - - diff --git a/web/src/components/auth/FactorApplicator.vue b/web/src/components/auth/FactorApplicator.vue deleted file mode 100755 index 26155f0..0000000 --- a/web/src/components/auth/FactorApplicator.vue +++ /dev/null @@ -1,93 +0,0 @@ - - - diff --git a/web/src/components/auth/FactorPicker.vue b/web/src/components/auth/FactorPicker.vue deleted file mode 100755 index dde94fd..0000000 --- a/web/src/components/auth/FactorPicker.vue +++ /dev/null @@ -1,88 +0,0 @@ - - - diff --git a/web/src/components/navigation/AppBar.vue b/web/src/components/navigation/AppBar.vue deleted file mode 100644 index fdfb806..0000000 --- a/web/src/components/navigation/AppBar.vue +++ /dev/null @@ -1,52 +0,0 @@ - - - - - diff --git a/web/src/index.vue b/web/src/index.vue deleted file mode 100755 index 4f21c35..0000000 --- a/web/src/index.vue +++ /dev/null @@ -1,5 +0,0 @@ - diff --git a/web/src/layouts/administrator.vue b/web/src/layouts/administrator.vue deleted file mode 100644 index 4d3c5d6..0000000 --- a/web/src/layouts/administrator.vue +++ /dev/null @@ -1,30 +0,0 @@ - - - - - diff --git a/web/src/layouts/master.vue b/web/src/layouts/master.vue deleted file mode 100755 index fe42bd5..0000000 --- a/web/src/layouts/master.vue +++ /dev/null @@ -1,22 +0,0 @@ - - - - - diff --git a/web/src/layouts/user-center.vue b/web/src/layouts/user-center.vue deleted file mode 100755 index 5a2ee15..0000000 --- a/web/src/layouts/user-center.vue +++ /dev/null @@ -1,30 +0,0 @@ - - - - - \ No newline at end of file diff --git a/web/src/main.ts b/web/src/main.ts deleted file mode 100755 index b3665d3..0000000 --- a/web/src/main.ts +++ /dev/null @@ -1,54 +0,0 @@ -import "virtual:uno.css" - -import "./assets/utils.css" - -import { createApp } from "vue" -import { createPinia } from "pinia" - -import "vuetify/styles" -import { createVuetify } from "vuetify" -import { md3 } from "vuetify/blueprints" -import * as components from "vuetify/components" -import * as labsComponents from "vuetify/labs/components" -import * as directives from "vuetify/directives" - -import "@mdi/font/css/materialdesignicons.min.css" -import "@fontsource/roboto/latin.css" -import "@unocss/reset/tailwind.css" - -import index from "./index.vue" -import router from "./router" - -const app = createApp(index) - -app.use( - createVuetify({ - directives, - components: { - ...components, - ...labsComponents, - }, - blueprint: md3, - theme: { - defaultTheme: "original", - themes: { - original: { - colors: { - primary: "#4a5099", - secondary: "#2196f3", - accent: "#009688", - error: "#f44336", - warning: "#ff9800", - info: "#03a9f4", - success: "#4caf50", - }, - }, - }, - }, - }), -) - -app.use(createPinia()) -app.use(router) - -app.mount("#app") diff --git a/web/src/router/index.ts b/web/src/router/index.ts deleted file mode 100755 index 9aea2a8..0000000 --- a/web/src/router/index.ts +++ /dev/null @@ -1,116 +0,0 @@ -import { createRouter, createWebHistory } from "vue-router" -import { useUserinfo } from "@/stores/userinfo" -import UserCenterLayout from "@/layouts/user-center.vue" -import AdministratorLayout from "@/layouts/administrator.vue" - -const router = createRouter({ - history: createWebHistory(import.meta.env.BASE_URL), - routes: [ - { - path: "/", - redirect: { name: "dashboard" }, - meta: { public: true }, - }, - { - path: "/users", - component: UserCenterLayout, - children: [ - { - path: "/me", - name: "dashboard", - component: () => import("@/views/dashboard.vue"), - meta: { title: "Your account" }, - }, - { - path: "/me/personalize", - name: "personalize", - component: () => import("@/views/personalize.vue"), - meta: { title: "Your personality" }, - }, - { - path: "/me/security", - name: "security", - component: () => import("@/views/security.vue"), - meta: { title: "Your security" }, - }, - ], - }, - { - path: "/", - children: [ - { - path: "/sign-in", - alias: ["/mfa"], - name: "auth.sign-in", - component: () => import("@/views/auth/sign-in.vue"), - meta: { public: true, title: "Sign in" }, - }, - { - path: "/sign-up", - name: "auth.sign-up", - component: () => import("@/views/auth/sign-up.vue"), - meta: { public: true, title: "Sign up" }, - }, - { - path: "/authorize", - name: "oauth.authorize", - component: () => import("@/views/auth/authorize.vue"), - }, - ], - }, - { - path: "/flow", - children: [ - { - path: "confirm", - name: "callback.confirm", - component: () => import("@/views/flow/confirm.vue"), - meta: { public: true, title: "Confirm registration" }, - }, - { - path: "password-reset", - name: "callback.password-reset", - component: () => import("@/views/flow/password-reset.vue"), - meta: { public: true, title: "Reset password" }, - }, - ], - }, - { - path: "/admin", - component: AdministratorLayout, - children: [ - { - path: "", - name: "admin.dashboard", - component: () => import("@/views/admin/dashboard.vue"), - }, - { - path: "users", - name: "admin.users", - component: () => import("@/views/admin/users.vue"), - }, - ] - } - ], -}) - -router.beforeEach(async (to, from, next) => { - const id = useUserinfo() - if (!id.isReady) { - await id.readProfiles() - } - - if (to.meta.title) { - document.title = `Solarpass | ${to.meta.title}` - } else { - document.title = "Solarpass" - } - - if (!to.meta.public && !id.userinfo.isLoggedIn) { - next({ name: "auth.sign-in", query: { redirect_uri: to.fullPath } }) - } else { - next() - } -}) - -export default router diff --git a/web/src/scripts/request.ts b/web/src/scripts/request.ts deleted file mode 100755 index 3384bc4..0000000 --- a/web/src/scripts/request.ts +++ /dev/null @@ -1,3 +0,0 @@ -export async function request(input: string, init?: RequestInit) { - return await fetch(input, init) -} diff --git a/web/src/stores/notifications.ts b/web/src/stores/notifications.ts deleted file mode 100755 index 0a5ffa4..0000000 --- a/web/src/stores/notifications.ts +++ /dev/null @@ -1,67 +0,0 @@ -import { defineStore } from "pinia" -import { ref } from "vue" -import { checkLoggedIn, getAtk } from "@/stores/userinfo" -import { request } from "@/scripts/request" - -export const useNotifications = defineStore("notifications", () => { - let socket: WebSocket - - const loading = ref(false) - - const notifications = ref([]) - const total = ref(0) - - async function list() { - loading.value = true - const res = await request( - "/api/notifications?" + - new URLSearchParams({ - take: (25).toString(), - offset: (0).toString(), - }), - { - headers: { Authorization: `Bearer ${getAtk()}` }, - }, - ) - if (res.status === 200) { - const data = await res.json() - notifications.value = data["data"] - total.value = data["count"] - } - loading.value = false - } - - function remove(idx: number) { - notifications.value.splice(idx, 1) - total.value-- - } - - async function connect() { - if (!(checkLoggedIn())) return - - const protocol = location.protocol.replace("http", "ws") - const uri = `${protocol}//${window.location.host}/api/ws` - - socket = new WebSocket(uri + `?tk=${getAtk() as string}`) - - socket.addEventListener("open", (event) => { - console.log("[NOTIFICATIONS] The listen websocket has been established... ", event.type) - }) - socket.addEventListener("close", (event) => { - console.warn("[NOTIFICATIONS] The listen websocket is disconnected... ", event.reason, event.code) - }) - socket.addEventListener("message", (event) => { - const data = JSON.parse(event.data) - if (data["w"] == "notifications.new") { - notifications.value.push(data["p"]) - total.value++ - } - }) - } - - function disconnect() { - socket.close() - } - - return { loading, notifications, total, list, remove, connect, disconnect } -}) \ No newline at end of file diff --git a/web/src/stores/userinfo.ts b/web/src/stores/userinfo.ts deleted file mode 100755 index 048b03f..0000000 --- a/web/src/stores/userinfo.ts +++ /dev/null @@ -1,54 +0,0 @@ -import Cookie from "universal-cookie" -import { defineStore } from "pinia" -import { ref } from "vue" -import { request } from "@/scripts/request" - -export interface Userinfo { - isLoggedIn: boolean - displayName: string - data: any -} - -export const defaultUserinfo: Userinfo = { - isLoggedIn: false, - displayName: "Citizen", - data: null, -} - -export function getAtk(): string { - return new Cookie().get("__hydrogen_atk") -} - -export function checkLoggedIn(): boolean { - return new Cookie().get("__hydrogen_rtk") -} - -export const useUserinfo = defineStore("userinfo", () => { - const userinfo = ref(defaultUserinfo) - const isReady = ref(false) - - async function readProfiles() { - if (!checkLoggedIn()) { - isReady.value = true - } - - const res = await request("/api/users/me", { - headers: { Authorization: `Bearer ${getAtk()}` }, - }) - - if (res.status !== 200) { - return - } - - const data = await res.json() - - isReady.value = true - userinfo.value = { - isLoggedIn: true, - displayName: data["nick"], - data: data, - } - } - - return { userinfo, isReady, readProfiles } -}) diff --git a/web/src/views/admin/dashboard.vue b/web/src/views/admin/dashboard.vue deleted file mode 100644 index e3411a4..0000000 --- a/web/src/views/admin/dashboard.vue +++ /dev/null @@ -1,51 +0,0 @@ - - \ No newline at end of file diff --git a/web/src/views/admin/users.vue b/web/src/views/admin/users.vue deleted file mode 100644 index eb027ef..0000000 --- a/web/src/views/admin/users.vue +++ /dev/null @@ -1,142 +0,0 @@ - - - diff --git a/web/src/views/auth/authorize.vue b/web/src/views/auth/authorize.vue deleted file mode 100755 index ddbbd1e..0000000 --- a/web/src/views/auth/authorize.vue +++ /dev/null @@ -1,189 +0,0 @@ - - - - - diff --git a/web/src/views/auth/claims.ts b/web/src/views/auth/claims.ts deleted file mode 100755 index 6ca79e5..0000000 --- a/web/src/views/auth/claims.ts +++ /dev/null @@ -1,13 +0,0 @@ -export interface ClaimType { - icon: string - name: string - description: string -} - -export const claims: { [id: string]: ClaimType } = { - openid: { - icon: "mdi-identifier", - name: "Open Identity", - description: "Allow them to read your personal information.", - }, -} diff --git a/web/src/views/auth/sign-in.vue b/web/src/views/auth/sign-in.vue deleted file mode 100755 index 998e4f0..0000000 --- a/web/src/views/auth/sign-in.vue +++ /dev/null @@ -1,85 +0,0 @@ - - - - - diff --git a/web/src/views/auth/sign-up.vue b/web/src/views/auth/sign-up.vue deleted file mode 100755 index a206dc3..0000000 --- a/web/src/views/auth/sign-up.vue +++ /dev/null @@ -1,162 +0,0 @@ - - - - - diff --git a/web/src/views/dashboard.vue b/web/src/views/dashboard.vue deleted file mode 100755 index c5e0644..0000000 --- a/web/src/views/dashboard.vue +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - diff --git a/web/src/views/flow/confirm.vue b/web/src/views/flow/confirm.vue deleted file mode 100755 index 055c5c4..0000000 --- a/web/src/views/flow/confirm.vue +++ /dev/null @@ -1,104 +0,0 @@ - - - - - diff --git a/web/src/views/flow/password-reset.vue b/web/src/views/flow/password-reset.vue deleted file mode 100755 index ae4f3e4..0000000 --- a/web/src/views/flow/password-reset.vue +++ /dev/null @@ -1,122 +0,0 @@ - - - - - diff --git a/web/src/views/personalize.vue b/web/src/views/personalize.vue deleted file mode 100755 index 56d7f76..0000000 --- a/web/src/views/personalize.vue +++ /dev/null @@ -1,157 +0,0 @@ - - - - - diff --git a/web/src/views/security.vue b/web/src/views/security.vue deleted file mode 100755 index 3787987..0000000 --- a/web/src/views/security.vue +++ /dev/null @@ -1,197 +0,0 @@ - - - - - diff --git a/web/tsconfig.app.json b/web/tsconfig.app.json deleted file mode 100755 index e14c754..0000000 --- a/web/tsconfig.app.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "extends": "@vue/tsconfig/tsconfig.dom.json", - "include": ["env.d.ts", "src/**/*", "src/**/*.vue"], - "exclude": ["src/**/__tests__/*"], - "compilerOptions": { - "composite": true, - "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo", - - "baseUrl": ".", - "paths": { - "@/*": ["./src/*"] - } - } -} diff --git a/web/tsconfig.json b/web/tsconfig.json deleted file mode 100755 index 66b5e57..0000000 --- a/web/tsconfig.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "files": [], - "references": [ - { - "path": "./tsconfig.node.json" - }, - { - "path": "./tsconfig.app.json" - } - ] -} diff --git a/web/tsconfig.node.json b/web/tsconfig.node.json deleted file mode 100755 index 2c669ee..0000000 --- a/web/tsconfig.node.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "extends": "@tsconfig/node20/tsconfig.json", - "include": ["vite.config.*", "vitest.config.*", "cypress.config.*", "nightwatch.conf.*", "playwright.config.*"], - "compilerOptions": { - "composite": true, - "noEmit": true, - "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo", - - "module": "ESNext", - "moduleResolution": "Bundler", - "types": ["node"] - } -} diff --git a/web/uno.config.ts b/web/uno.config.ts deleted file mode 100755 index 2d323f7..0000000 --- a/web/uno.config.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { defineConfig, presetAttributify, presetTypography, presetUno } from "unocss" - -export default defineConfig({ - presets: [presetAttributify(), presetTypography(), presetUno({ preflight: false })], -}) diff --git a/web/vite.config.ts b/web/vite.config.ts deleted file mode 100755 index 41b2b40..0000000 --- a/web/vite.config.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { fileURLToPath, URL } from "node:url"; - -import { defineConfig } from "vite"; -import vue from "@vitejs/plugin-vue"; -import vueJsx from "@vitejs/plugin-vue-jsx"; -import unocss from "unocss/vite"; - -// https://vitejs.dev/config/ -export default defineConfig({ - plugins: [vue(), vueJsx(), unocss()], - resolve: { - alias: { - "@": fileURLToPath(new URL("./src", import.meta.url)) - } - }, - server: { - proxy: { - "/api/ws": { - target: "ws://localhost:8444", - ws: true - }, - - "/api": "http://localhost:8444", - "/.well-known": "http://localhost:8444" - } - } -});