Skip to content

Commit

Permalink
refactor(root): Rename from web.novu.co to dashboard.novu.co (#5876)
Browse files Browse the repository at this point in the history
* refactor(env): update URLs to use dashboard subdomain

* chore(netlify): reorder redirects in netlify.toml

* refactor(onboarding): remove unused imports
  • Loading branch information
rifont authored Jul 2, 2024
1 parent add9d7d commit a451c8b
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 18 deletions.
6 changes: 3 additions & 3 deletions apps/api/src/.env.development
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
NODE_ENV=dev
PORT=3000
API_ROOT_URL=https://dev.api.novu.co
FRONT_BASE_URL=https://dev.web.novu.co
FRONT_BASE_URL=https://dev.dashboard.novu.co
GLOBAL_CONTEXT_PATH=
API_CONTEXT_PATH=
DISABLE_USER_REGISTRATION=false

NEST_STARTER_MAIL=support@novu.co
CLIENT_SUCCESS_AUTH_REDIRECT=https://dev.web.novu.co/auth/login
CLIENT_SUCCESS_AUTH_REDIRECT=https://dev.dashboard.novu.co/auth/login

REDIS_PORT=6379
REDIS_HOST=localhost
Expand Down Expand Up @@ -43,7 +43,7 @@ NEW_RELIC_APP_NAME="[DEV] - api"
NEW_RELIC_APPLICATION_LOGGING_FORWARDING_ENABLED=true
LOGGING_LEVEL=info

VERCEL_REDIRECT_URI=https://dev.web.novu.co/auth/login
VERCEL_REDIRECT_URI=https://dev.dashboard.novu.co/auth/login
VERCEL_BASE_URL=https://api.vercel.com

FF_IS_DISTRIBUTED_LOCK_LOGGING_ENABLED=false
Expand Down
4 changes: 2 additions & 2 deletions apps/api/src/.env.production
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
NODE_ENV=production
PORT=3000
API_ROOT_URL=https://api.novu.co
FRONT_BASE_URL=https://web.novu.co
FRONT_BASE_URL=https://dashboard.novu.co
GLOBAL_CONTEXT_PATH=
API_CONTEXT_PATH=
DISABLE_USER_REGISTRATION=false
Expand Down Expand Up @@ -30,7 +30,7 @@ NEW_RELIC_ENABLED=true
NEW_RELIC_APPLICATION_LOGGING_FORWARDING_ENABLED=true
LOGGING_LEVEL=info

VERCEL_REDIRECT_URI=https://web.novu.co/auth/login
VERCEL_REDIRECT_URI=https://dashboard.novu.co/auth/login
VERCEL_BASE_URL=https://api.vercel.com

FF_IS_DISTRIBUTED_LOCK_LOGGING_ENABLED=false
Expand Down
2 changes: 1 addition & 1 deletion apps/api/src/config/env-validator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ if (process.env.NODE_ENV !== 'local' && process.env.NODE_ENV !== 'test') {
default: '',
});
validators.VERCEL_REDIRECT_URI = url({
default: 'https://web.novu.co/auth/login',
default: 'https://dashboard.novu.co/auth/login',
});
validators.VERCEL_BASE_URL = url({
default: 'https://api.vercel.com',
Expand Down
19 changes: 19 additions & 0 deletions apps/web/netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,29 @@
[context.deploy-preview]
command = "cd apps/web && pnpm run envsetup && cd ../../ && pnpm run build:web --skip-nx-cache"

[[redirects]]
from = "https://dev.web.novu.co/*"
to = "https://dev.dashboard.novu.co/:splat"
status = 301
force = true

[[redirects]]
from = "https://eu.web.novu.co/*"
to = "https://eu.dashboard.novu.co/:splat"
status = 301
force = true

[[redirects]]
from = "https://web.novu.co/*"
to = "https://dashboard.novu.co/:splat"
status = 301
force = true

[[redirects]]
from = "/*"
to = "/index.html"
status = 200

[[headers]]
for = "/*"
[headers.values]
Expand Down
6 changes: 0 additions & 6 deletions apps/web/src/pages/studio-onboarding/preview.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
/* eslint-disable max-len */
import { Prism } from '@mantine/prism';
import { Tabs } from '@novu/design-system';
import { IconCode, IconVisibility } from '@novu/novui/icons';
import { css } from '@novu/novui/css';
import { useEffect, useMemo, useState } from 'react';
import { createSearchParams, useNavigate } from 'react-router-dom';
import { PreviewWeb } from '../../components/workflow/preview/email/PreviewWeb';
import { useWorkflowTrigger } from '../../studio/hooks/useBridgeAPI';
import { Footer } from './components/Footer';
import { Header } from './components/Header';
Expand All @@ -17,8 +13,6 @@ import { Wrapper } from './components/Wrapper';
import { useDiscover, useWorkflowPreview } from '../../studio/hooks/useBridgeAPI';
import { useStudioState } from '../../studio/StudioStateProvider';
import { Text, Title } from '@novu/novui';
import { SetupTimeline } from './components/SetupTimeline';
import { BridgeStatus } from '../../bridgeApi/bridgeApi.client';
import { WorkflowsPanelLayout } from '../../studio/components/workflows/layout';
import { WorkflowStepEditorContentPanel } from '../../studio/components/workflows/step-editor/WorkflowStepEditorContentPanel';
import { WorkflowStepEditorControlsPanel } from '../../studio/components/workflows/step-editor/WorkflowStepEditorControlsPanel';
Expand Down
2 changes: 1 addition & 1 deletion apps/web/tests/main-functionality.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ test('should show the brand logo on main page', async ({ page }) => {
await workflowEditorPage.addAndEditChannel(ChannelType.EMAIL);

const brandLogo = page.getByTestId('brand-logo');
await expect(brandLogo).toHaveAttribute('src', 'https://web.novu.co/static/images/logo-light.png');
await expect(brandLogo).toHaveAttribute('src', 'https://dashboard.novu.co/static/images/logo-light.png');
});

test('should support RTL text content', async ({ page }) => {
Expand Down
2 changes: 1 addition & 1 deletion docker/kubernetes/helm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ The command removes all the Kubernetes components associated with the chart and
| `api.env.NODE_ENV` | The environment of the app. | `production` |
| `api.env.API_ROOT_URL` | Define the required env for novu | `http://novu-api:3000` |
| `api.env.DISABLE_USER_REGISTRATION` | If users should not be able to create new accounts. Possible values are: true, false | `true` |
| `api.env.FRONT_BASE_URL` | The base url on which your frontend is accessible for the user. (e.g. web.novu.co) | `http://novu-web:4200` |
| `api.env.FRONT_BASE_URL` | The base url on which your frontend is accessible for the user. (e.g. dashboard.novu.co) | `http://novu-web:4200` |
| `api.env.MONGO_MIN_POOL_SIZE` | The min pool size of the MongoDB connection | `10` |
| `api.env.MONGO_MAX_POOL_SIZE` | The max pool size of the MongoDB connection | `50` |
| `api.ingress.enabled` | Enable ingress record generation for novu api | `false` |
Expand Down
4 changes: 2 additions & 2 deletions docker/kubernetes/helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ api:
## @param api.env.DISABLE_USER_REGISTRATION If users should not be able to create new accounts. Possible values are: true, false
##
DISABLE_USER_REGISTRATION: true
## @param api.env.FRONT_BASE_URL The base url on which your frontend is accessible for the user. (e.g. web.novu.co)
## @param api.env.FRONT_BASE_URL The base url on which your frontend is accessible for the user. (e.g. dashboard.novu.co)
##
FRONT_BASE_URL: http://novu-web:4200
## @param api.env.MONGO_MIN_POOL_SIZE The min pool size of the MongoDB connection
Expand Down Expand Up @@ -1805,4 +1805,4 @@ externalS3:
## for storageService: gcs
gcsBucketName: ''
gcsDomain: 'https://storage.googleapis.com'
googleApplicationCredentials: ''
googleApplicationCredentials: ''
2 changes: 1 addition & 1 deletion libs/testing/src/user.session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ export class UserSession {
.put('/v1/organizations/branding')
.send({
color: '#2a9d8f',
logo: 'https://web.novu.co/static/images/logo-light.png',
logo: 'https://dashboard.novu.co/static/images/logo-light.png',
fontColor: '#214e49',
contentBackground: '#c2cbd2',
fontFamily: 'Montserrat',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const myWorkflow = workflow("onboarding", async ({ step }) => {
</head>
<body style="font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 20px; background-color:#fff;">
<div style="text-align: center; margin-bottom: 24px;">
<img width="200px" src="https://web.novu.co/static/images/logo.png" />
<img width="200px" src="https://dashboard.novu.co/static/images/logo.png" />
</div>
<h1 style="margin: 0; margin-bottom: 16px;">Notification workflows rooted in how YOU work</h1>
<p style="margin: 0; margin-bottom: 8px;">Hi!</p>
Expand Down

0 comments on commit a451c8b

Please sign in to comment.