2023-03-20 11:16:46 +00:00
|
|
|
const VERCEL_URL = process.env.NEXT_PUBLIC_VERCEL_URL ? `https://${process.env.NEXT_PUBLIC_VERCEL_URL}` : "";
|
2022-07-07 01:13:02 +00:00
|
|
|
const RAILWAY_STATIC_URL = process.env.RAILWAY_STATIC_URL ? `https://${process.env.RAILWAY_STATIC_URL}` : "";
|
|
|
|
const HEROKU_URL = process.env.HEROKU_APP_NAME ? `https://${process.env.HEROKU_APP_NAME}.herokuapp.com` : "";
|
2023-01-07 10:28:02 +00:00
|
|
|
const RENDER_URL = process.env.RENDER_EXTERNAL_URL ? `https://${process.env.RENDER_EXTERNAL_URL}` : "";
|
2022-07-07 01:13:02 +00:00
|
|
|
export const WEBAPP_URL =
|
2023-01-04 22:14:46 +00:00
|
|
|
process.env.NEXT_PUBLIC_WEBAPP_URL ||
|
|
|
|
VERCEL_URL ||
|
|
|
|
RAILWAY_STATIC_URL ||
|
|
|
|
HEROKU_URL ||
|
2023-01-07 10:28:02 +00:00
|
|
|
RENDER_URL ||
|
2023-01-04 22:14:46 +00:00
|
|
|
"http://localhost:3000";
|
2022-03-26 00:39:38 +00:00
|
|
|
/** @deprecated use `WEBAPP_URL` */
|
|
|
|
export const BASE_URL = WEBAPP_URL;
|
|
|
|
export const WEBSITE_URL = process.env.NEXT_PUBLIC_WEBSITE_URL || "https://cal.com";
|
2022-11-30 21:52:56 +00:00
|
|
|
export const APP_NAME = process.env.NEXT_PUBLIC_APP_NAME || "Cal.com";
|
|
|
|
export const SUPPORT_MAIL_ADDRESS = process.env.NEXT_PUBLIC_SUPPORT_MAIL_ADDRESS || "help@cal.com";
|
|
|
|
export const COMPANY_NAME = process.env.NEXT_PUBLIC_COMPANY_NAME || "Cal.com, Inc.";
|
2022-12-12 11:00:15 +00:00
|
|
|
export const SENDER_ID = process.env.NEXT_PUBLIC_SENDER_ID || "Cal";
|
2023-01-18 14:32:39 +00:00
|
|
|
export const SENDER_NAME = process.env.NEXT_PUBLIC_SENDGRID_SENDER_NAME || "Cal.com";
|
2022-05-30 07:57:48 +00:00
|
|
|
|
|
|
|
// This is the URL from which all Cal Links and their assets are served.
|
|
|
|
// Use website URL to make links shorter(cal.com and not app.cal.com)
|
|
|
|
// As website isn't setup for preview environments, use the webapp url instead
|
|
|
|
export const CAL_URL = new URL(WEBAPP_URL).hostname.endsWith(".vercel.app") ? WEBAPP_URL : WEBSITE_URL;
|
|
|
|
|
2022-06-02 19:49:12 +00:00
|
|
|
export const CONSOLE_URL =
|
|
|
|
new URL(WEBAPP_URL).hostname.endsWith(".cal.dev") || process.env.NODE_ENV !== "production"
|
|
|
|
? `https://console.cal.dev`
|
|
|
|
: `https://console.cal.com`;
|
2022-07-06 19:31:07 +00:00
|
|
|
export const IS_SELF_HOSTED = !(
|
2022-07-11 23:46:47 +00:00
|
|
|
new URL(WEBAPP_URL).hostname.endsWith(".cal.dev") || new URL(WEBAPP_URL).hostname.endsWith(".cal.com")
|
2022-07-06 19:31:07 +00:00
|
|
|
);
|
2022-05-06 15:56:26 +00:00
|
|
|
export const EMBED_LIB_URL = process.env.NEXT_PUBLIC_EMBED_LIB_URL || `${WEBAPP_URL}/embed/embed.js`;
|
2022-03-09 22:56:05 +00:00
|
|
|
export const IS_PRODUCTION = process.env.NODE_ENV === "production";
|
|
|
|
export const TRIAL_LIMIT_DAYS = 14;
|
2023-01-13 23:51:37 +00:00
|
|
|
|
|
|
|
export const HOSTED_CAL_FEATURES = process.env.NEXT_PUBLIC_HOSTED_CAL_FEATURES || !IS_SELF_HOSTED;
|
|
|
|
|
2022-03-26 00:39:38 +00:00
|
|
|
/** @deprecated use `WEBAPP_URL` */
|
|
|
|
export const NEXT_PUBLIC_BASE_URL = process.env.NEXT_PUBLIC_WEBAPP_URL || `https://${process.env.VERCEL_URL}`;
|
2022-08-08 19:39:51 +00:00
|
|
|
export const LOGO = "/calcom-logo-white-word.svg";
|
2022-07-01 17:19:52 +00:00
|
|
|
export const LOGO_ICON = "/cal-com-icon-white.svg";
|
|
|
|
export const ROADMAP = "https://cal.com/roadmap";
|
2022-08-17 09:07:19 +00:00
|
|
|
export const DESKTOP_APP_LINK = "https://cal.com/download";
|
2022-07-01 17:19:52 +00:00
|
|
|
export const JOIN_SLACK = "https://cal.com/slack";
|
2022-08-05 18:44:30 +00:00
|
|
|
export const POWERED_BY_URL = `${WEBSITE_URL}/?utm_source=embed&utm_medium=powered-by-button`;
|
2023-03-17 23:42:27 +00:00
|
|
|
export const DOCS_URL = "https://cal.com/docs";
|
2022-08-22 20:56:55 +00:00
|
|
|
export const DEVELOPER_DOCS = "https://developer.cal.com";
|
2022-07-01 17:19:52 +00:00
|
|
|
export const SEO_IMG_DEFAULT = `${WEBSITE_URL}/og-image.png`;
|
2022-12-13 21:22:38 +00:00
|
|
|
// The Dynamic OG Image is passed through Next's Image API to further optimize it.
|
|
|
|
// This results in a 80% smaller image 🤯. It is however important that for the query
|
|
|
|
// parameters you pass to the /api/social/og/image endpoint, you wrap them in encodeURIComponent
|
|
|
|
// as well, otherwise the URL won't be valid.
|
|
|
|
export const SEO_IMG_OGIMG = `${CAL_URL}/_next/image?w=1200&q=100&url=${encodeURIComponent(
|
|
|
|
"/api/social/og/image"
|
|
|
|
)}`;
|
2022-07-01 17:19:52 +00:00
|
|
|
export const SEO_IMG_OGIMG_VIDEO = `${WEBSITE_URL}/video-og-image.png`;
|
2022-11-10 20:23:56 +00:00
|
|
|
export const IS_STRIPE_ENABLED = !!(
|
|
|
|
process.env.STRIPE_CLIENT_ID &&
|
|
|
|
process.env.NEXT_PUBLIC_STRIPE_PUBLIC_KEY &&
|
|
|
|
process.env.STRIPE_PRIVATE_KEY
|
|
|
|
);
|
2022-11-18 18:59:01 +00:00
|
|
|
/** Self hosted shouldn't checkout when creating teams unless required */
|
|
|
|
export const IS_TEAM_BILLING_ENABLED = IS_STRIPE_ENABLED && (!IS_SELF_HOSTED || HOSTED_CAL_FEATURES);
|
2023-03-21 10:43:07 +00:00
|
|
|
export const FULL_NAME_LENGTH_MAX_LIMIT = 50;
|