diff --git a/.env.example b/.env.example index 41145424c..15b0b3f5c 100644 --- a/.env.example +++ b/.env.example @@ -22,7 +22,6 @@ NEXT_PRIVATE_OIDC_SKIP_VERIFY="" # [[URLS]] NEXT_PUBLIC_WEBAPP_URL="http://localhost:3000" -NEXT_PUBLIC_MARKETING_URL="http://localhost:3001" # URL used by the web app to request itself (e.g. local background jobs) NEXT_PRIVATE_INTERNAL_WEBAPP_URL="http://localhost:3000" diff --git a/.gitpod.yml b/.gitpod.yml index 6976c2239..261f8c96b 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -5,7 +5,6 @@ tasks: cp .env.example .env && set -a; source .env && export NEXT_PUBLIC_WEBAPP_URL="$(gp url 3000)" && - export NEXT_PUBLIC_MARKETING_URL="$(gp url 3001)" command: npm run d ports: diff --git a/README.md b/README.md index 3afaafeec..d7f79adda 100644 --- a/README.md +++ b/README.md @@ -166,7 +166,6 @@ git clone https://github.com//documenso - NEXTAUTH_SECRET - NEXT_PUBLIC_WEBAPP_URL - - NEXT_PUBLIC_MARKETING_URL - NEXT_PRIVATE_DATABASE_URL - NEXT_PRIVATE_DIRECT_DATABASE_URL - NEXT_PRIVATE_SMTP_FROM_NAME @@ -237,7 +236,6 @@ The following environment variables must be set: - `NEXTAUTH_SECRET` - `NEXT_PUBLIC_WEBAPP_URL` -- `NEXT_PUBLIC_MARKETING_URL` - `NEXT_PRIVATE_DATABASE_URL` - `NEXT_PRIVATE_DIRECT_DATABASE_URL` - `NEXT_PRIVATE_SMTP_FROM_NAME` diff --git a/apps/documentation/pages/developers/local-development/manual.mdx b/apps/documentation/pages/developers/local-development/manual.mdx index 9f2b5c4fc..ed98338cf 100644 --- a/apps/documentation/pages/developers/local-development/manual.mdx +++ b/apps/documentation/pages/developers/local-development/manual.mdx @@ -34,7 +34,6 @@ Set up the following environment variables in the `.env` file: ```bash NEXTAUTH_SECRET NEXT_PUBLIC_WEBAPP_URL -NEXT_PUBLIC_MARKETING_URL NEXT_PRIVATE_DATABASE_URL NEXT_PRIVATE_DIRECT_DATABASE_URL NEXT_PRIVATE_SMTP_FROM_NAME diff --git a/apps/documentation/pages/developers/self-hosting/how-to.mdx b/apps/documentation/pages/developers/self-hosting/how-to.mdx index f327a55a5..4025ce6d0 100644 --- a/apps/documentation/pages/developers/self-hosting/how-to.mdx +++ b/apps/documentation/pages/developers/self-hosting/how-to.mdx @@ -37,7 +37,6 @@ Open the `.env` file and fill in the following variables: ```bash - NEXTAUTH_SECRET - NEXT_PUBLIC_WEBAPP_URL -- NEXT_PUBLIC_MARKETING_URL - NEXT_PRIVATE_DATABASE_URL - NEXT_PRIVATE_DIRECT_DATABASE_URL - NEXT_PRIVATE_SMTP_FROM_NAME diff --git a/apps/remix/app/routes/_recipient+/_layout.tsx b/apps/remix/app/routes/_recipient+/_layout.tsx index 24228b029..e5677ccaf 100644 --- a/apps/remix/app/routes/_recipient+/_layout.tsx +++ b/apps/remix/app/routes/_recipient+/_layout.tsx @@ -6,6 +6,7 @@ import { useOptionalSession } from '@documenso/lib/client-only/providers/session import { Button } from '@documenso/ui/primitives/button'; import { Header as AuthenticatedHeader } from '~/components/general/app-header'; +import { GenericErrorLayout } from '~/components/general/generic-error-layout'; /** * A layout to handle scenarios where the user is a recipient of a given resource @@ -29,35 +30,18 @@ export default function RecipientLayout() { ); } -// Todo: (RR7) Use generic error boundary. export function ErrorBoundary() { return ( -
-
-

- 404 Not found -

- -

- Oops! Something went wrong. -

- -

- - The resource you are looking for may have been disabled, deleted or may have never - existed. - -

- -
- -
-
-
+ + + + Go Back + + + } + /> ); } diff --git a/apps/remix/app/routes/_unauthenticated+/share.$slug.tsx b/apps/remix/app/routes/_unauthenticated+/share.$slug.tsx index 3aa8ab8e8..a2c73ac26 100644 --- a/apps/remix/app/routes/_unauthenticated+/share.$slug.tsx +++ b/apps/remix/app/routes/_unauthenticated+/share.$slug.tsx @@ -1,10 +1,10 @@ import { redirect } from 'react-router'; -import { NEXT_PUBLIC_MARKETING_URL, NEXT_PUBLIC_WEBAPP_URL } from '@documenso/lib/constants/app'; +import { NEXT_PUBLIC_WEBAPP_URL } from '@documenso/lib/constants/app'; import type { Route } from './+types/share.$slug'; -// Todo: (RR7) Test meta. +// Todo: (RR7) Test on stg export function meta({ params: { slug } }: Route.MetaArgs) { return [ { title: 'Documenso - Share' }, @@ -23,7 +23,7 @@ export function meta({ params: { slug } }: Route.MetaArgs) { }, { property: 'og:images', - images: `${NEXT_PUBLIC_WEBAPP_URL()}/share/${slug}/opengraph`, + images: [`${NEXT_PUBLIC_WEBAPP_URL()}/share/${slug}/opengraph`], }, { name: 'twitter:site', @@ -35,7 +35,7 @@ export function meta({ params: { slug } }: Route.MetaArgs) { }, { name: 'twitter:images', - images: `${NEXT_PUBLIC_WEBAPP_URL()}/share/${slug}/opengraph`, + images: [`${NEXT_PUBLIC_WEBAPP_URL()}/share/${slug}/opengraph`], }, { name: 'twitter:description', @@ -51,5 +51,6 @@ export const loader = ({ request }: Route.LoaderArgs) => { return null; } - throw redirect(NEXT_PUBLIC_MARKETING_URL()); + // Is hardcoded because this whole meta is hardcoded anyway for Documenso. + throw redirect('https://documenso.com'); }; diff --git a/docker/production/compose.yml b/docker/production/compose.yml index a48475463..54ec19fa2 100644 --- a/docker/production/compose.yml +++ b/docker/production/compose.yml @@ -29,7 +29,6 @@ services: - NEXT_PRIVATE_GOOGLE_CLIENT_SECRET=${NEXT_PRIVATE_GOOGLE_CLIENT_SECRET} - NEXT_PUBLIC_WEBAPP_URL=${NEXT_PUBLIC_WEBAPP_URL:?err} - NEXT_PRIVATE_INTERNAL_WEBAPP_URL=${NEXT_PRIVATE_INTERNAL_WEBAPP_URL:-http://localhost:$PORT} - - NEXT_PUBLIC_MARKETING_URL=${NEXT_PUBLIC_MARKETING_URL:-https://documenso.com} - NEXT_PRIVATE_DATABASE_URL=${NEXT_PRIVATE_DATABASE_URL:?err} - NEXT_PRIVATE_DIRECT_DATABASE_URL=${NEXT_PRIVATE_DIRECT_DATABASE_URL:-${NEXT_PRIVATE_DATABASE_URL}} - NEXT_PUBLIC_UPLOAD_TRANSPORT=${NEXT_PUBLIC_UPLOAD_TRANSPORT:-database} diff --git a/packages/lib/constants/app.ts b/packages/lib/constants/app.ts index d137aea33..7dedabfcf 100644 --- a/packages/lib/constants/app.ts +++ b/packages/lib/constants/app.ts @@ -6,9 +6,6 @@ export const APP_DOCUMENT_UPLOAD_SIZE_LIMIT = export const NEXT_PUBLIC_WEBAPP_URL = () => env('NEXT_PUBLIC_WEBAPP_URL') ?? 'http://localhost:3000'; -export const NEXT_PUBLIC_MARKETING_URL = () => - env('NEXT_PUBLIC_MARKETING_URL') ?? 'http://localhost:3001'; - export const NEXT_PRIVATE_INTERNAL_WEBAPP_URL = env('NEXT_PRIVATE_INTERNAL_WEBAPP_URL') ?? NEXT_PUBLIC_WEBAPP_URL(); diff --git a/packages/tsconfig/process-env.d.ts b/packages/tsconfig/process-env.d.ts index dc00ef57b..143dbe30d 100644 --- a/packages/tsconfig/process-env.d.ts +++ b/packages/tsconfig/process-env.d.ts @@ -1,7 +1,6 @@ declare namespace NodeJS { export interface ProcessEnv { NEXT_PUBLIC_WEBAPP_URL?: string; - NEXT_PUBLIC_MARKETING_URL?: string; NEXT_PRIVATE_GOOGLE_CLIENT_ID?: string; NEXT_PRIVATE_GOOGLE_CLIENT_SECRET?: string; diff --git a/render.yaml b/render.yaml index 2954a8cfc..b5dba1401 100644 --- a/render.yaml +++ b/render.yaml @@ -41,8 +41,6 @@ services: name: documenso-app type: web envVarKey: RENDER_EXTERNAL_URL - - key: NEXT_PUBLIC_MARKETING_URL - value: 'http://localhost:3001' - key: NEXT_PRIVATE_INTERNAL_WEBAPP_URL value: 'http://localhost:10000' diff --git a/turbo.json b/turbo.json index a5adf232a..db492e33a 100644 --- a/turbo.json +++ b/turbo.json @@ -43,7 +43,6 @@ "NEXTAUTH_SECRET", "NEXT_PUBLIC_PROJECT", "NEXT_PUBLIC_WEBAPP_URL", - "NEXT_PUBLIC_MARKETING_URL", "NEXT_PRIVATE_INTERNAL_WEBAPP_URL", "NEXT_PUBLIC_POSTHOG_KEY", "NEXT_PUBLIC_FEATURE_BILLING_ENABLED",