feat: Remove Vercel Analytics, generalize deployment instructions, and switch base URL configuration to NEXT_PUBLIC_APP_URL.

This commit is contained in:
2025-11-29 02:52:10 -05:00
parent 2fc03566d1
commit a1c7b9223f
6 changed files with 16 additions and 17 deletions

View File

@@ -198,12 +198,19 @@ Update the logo and colors in:
## 🚀 Deployment
### Vercel (Recommended)
### Deployment
1. Push your code to GitHub
2. Connect your repository to Vercel
3. Set environment variables in Vercel dashboard
4. Deploy automatically on push
You can deploy this application to any platform that supports Next.js (Docker, Coolify, Railway, etc.).
1. Build the application:
```bash
bun run build
```
2. Start the server:
```bash
bun start
```
### Other Platforms

View File

@@ -36,7 +36,6 @@
"@trpc/client": "^11.7.2",
"@trpc/react-query": "^11.7.2",
"@trpc/server": "^11.7.2",
"@vercel/analytics": "^1.5.0",
"bcryptjs": "^3.0.3",
"better-auth": "^1.4.3",
"chrono-node": "^2.9.0",
@@ -677,8 +676,6 @@
"@unrs/resolver-binding-win32-x64-msvc": ["@unrs/resolver-binding-win32-x64-msvc@1.11.1", "", { "os": "win32", "cpu": "x64" }, "sha512-lrW200hZdbfRtztbygyaq/6jP6AKE8qQN2KvPcJ+x7wiD038YtnYtZ82IMNJ69GJibV7bwL3y9FgK+5w/pYt6g=="],
"@vercel/analytics": ["@vercel/analytics@1.5.0", "", { "peerDependencies": { "@remix-run/react": "^2", "@sveltejs/kit": "^1 || ^2", "next": ">= 13", "react": "^18 || ^19 || ^19.0.0-rc", "svelte": ">= 4", "vue": "^3", "vue-router": "^4" }, "optionalPeers": ["@remix-run/react", "@sveltejs/kit", "next", "react", "svelte", "vue", "vue-router"] }, "sha512-MYsBzfPki4gthY5HnYN7jgInhAZ7Ac1cYDoRWFomwGHWEX7odTEzbtg9kf/QSo7XEsEAqlQugA6gJ2WS2DEa3g=="],
"abs-svg-path": ["abs-svg-path@0.1.1", "", {}, "sha512-d8XPSGjfyzlXC3Xx891DJRyZfqk5JU0BJrDQcsWomFIV1/BIzPW5HDH5iDdWpqWaav0YVIEzT1RHTwWr0FFshA=="],
"acorn": ["acorn@8.15.0", "", { "bin": { "acorn": "bin/acorn" } }, "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg=="],

View File

@@ -55,7 +55,6 @@
"@trpc/client": "^11.7.2",
"@trpc/react-query": "^11.7.2",
"@trpc/server": "^11.7.2",
"@vercel/analytics": "^1.5.0",
"bcryptjs": "^3.0.3",
"better-auth": "^1.4.3",
"chrono-node": "^2.9.0",

View File

@@ -1,6 +1,5 @@
import "~/styles/globals.css";
import { Analytics } from "@vercel/analytics/next";
import { type Metadata } from "next";
import { Geist, Geist_Mono, Instrument_Serif } from "next/font/google";
@@ -136,7 +135,6 @@ export default function RootLayout({
}}
/>
</head>
<Analytics />
<body className="bg-background text-foreground relative min-h-screen overflow-x-hidden font-sans antialiased">
<ThemeProvider>
<ColorThemeProvider>

View File

@@ -108,11 +108,9 @@ export const emailRouter = createTRPCRouter({
customMessage: input.customMessage,
userName,
userEmail,
baseUrl: process.env.VERCEL_URL
? `https://${process.env.VERCEL_URL}`
: process.env.NODE_ENV === "production"
? "https://beenvoice.app"
: "http://localhost:3000",
baseUrl: process.env.NEXT_PUBLIC_APP_URL
? process.env.NEXT_PUBLIC_APP_URL
: "http://localhost:3000",
});
// Determine Resend instance and email configuration to use

View File

@@ -73,6 +73,6 @@ export function TRPCReactProvider(props: { children: React.ReactNode }) {
function getBaseUrl() {
if (typeof window !== "undefined") return window.location.origin;
if (process.env.VERCEL_URL) return `https://${process.env.VERCEL_URL}`;
if (process.env.NEXT_PUBLIC_APP_URL) return process.env.NEXT_PUBLIC_APP_URL;
return `http://localhost:${process.env.PORT ?? 3000}`;
}