OpenPanel is an open-source web and product analytics platform, an open-source alternative to Mixpanel with optional self-hosting.
style: formatted and added example env
André Britoacc675bd3607
diff --git a/.vscode/settings.json b/.vscode/settings.jsonindex 7fcbc5535..e1eb0bea9 100644--- a/.vscode/settings.json+++ b/.vscode/settings.json@@ -23,7 +23,10 @@"tailwindCSS.experimental.classRegex": [["cva\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"],["cx\\(([^)]*)\\)", "(?:'|\"|`)([^']*)(?:'|\"|`)"],- ["\\b\\w+ClassName\\s*=\\s*[\"'`]([^\"'`]*)[\"'`]", "[\"'`]([^\"'`]*)[\"'`]" ]+ [+ "\\b\\w+ClassName\\s*=\\s*[\"'`]([^\"'`]*)[\"'`]",+ "[\"'`]([^\"'`]*)[\"'`]"+ ]],"typescript.enablePromptUseWorkspaceTsdk": true,"typescript.tsdk": "node_modules/typescript/lib",diff --git a/apps/api/scripts/mock-basic.json b/apps/api/scripts/mock-basic.jsonindex 9743482e0..c8b5c6e95 100644--- a/apps/api/scripts/mock-basic.json+++ b/apps/api/scripts/mock-basic.json@@ -32273,4 +32273,4 @@}}}-]\ No newline at end of file+]diff --git a/apps/public/components.json b/apps/public/components.jsonindex 9528fa10e..d195b6054 100644--- a/apps/public/components.json+++ b/apps/public/components.json@@ -17,4 +17,4 @@"lib": "@/lib","hooks": "@/hooks"}-}\ No newline at end of file+}diff --git a/apps/public/lib/utils.ts b/apps/public/lib/utils.tsindex bd0c391dd..2819a830d 100644--- a/apps/public/lib/utils.ts+++ b/apps/public/lib/utils.ts@@ -1,6 +1,6 @@-import { clsx, type ClassValue } from "clsx"-import { twMerge } from "tailwind-merge"+import { clsx, type ClassValue } from 'clsx';+import { twMerge } from 'tailwind-merge';export function cn(...inputs: ClassValue[]) {- return twMerge(clsx(inputs))+ return twMerge(clsx(inputs));}diff --git a/apps/public/tailwind.config.js b/apps/public/tailwind.config.jsindex 3cdf0b4cf..2aeb5ed4f 100644--- a/apps/public/tailwind.config.js+++ b/apps/public/tailwind.config.js@@ -2,8 +2,8 @@ import { createPreset } from 'fumadocs-ui/tailwind-plugin';/** @type {import('tailwindcss').Config} */export default {- darkMode: ['class'],- content: [+ darkMode: ['class'],+ content: ['./components/**/*.{ts,tsx}','./app/**/*.{ts,tsx}','./content/**/*.{md,mdx}',@@ -11,88 +11,88 @@ export default {'./node_modules/fumadocs-ui/dist/**/*.js',],presets: [createPreset()],- plugins: [require("tailwindcss-animate")],- corePlugins: {- container: false- },- theme: {- extend: {- screens: {- article: '1530px',- },- borderRadius: {- lg: 'var(--radius)',- md: 'calc(var(--radius) - 2px)',- sm: 'calc(var(--radius) - 4px)'- },- colors: {- background: 'hsl(var(--background))',- 'background-light': 'hsl(var(--background-light))',- 'background-dark': 'hsl(var(--background-dark))',- foreground: 'hsl(var(--foreground))',- 'foreground-dark': 'hsl(var(--foreground-dark))',- 'foreground-light': 'hsl(var(--foreground-light))',- card: {- DEFAULT: 'hsl(var(--card))',- foreground: 'hsl(var(--card-foreground))'- },- popover: {- DEFAULT: 'hsl(var(--popover))',- foreground: 'hsl(var(--popover-foreground))'- },- primary: {- DEFAULT: 'hsl(var(--primary))',- foreground: 'hsl(var(--primary-foreground))'- },- secondary: {- DEFAULT: 'hsl(var(--secondary))',- foreground: 'hsl(var(--secondary-foreground))'- },- muted: {- DEFAULT: 'hsl(var(--muted))',- foreground: 'hsl(var(--muted-foreground))'- },- accent: {- DEFAULT: 'hsl(var(--accent))',- foreground: 'hsl(var(--accent-foreground))'- },- destructive: {- DEFAULT: 'hsl(var(--destructive))',- foreground: 'hsl(var(--destructive-foreground))'- },- border: 'hsl(var(--border))',- input: 'hsl(var(--input))',- ring: 'hsl(var(--ring))',- chart: {- '1': 'hsl(var(--chart-1))',- '2': 'hsl(var(--chart-2))',- '3': 'hsl(var(--chart-3))',- '4': 'hsl(var(--chart-4))',- '5': 'hsl(var(--chart-5))'- }- },- keyframes: {- 'accordion-down': {- from: {- height: '0'- },- to: {- height: 'var(--radix-accordion-content-height)'- }- },- 'accordion-up': {- from: {- height: 'var(--radix-accordion-content-height)'- },- to: {- height: '0'- }- }- },- animation: {- 'accordion-down': 'accordion-down 0.2s ease-out',- 'accordion-up': 'accordion-up 0.2s ease-out'- }- }- }+ plugins: [require('tailwindcss-animate')],+ corePlugins: {+ container: false,+ },+ theme: {+ extend: {+ screens: {+ article: '1530px',+ },+ borderRadius: {+ lg: 'var(--radius)',+ md: 'calc(var(--radius) - 2px)',+ sm: 'calc(var(--radius) - 4px)',+ },+ colors: {+ background: 'hsl(var(--background))',+ 'background-light': 'hsl(var(--background-light))',+ 'background-dark': 'hsl(var(--background-dark))',+ foreground: 'hsl(var(--foreground))',+ 'foreground-dark': 'hsl(var(--foreground-dark))',+ 'foreground-light': 'hsl(var(--foreground-light))',+ card: {+ DEFAULT: 'hsl(var(--card))',+ foreground: 'hsl(var(--card-foreground))',+ },+ popover: {+ DEFAULT: 'hsl(var(--popover))',+ foreground: 'hsl(var(--popover-foreground))',+ },+ primary: {+ DEFAULT: 'hsl(var(--primary))',+ foreground: 'hsl(var(--primary-foreground))',+ },+ secondary: {+ DEFAULT: 'hsl(var(--secondary))',+ foreground: 'hsl(var(--secondary-foreground))',+ },+ muted: {+ DEFAULT: 'hsl(var(--muted))',+ foreground: 'hsl(var(--muted-foreground))',+ },+ accent: {+ DEFAULT: 'hsl(var(--accent))',+ foreground: 'hsl(var(--accent-foreground))',+ },+ destructive: {+ DEFAULT: 'hsl(var(--destructive))',+ foreground: 'hsl(var(--destructive-foreground))',+ },+ border: 'hsl(var(--border))',+ input: 'hsl(var(--input))',+ ring: 'hsl(var(--ring))',+ chart: {+ 1: 'hsl(var(--chart-1))',+ 2: 'hsl(var(--chart-2))',+ 3: 'hsl(var(--chart-3))',+ 4: 'hsl(var(--chart-4))',+ 5: 'hsl(var(--chart-5))',+ },+ },+ keyframes: {+ 'accordion-down': {+ from: {+ height: '0',+ },+ to: {+ height: 'var(--radix-accordion-content-height)',+ },+ },+ 'accordion-up': {+ from: {+ height: 'var(--radix-accordion-content-height)',+ },+ to: {+ height: '0',+ },+ },+ },+ animation: {+ 'accordion-down': 'accordion-down 0.2s ease-out',+ 'accordion-up': 'accordion-up 0.2s ease-out',+ },+ },+ },};diff --git a/packages/email/src/index.tsx b/packages/email/src/index.tsxindex be3ca64a0..b3ad44032 100644--- a/packages/email/src/index.tsx+++ b/packages/email/src/index.tsx@@ -1,16 +1,16 @@-import React from "react";-import { Resend } from "resend";-import type { z } from "zod";+import React from 'react';+import { Resend } from 'resend';+import type { z } from 'zod';-import { type TemplateKey, type Templates, templates } from "./emails";+import { type TemplateKey, type Templates, templates } from './emails';-const FROM = process.env.EMAIL_SENDER ?? "[email protected]";+const FROM = process.env.EMAIL_SENDER ?? '[email protected]';export async function sendEmail<T extends TemplateKey>(template: T,options: {to: string | string[];- data: z.infer<Templates[T]["schema"]>;+ data: z.infer<Templates[T]['schema']>;},) {const { to, data } = options;@@ -18,7 +18,7 @@ export async function sendEmail<T extends TemplateKey>(const props = schema.safeParse(data);if (props.error) {- console.error("Failed to parse data", props.error);+ console.error('Failed to parse data', props.error);return null;}@@ -46,7 +46,7 @@ export async function sendEmail<T extends TemplateKey>(return res;} catch (error) {- console.error("Failed to send email", error);+ console.error('Failed to send email', error);return null;}}diff --git a/packages/integrations/tsconfig.json b/packages/integrations/tsconfig.jsonindex b1ff68c07..a291eef2f 100644--- a/packages/integrations/tsconfig.json+++ b/packages/integrations/tsconfig.json@@ -3,7 +3,7 @@"compilerOptions": {"baseUrl": ".","paths": {- "@/*": ["./src/*"],+ "@/*": ["./src/*"]},"tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json"},diff --git a/self-hosting/.env.template b/self-hosting/.env.templateindex d7e13bd54..ab511d0ee 100644--- a/self-hosting/.env.template+++ b/self-hosting/.env.template@@ -12,4 +12,5 @@ DATABASE_URL="$DATABASE_URL"DATABASE_URL_DIRECT="$DATABASE_URL_DIRECT"NEXT_PUBLIC_DASHBOARD_URL="$NEXT_PUBLIC_DASHBOARD_URL"NEXT_PUBLIC_API_URL="$NEXT_PUBLIC_API_URL"-COOKIE_SECRET="$COOKIE_SECRET"\ No newline at end of file+COOKIE_SECRET="$COOKIE_SECRET"\ No newline at end of file