feat: dashboard billing (#193)

* feat: move plans into sharable json

* remove unused code

* update pnpm lock

* update plans.json

* implement early adopter pricing

* docs: update meta title and description

* Finished the UI for upgrading plans

* Updated the pricing plans

* Updated the cards ui

* use relative import

* improve styling of upgrade plan card

* styling improvements, lemonsqueezy setup

* trigger lemonsqueezy payment and add webhook

* update pnpm lock

* add logout route

* feat: complete billing functionality

* generate lock file

* make crypto false on browser

* feat: adding upgrade prompts to org

* chore: add upgrade icon to upload video

* feat: add upgrade prompt to certificate and settings

* feat: implement onboarding setup page (#229)

* working on the onboarding setup

* working on the onboarding page

* Almost done with the onboarding UI

* finished the UI of the onBoarding setup

* finished the UI of the onBoarding setup

* Implementing the functions to carryout the logic of updating the UI onmount if a user has carried out a certain step or not

* Implementing the functions to carryout the logic of updating the UI onmount if a user has carried out a certain step or not

* making some chnages

* finished the onBoarding task

* updated some logic

* Removed the uneeded svg from the static folder

* fixed isCoursePublished not returning a boolean

* improved the setup link protection

* chore: make menuItems reactive

* improve formatting

* format supabase queries

---------

Co-authored-by: Rotimi Best <best@classroomio.com>

* revamp setup

* improve the upgrade experience

* migration

* feat: add lemonsqueezy customer portal

---------

Co-authored-by: emmanuel <chifez1@gmail.com>
This commit is contained in:
Rotimi Best
2024-04-07 06:08:34 +01:00
committed by GitHub
co-authored by emmanuel
parent 136e057954
commit fcd0bcc656
105 changed files with 1743 additions and 463 deletions
-36
View File
@@ -34,28 +34,10 @@ INSERT INTO "auth"."identities" ("provider_id", "user_id", "identity_data", "pro
-- Data for Name: sessions; Type: TABLE DATA; Schema: auth; Owner: supabase_auth_admin
--
INSERT INTO "auth"."sessions" ("id", "user_id", "created_at", "updated_at", "factor_id", "aal", "not_after") VALUES
('9c1cd604-6be9-4e29-98df-eae1ca10b84b', '7ac00503-8519-43c8-a5ea-b79aeca900b1', '2023-12-16 14:04:38.318145+00', '2023-12-16 14:04:38.318145+00', NULL, 'aal1', NULL),
('e8e00899-d977-4aff-ba2a-5db2e0b5a5fc', '7ac00503-8519-43c8-a5ea-b79aeca900b1', '2023-12-18 07:27:12.925094+00', '2023-12-18 07:27:12.925094+00', NULL, 'aal1', NULL),
('ef166ee2-ae51-487c-9173-bb2e81d0a5a3', '0c256e75-aa40-4f62-8d30-0217ca1c60d9', '2023-12-18 17:08:57.422438+00', '2023-12-18 17:08:57.422438+00', NULL, 'aal1', NULL),
('a9f27ecd-7f94-4bfa-be34-ba5405bac3c2', '0c256e75-aa40-4f62-8d30-0217ca1c60d9', '2023-12-18 17:10:06.331876+00', '2023-12-18 17:10:06.331876+00', NULL, 'aal1', NULL),
('a332f016-e8aa-47f0-a75e-88a1d7ba0093', '7ac00503-8519-43c8-a5ea-b79aeca900b1', '2023-12-19 18:21:06.601317+00', '2023-12-19 18:21:06.601317+00', NULL, 'aal1', NULL),
('b477694b-8834-4ca8-8aa8-7131c0ccc97f', '0c256e75-aa40-4f62-8d30-0217ca1c60d9', '2023-12-19 18:22:55.359116+00', '2023-12-19 18:22:55.359116+00', NULL, 'aal1', NULL);
--
-- Data for Name: mfa_amr_claims; Type: TABLE DATA; Schema: auth; Owner: supabase_auth_admin
--
INSERT INTO "auth"."mfa_amr_claims" ("session_id", "created_at", "updated_at", "authentication_method", "id") VALUES
('9c1cd604-6be9-4e29-98df-eae1ca10b84b', '2023-12-16 14:04:38.326467+00', '2023-12-16 14:04:38.326467+00', 'password', '5cae357e-4e64-4378-8c06-9f0f6c04c949'),
('e8e00899-d977-4aff-ba2a-5db2e0b5a5fc', '2023-12-18 07:27:12.960775+00', '2023-12-18 07:27:12.960775+00', 'password', 'dbd1a18c-6823-4ca0-867e-332baa980f88'),
('ef166ee2-ae51-487c-9173-bb2e81d0a5a3', '2023-12-18 17:08:57.431423+00', '2023-12-18 17:08:57.431423+00', 'password', '79f20fbc-4428-49b2-a1d7-e79c80c01908'),
('a9f27ecd-7f94-4bfa-be34-ba5405bac3c2', '2023-12-18 17:10:06.336665+00', '2023-12-18 17:10:06.336665+00', 'password', '1a55c794-56c2-4ebb-81dd-51fe5aa31c3d'),
('a332f016-e8aa-47f0-a75e-88a1d7ba0093', '2023-12-19 18:21:06.628295+00', '2023-12-19 18:21:06.628295+00', 'password', 'c8adcf10-d3ac-4f63-949c-917de90d5047'),
('b477694b-8834-4ca8-8aa8-7131c0ccc97f', '2023-12-19 18:22:55.364346+00', '2023-12-19 18:22:55.364346+00', 'password', 'b2252824-3d0e-4f00-b166-31e4b7317247');
--
-- Data for Name: mfa_factors; Type: TABLE DATA; Schema: auth; Owner: supabase_auth_admin
--
@@ -72,24 +54,6 @@ INSERT INTO "auth"."mfa_amr_claims" ("session_id", "created_at", "updated_at", "
-- Data for Name: refresh_tokens; Type: TABLE DATA; Schema: auth; Owner: supabase_auth_admin
--
INSERT INTO "auth"."refresh_tokens" ("instance_id", "id", "token", "user_id", "revoked", "created_at", "updated_at", "parent", "session_id") VALUES
('00000000-0000-0000-0000-000000000000', 69, 'LB9oL5Z2Q7Mg-vsW5kNjCQ', '7ac00503-8519-43c8-a5ea-b79aeca900b1', false, '2023-12-16 14:04:38.320519+00', '2023-12-16 14:04:38.320519+00', NULL, '9c1cd604-6be9-4e29-98df-eae1ca10b84b'),
('00000000-0000-0000-0000-000000000000', 70, '2DUv5tujvKjUGkX6M9rDhw', '7ac00503-8519-43c8-a5ea-b79aeca900b1', true, '2023-12-18 07:27:12.938363+00', '2023-12-18 16:08:48.28529+00', NULL, 'e8e00899-d977-4aff-ba2a-5db2e0b5a5fc'),
('00000000-0000-0000-0000-000000000000', 71, 'fYnKEVnVc5Cf1zk__OndZQ', '7ac00503-8519-43c8-a5ea-b79aeca900b1', true, '2023-12-18 16:08:48.289763+00', '2023-12-18 17:07:27.19134+00', '2DUv5tujvKjUGkX6M9rDhw', 'e8e00899-d977-4aff-ba2a-5db2e0b5a5fc'),
('00000000-0000-0000-0000-000000000000', 73, 'j0pHvBB6tNVAL6bth-Qlbw', '0c256e75-aa40-4f62-8d30-0217ca1c60d9', false, '2023-12-18 17:08:57.428366+00', '2023-12-18 17:08:57.428366+00', NULL, 'ef166ee2-ae51-487c-9173-bb2e81d0a5a3'),
('00000000-0000-0000-0000-000000000000', 72, 'wXmtWozOlxtx2DbCgwJ_gQ', '7ac00503-8519-43c8-a5ea-b79aeca900b1', true, '2023-12-18 17:07:27.193554+00', '2023-12-18 18:09:13.521543+00', 'fYnKEVnVc5Cf1zk__OndZQ', 'e8e00899-d977-4aff-ba2a-5db2e0b5a5fc'),
('00000000-0000-0000-0000-000000000000', 108, 'Wpa844Wq5DzYJChQZ-cpVA', '7ac00503-8519-43c8-a5ea-b79aeca900b1', false, '2023-12-19 18:21:06.612042+00', '2023-12-19 18:21:06.612042+00', NULL, 'a332f016-e8aa-47f0-a75e-88a1d7ba0093'),
('00000000-0000-0000-0000-000000000000', 109, 'u9O720ZfnjDlZfEmMpXAdQ', '0c256e75-aa40-4f62-8d30-0217ca1c60d9', false, '2023-12-19 18:22:55.360924+00', '2023-12-19 18:22:55.360924+00', NULL, 'b477694b-8834-4ca8-8aa8-7131c0ccc97f'),
('00000000-0000-0000-0000-000000000000', 74, 'U92MVeZW-lzMTyR3P3z-Jw', '0c256e75-aa40-4f62-8d30-0217ca1c60d9', true, '2023-12-18 17:10:06.332675+00', '2023-12-20 21:03:07.760753+00', NULL, 'a9f27ecd-7f94-4bfa-be34-ba5405bac3c2'),
('00000000-0000-0000-0000-000000000000', 75, 'Ei9IxN6lMJYCaZTcpa9k9A', '7ac00503-8519-43c8-a5ea-b79aeca900b1', true, '2023-12-18 18:09:13.522362+00', '2023-12-20 21:03:07.994582+00', 'wXmtWozOlxtx2DbCgwJ_gQ', 'e8e00899-d977-4aff-ba2a-5db2e0b5a5fc'),
('00000000-0000-0000-0000-000000000000', 111, 'UFi64I37otDTujQJH_SyLw', '7ac00503-8519-43c8-a5ea-b79aeca900b1', true, '2023-12-20 21:03:07.994928+00', '2024-01-22 18:40:36.465046+00', 'Ei9IxN6lMJYCaZTcpa9k9A', 'e8e00899-d977-4aff-ba2a-5db2e0b5a5fc'),
('00000000-0000-0000-0000-000000000000', 110, 'urM3ighvEecObLTvdG0qOA', '0c256e75-aa40-4f62-8d30-0217ca1c60d9', true, '2023-12-20 21:03:07.765846+00', '2024-01-22 18:44:00.751021+00', 'U92MVeZW-lzMTyR3P3z-Jw', 'a9f27ecd-7f94-4bfa-be34-ba5405bac3c2'),
('00000000-0000-0000-0000-000000000000', 113, 'YiBKQiVmhr2qdhb-hp4BSA', '0c256e75-aa40-4f62-8d30-0217ca1c60d9', true, '2024-01-22 18:44:00.768516+00', '2024-01-22 19:48:40.908832+00', 'urM3ighvEecObLTvdG0qOA', 'a9f27ecd-7f94-4bfa-be34-ba5405bac3c2'),
('00000000-0000-0000-0000-000000000000', 114, 'gk8gaphdyJwYZGJG5QtcLw', '0c256e75-aa40-4f62-8d30-0217ca1c60d9', false, '2024-01-22 19:48:40.91058+00', '2024-01-22 19:48:40.91058+00', 'YiBKQiVmhr2qdhb-hp4BSA', 'a9f27ecd-7f94-4bfa-be34-ba5405bac3c2'),
('00000000-0000-0000-0000-000000000000', 112, 'oarfsEblC4qdlGocQDiyPg', '7ac00503-8519-43c8-a5ea-b79aeca900b1', true, '2024-01-22 18:40:36.470644+00', '2024-01-22 19:48:43.849219+00', 'UFi64I37otDTujQJH_SyLw', 'e8e00899-d977-4aff-ba2a-5db2e0b5a5fc'),
('00000000-0000-0000-0000-000000000000', 115, '8XFK7KAiMd6NqIofNTLvbg', '7ac00503-8519-43c8-a5ea-b79aeca900b1', false, '2024-01-22 19:48:43.850147+00', '2024-01-22 19:48:43.850147+00', 'oarfsEblC4qdlGocQDiyPg', 'e8e00899-d977-4aff-ba2a-5db2e0b5a5fc');
--
-- Data for Name: sso_providers; Type: TABLE DATA; Schema: auth; Owner: supabase_auth_admin
--