Skip to content

Commit

Permalink
refactory(workspace): renamed some packages for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
mostafakamar2308 committed Jan 29, 2025
1 parent 66849eb commit 982fa2f
Show file tree
Hide file tree
Showing 717 changed files with 4,914 additions and 4,611 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- "packages/auth/**"
- "packages/models/**"
- "packages/atlas/**"
- "packages/sol/**"
- "packages/utils/**"
- "packages/types/**"

workflow_dispatch:
Expand Down
60 changes: 30 additions & 30 deletions .github/workflows/staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ on:
paths:
- "apps/blog/**"
- "apps/dashboard/**"
- "apps/nebula/**"
- "apps/nova/**"
- "packages/luna/**"
- "apps/landing/**"
- "apps/web/**"
- "packages/ui/**"
- "packages/atlas/**"
- "packages/headless/**"
- "packages/sol/**"
- "packages/utils/**"
- "packages/types/**"

# Allows you to run this workflow manually from the Actions tab
Expand Down Expand Up @@ -46,31 +46,31 @@ jobs:
run: pnpm install
- name: Build packages
run: pnpm build:pkgs
# Nova Deployment
- name: Pull Nova from Vercel
run: pnpm vercel:ci pull "nova" "apps/nova/" --token=${{ secrets.VERCEL_TOKEN }}
- name: Setup staging environment variables for Nova
run: cp apps/nova/.env.staging apps/nova/.env
- name: Build Nova using Vercel
run: pnpm build:nova:vercel
- name: Deploy Nova to Vercel
run: pnpm deploy:nova:vercel --token=${{ secrets.VERCEL_TOKEN }}
# Luna Deployment
- name: Pull Luna from Vercel
run: pnpm vercel:ci pull "luna" "packages/luna/" --token=${{ secrets.VERCEL_TOKEN }}
- name: Setup staging environment variables for Nova
run: cp packages/luna/.env.staging packages/luna/.env
- name: Build Luna using Vercel
run: pnpm build:luna:vercel
- name: Deploy Luna to Vercel
run: pnpm deploy:luna:vercel --token=${{ secrets.VERCEL_TOKEN }}
# Nebula Deployment
- name: Pull Nebula from Vercel
run: pnpm vercel:ci pull "nebula" "apps/nebula/" --token=${{ secrets.VERCEL_TOKEN }}
- name: Build Nebula using Vercel
run: pnpm build:nebula:vercel
- name: Deploy Nebula to Vercel
run: pnpm deploy:nebula:vercel --token=${{ secrets.VERCEL_TOKEN }}
# Web platform Deployment
- name: Pull Web platform from Vercel
run: pnpm vercel:ci pull "web" "apps/web/" --token=${{ secrets.VERCEL_TOKEN }}
- name: Setup staging environment variables for Web platform
run: cp apps/web/.env.staging apps/web/.env
- name: Build Web platform using Vercel
run: pnpm build:web:vercel
- name: Deploy Web platform to Vercel
run: pnpm deploy:web:vercel --token=${{ secrets.VERCEL_TOKEN }}
# UI package Deployment
- name: Pull UI from Vercel
run: pnpm vercel:ci pull "ui" "packages/ui/" --token=${{ secrets.VERCEL_TOKEN }}
- name: Setup staging environment variables for web
run: cp packages/ui/.env.staging packages/ui/.env
- name: Build UI using Vercel
run: pnpm build:ui:vercel
- name: Deploy UI to Vercel
run: pnpm deploy:ui:vercel --token=${{ secrets.VERCEL_TOKEN }}
# Landing Deployment
- name: Pull Landing from Vercel
run: pnpm vercel:ci pull "landing" "apps/landing/" --token=${{ secrets.VERCEL_TOKEN }}
- name: Build Landing using Vercel
run: pnpm build:landing:vercel
- name: Deploy Landing to Vercel
run: pnpm deploy:landing:vercel --token=${{ secrets.VERCEL_TOKEN }}
# Dashboard Deployment
- name: Pull Dashboard from Vercel
run: pnpm vercel:ci pull "dashboard" "apps/dashboard/" --token=${{ secrets.VERCEL_TOKEN }}
Expand All @@ -82,7 +82,7 @@ jobs:
run: pnpm deploy:dashboard:vercel --token=${{ secrets.VERCEL_TOKEN }}
# Display deployment URLs as GitHub comment and Telegram message
- name: Pull latest deployment urls from Vercel
run: pnpm vercel:ci urls "nova,luna,nebula,dashboard" --token=${{ secrets.VERCEL_TOKEN }}
run: pnpm vercel:ci urls "web,ui,landing,dashboard" --token=${{ secrets.VERCEL_TOKEN }}
- name: Send latest deployment urls to Telegram
run: pnpm telegram send-vercel-urls -p ${{ github.event.number }} -b ${{ github.head_ref }}
- name: Make GitHub comment with Vercel URLs
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@
- `packages/auth` - Server authentication and authorization module.
- `packages/email` - Email templates.
- `packages/headless` - React components logic that can be used in the web and mobile.
- `packages/luna` - Components library.
- `packages/UI` - Components library.
- `packages/models` - Database models.
- `packages/sol`- Sharable pure javascript logic that can be use on web, server, and mobile.
- `packages/utils`- Sharable pure javascript logic that can be use on web, server, and mobile.
- `apps/*`
- `apps/blog` - LiteSpace blog.
- `apps/dashboard` - LiteSpace admin dashboard.
- `apps/mobile` - LiteSpace mobile app.
- `apps/nebula` - LiteSpace landing page.
- `apps/nova` - LiteSpace main web platform.
- `apps/landing` - LiteSpace landing page.
- `apps/web` - LiteSpace main web platform.

# Project Setup

Expand Down
4 changes: 2 additions & 2 deletions apps/dashboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"dependencies": {
"@litespace/atlas": "workspace:^",
"@litespace/headless": "workspace:^",
"@litespace/luna": "workspace:^",
"@litespace/sol": "workspace:^",
"@litespace/ui": "workspace:^",
"@litespace/utils": "workspace:^",
"@litespace/types": "workspace:^",
"@reduxjs/toolkit": "^2.2.5",
"@tanstack/react-query": "^5.56.2",
Expand Down
2 changes: 1 addition & 1 deletion apps/dashboard/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { createBrowserRouter, RouterProvider } from "react-router-dom";
import { Route } from "@/lib/route";
import Root from "@/pages/Root";
import { ErrorPage } from "@litespace/luna/ErrorPage";
import { ErrorPage } from "@litespace/ui/ErrorPage";
import Invoices from "@/pages/Invoices";
import Media from "@/pages/Media";
import Login from "@/pages/Login";
Expand Down
4 changes: 2 additions & 2 deletions apps/dashboard/src/components/Interviews/Content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import {
useFindInterviews,
type UseFindInterviewsPayload,
} from "@litespace/headless/interviews";
import { ActionsMenu, MenuAction } from "@litespace/luna/ActionsMenu";
import { useFormatMessage } from "@litespace/luna/hooks/intl";
import { ActionsMenu, MenuAction } from "@litespace/ui/ActionsMenu";
import { useFormatMessage } from "@litespace/ui/hooks/intl";
import { IFilter, IInterview } from "@litespace/types";
import { MixerHorizontalIcon } from "@radix-ui/react-icons";
import { interviewStatusMap } from "@/components/utils/interview";
Expand Down
12 changes: 6 additions & 6 deletions apps/dashboard/src/components/Interviews/List.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import Error from "@/components/common/Error";
import { Table } from "@/components/common/Table";
import UserPopover from "@/components/common/UserPopover";
import { Loading } from "@litespace/luna/Loading";
import { useFormatMessage } from "@litespace/luna/hooks/intl";
import { Loading } from "@litespace/ui/Loading";
import { useFormatMessage } from "@litespace/ui/hooks/intl";
import { Element, IInterview, IUser, Void } from "@litespace/types";
import { createColumnHelper } from "@tanstack/react-table";
import { dayjs } from "@/lib/dayjs";
import DateField from "@/components/common/DateField";
import React, { useCallback, useMemo, useState } from "react";
import { interviewStatusMap } from "@/components/utils/interview";
import { ActionsMenu } from "@litespace/luna/ActionsMenu";
import { Alert, AlertType } from "@litespace/luna/Alert";
import { ActionsMenu } from "@litespace/ui/ActionsMenu";
import { Alert, AlertType } from "@litespace/ui/Alert";
import { useUpdateInterview } from "@litespace/headless/interviews";
import { useToast } from "@litespace/luna/Toast";
import { Dialog } from "@litespace/luna/Dialog";
import { useToast } from "@litespace/ui/Toast";
import { Dialog } from "@litespace/ui/Dialog";
import { UsePaginateResult } from "@/types/query";
import { useUserContext } from "@litespace/headless/context/user";

Expand Down
6 changes: 3 additions & 3 deletions apps/dashboard/src/components/Invoices/Content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import Error from "@/components/common/Error";
import PageTitle from "@/components/common/PageTitle";
import List from "@/components/Invoices/List";
import { isEqual } from "lodash";
import { Loading } from "@litespace/luna/Loading";
import { useFormatMessage } from "@litespace/luna/hooks/intl";
import { Loading } from "@litespace/ui/Loading";
import { useFormatMessage } from "@litespace/ui/hooks/intl";
import { MixerHorizontalIcon } from "@radix-ui/react-icons";
import { withdrawMethodsIntlMap } from "@/components/utils/invoice";
import { ActionsMenu, MenuAction } from "@litespace/luna/ActionsMenu";
import { ActionsMenu, MenuAction } from "@litespace/ui/ActionsMenu";
import { IFilter, IInvoice, IWithdrawMethod } from "@litespace/types";
import React, { useCallback, useMemo, useState } from "react";
import {
Expand Down
14 changes: 7 additions & 7 deletions apps/dashboard/src/components/Invoices/Invoice.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { Card } from "@litespace/luna/Card";
import { LocalId } from "@litespace/luna/locales";
import { useInvoiceStatus } from "@litespace/luna/hooks/invoice";
import { useWithdrawMethod } from "@litespace/luna/hooks/withdraw";
import { useFormatMessage } from "@litespace/luna/hooks/intl";
import * as Invoices from "@litespace/luna/Invoices";
import { MenuAction } from "@litespace/luna/ActionsMenu";
import { Card } from "@litespace/ui/Card";
import { LocalId } from "@litespace/ui/locales";
import { useInvoiceStatus } from "@litespace/ui/hooks/invoice";
import { useWithdrawMethod } from "@litespace/ui/hooks/withdraw";
import { useFormatMessage } from "@litespace/ui/hooks/intl";
import * as Invoices from "@litespace/ui/Invoices";
import { MenuAction } from "@litespace/ui/ActionsMenu";
import { IInvoice } from "@litespace/types";
import React, { useCallback, useMemo, useState } from "react";
import Process from "@/components/Invoices/Process";
Expand Down
8 changes: 4 additions & 4 deletions apps/dashboard/src/components/Invoices/List.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { IInvoice, IWithdrawMethod, Paginated, Void } from "@litespace/types";
import React, { useCallback, useState } from "react";
import { Table } from "@/components/common/Table";
import { useFormatMessage } from "@litespace/luna/hooks/intl";
import { formatCurrency } from "@litespace/luna/utils";
import { ActionsMenu } from "@litespace/luna/ActionsMenu";
import { useFormatMessage } from "@litespace/ui/hooks/intl";
import { formatCurrency } from "@litespace/ui/utils";
import { ActionsMenu } from "@litespace/ui/ActionsMenu";
import { createColumnHelper } from "@tanstack/react-table";
import { useMemo } from "react";
import DateField from "@/components/common/DateField";
Expand All @@ -15,7 +15,7 @@ import {
invoiceStatusIntlMap,
withdrawMethodsIntlMap,
} from "@/components/utils/invoice";
import { Typography } from "@litespace/luna/Typography";
import { Typography } from "@litespace/ui/Typography";
import ImageField from "@/components/common/ImageField";

const List: React.FC<{
Expand Down
12 changes: 6 additions & 6 deletions apps/dashboard/src/components/Invoices/Process.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ import {
ButtonSize,
ButtonType,
ButtonVariant,
} from "@litespace/luna/Button";
import { Dialog } from "@litespace/luna/Dialog";
import { Field, Form, Controller, Label } from "@litespace/luna/Form";
import { useToast } from "@litespace/luna/Toast";
import { useFormatMessage } from "@litespace/luna/hooks/intl";
} from "@litespace/ui/Button";
import { Dialog } from "@litespace/ui/Dialog";
import { Field, Form, Controller, Label } from "@litespace/ui/Form";
import { useToast } from "@litespace/ui/Toast";
import { useFormatMessage } from "@litespace/ui/hooks/intl";
import { IInvoice } from "@litespace/types";
import React, { useCallback, useMemo, useRef, useState } from "react";
import { useForm } from "react-hook-form";
import { Action } from "@/components/Invoices/type";
import { useMutation } from "@tanstack/react-query";
import { Typography } from "@litespace/luna/Typography";
import { Typography } from "@litespace/ui/Typography";
import { X } from "react-feather";
import { useAtlas } from "@litespace/headless/atlas";

Expand Down
4 changes: 2 additions & 2 deletions apps/dashboard/src/components/Lessons/Content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import List from "@/components/Lessons/List";
import Error from "@/components/common/Error";
import PageTitle from "@/components/common/PageTitle";
import { useFindLessons } from "@litespace/headless/lessons";
import { ActionsMenu, MenuAction } from "@litespace/luna/ActionsMenu";
import { useFormatMessage } from "@litespace/luna/hooks/intl";
import { ActionsMenu, MenuAction } from "@litespace/ui/ActionsMenu";
import { useFormatMessage } from "@litespace/ui/hooks/intl";
import { ILesson } from "@litespace/types";
import { MixerHorizontalIcon } from "@radix-ui/react-icons";
import { useMemo, useState } from "react";
Expand Down
10 changes: 5 additions & 5 deletions apps/dashboard/src/components/Lessons/List.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { useMemo } from "react";
import { useFormatMessage } from "@litespace/luna/hooks/intl";
import { useFormatMessage } from "@litespace/ui/hooks/intl";
import { createColumnHelper } from "@tanstack/react-table";
import { ILesson, Void } from "@litespace/types";
import { Table } from "@/components/common/Table";
import { UseQueryResult } from "@tanstack/react-query";
import { formatCurrency } from "@litespace/luna/utils";
import { Duration } from "@litespace/sol/duration";
import { Loading } from "@litespace/luna/Loading";
import { formatCurrency } from "@litespace/ui/utils";
import { Duration } from "@litespace/utils/duration";
import { Loading } from "@litespace/ui/Loading";
import Error from "@/components/common/Error";
import { price } from "@litespace/sol/value";
import { price } from "@litespace/utils/value";
import UserPopover from "@/components/common/UserPopover";
import DateField from "@/components/common/DateField";
import { dayjs } from "@/lib/dayjs";
Expand Down
2 changes: 1 addition & 1 deletion apps/dashboard/src/components/Media/List.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Timeline, TimelineItem } from "@litespace/luna/Timeline";
import { Timeline, TimelineItem } from "@litespace/ui/Timeline";
import { ITutor } from "@litespace/types";
import React, { useMemo } from "react";
import { Hash } from "react-feather";
Expand Down
8 changes: 4 additions & 4 deletions apps/dashboard/src/components/Media/Media.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import React, { useCallback, useMemo, useRef } from "react";
import { MediaType } from "@/components/Media/types";
import { Avatar } from "@litespace/luna/Avatar";
import { Avatar } from "@litespace/ui/Avatar";
import {
Button,
ButtonSize,
ButtonType,
ButtonVariant,
} from "@litespace/luna/Button";
import { VideoPlayer } from "@litespace/luna/VideoPlayer";
import { useFormatMessage } from "@litespace/luna/hooks/intl";
} from "@litespace/ui/Button";
import { VideoPlayer } from "@litespace/ui/VideoPlayer";
import { useFormatMessage } from "@litespace/ui/hooks/intl";
import { Upload, X } from "react-feather";
import cn from "classnames";

Expand Down
8 changes: 4 additions & 4 deletions apps/dashboard/src/components/Media/Tutor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import {
ButtonType,
ButtonSize,
ButtonVariant,
} from "@litespace/luna/Button";
import { Card } from "@litespace/luna/Card";
import { useToast } from "@litespace/luna/Toast";
import { useFormatMessage } from "@litespace/luna/hooks/intl";
} from "@litespace/ui/Button";
import { Card } from "@litespace/ui/Card";
import { useToast } from "@litespace/ui/Toast";
import { useFormatMessage } from "@litespace/ui/hooks/intl";
import { ITutor, IUser } from "@litespace/types";
import React, { useCallback, useState } from "react";
import { AtSign, User } from "react-feather";
Expand Down
10 changes: 5 additions & 5 deletions apps/dashboard/src/components/Plans/List.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import DateField from "@/components/common/DateField";
import PlanForm from "@/components/Plans/PlanForm";
import Price from "@/components/Plans/Price";
import { Table } from "@/components/common/Table";
import { ActionsMenu } from "@litespace/luna/ActionsMenu";
import { formatMinutes } from "@litespace/luna/utils";
import { Loading } from "@litespace/luna/Loading";
import { useToast } from "@litespace/luna/Toast";
import { useFormatMessage } from "@litespace/luna/hooks/intl";
import { ActionsMenu } from "@litespace/ui/ActionsMenu";
import { formatMinutes } from "@litespace/ui/utils";
import { Loading } from "@litespace/ui/Loading";
import { useToast } from "@litespace/ui/Toast";
import { useFormatMessage } from "@litespace/ui/hooks/intl";

import { IPlan, Void } from "@litespace/types";
import { UseQueryResult } from "@tanstack/react-query";
Expand Down
18 changes: 9 additions & 9 deletions apps/dashboard/src/components/Plans/PlanForm.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import { useCreatePlan, useUpdatePlan } from "@litespace/headless/plans";
import { formatCurrency } from "@litespace/luna/utils";
import { Button, ButtonSize } from "@litespace/luna/Button";
import { Controller, Field, Form, Label } from "@litespace/luna/Form";
import { formatCurrency } from "@litespace/ui/utils";
import { Button, ButtonSize } from "@litespace/ui/Button";
import { Controller, Field, Form, Label } from "@litespace/ui/Form";
import {
useValidateDiscount,
useValidatePlanAlias,
useValidatePlanWeeklyMinutes,
useValidatePrice,
} from "@litespace/luna/hooks/validation";
import { useFormatMessage } from "@litespace/luna/hooks/intl";
import { useToast } from "@litespace/luna/Toast";
import { Dialog } from "@litespace/luna/Dialog";
import { Duration } from "@litespace/sol/duration";
import { percentage, price } from "@litespace/sol/value";
} from "@litespace/ui/hooks/validation";
import { useFormatMessage } from "@litespace/ui/hooks/intl";
import { useToast } from "@litespace/ui/Toast";
import { Dialog } from "@litespace/ui/Dialog";
import { Duration } from "@litespace/utils/duration";
import { percentage, price } from "@litespace/utils/value";
import { IPlan, Void } from "@litespace/types";
import React, { useCallback } from "react";
import { useForm } from "react-hook-form";
Expand Down
4 changes: 2 additions & 2 deletions apps/dashboard/src/components/Plans/Price.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { formatCurrency, formatPercentage } from "@litespace/luna/utils";
import { percentage, price as scaler } from "@litespace/sol/value";
import { formatCurrency, formatPercentage } from "@litespace/ui/utils";
import { percentage, price as scaler } from "@litespace/utils/value";
import React from "react";

const Price: React.FC<{ price: number; discount: number }> = ({
Expand Down
4 changes: 2 additions & 2 deletions apps/dashboard/src/components/ServerStats/Content.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Loading } from "@litespace/luna/Loading";
import { Loading } from "@litespace/ui/Loading";
import { Server } from "@litespace/types";
import { isEmpty } from "lodash";
import React, { useMemo } from "react";
import Chart from "@/components/ServerStats/Chart";
import { formatNumber, formatPercentage } from "@litespace/luna/utils";
import { formatNumber, formatPercentage } from "@litespace/ui/utils";

const Content: React.FC<{ stats: Server.Stats[] }> = ({ stats }) => {
const memoryData = useMemo(
Expand Down
Loading

0 comments on commit 982fa2f

Please sign in to comment.