diff --git a/.env.example b/.env.example index af3b502..1f77079 100644 --- a/.env.example +++ b/.env.example @@ -6,16 +6,17 @@ UPLOAD_PATH="./data/uploads" DATABASE_URL="postgresql://user@localhost:5432/taxhacker" # You can put it here or the app will ask you to enter it -OPENAI_API_KEY="" +OPENAI_MODEL_NAME="gpt-4o-mini" +OPENAI_API_KEY="" # "sk-..." # Auth Config BETTER_AUTH_SECRET="random-secret-key" # please use any long random string here # Stripe Configuration -STRIPE_SECRET_KEY="" -STRIPE_WEBHOOK_SECRET="" +STRIPE_SECRET_KEY="" # "sk_live_..." or "sk_test_..." +STRIPE_WEBHOOK_SECRET="" # "whsec_..." # Resend Configuration (optional, use if you want to send emails) -RESEND_API_KEY="" -RESEND_AUDIENCE_ID="" +RESEND_API_KEY="" # "re_..." +RESEND_AUDIENCE_ID="" # "aud_..." RESEND_FROM_EMAIL="TaxHacker " diff --git a/README.md b/README.md index 680dacf..29bfe6b 100644 --- a/README.md +++ b/README.md @@ -145,14 +145,15 @@ Configure TaxHacker to suit your needs with these environment variables: | Variable | Required | Description | Example | |----------|----------|-------------|---------| -| `PORT` | No | Port to run the app on | `7331` (default) | | `UPLOAD_PATH` | Yes | Local directory for uploading files | `./data/uploads` | | `DATABASE_URL` | Yes | PostgreSQL connection string | `postgresql://user@localhost:5432/taxhacker` | -| `SELF_HOSTED_MODE` | No | Set it to "true" if you're self-hosting the app: it enables auto-login, custom API keys, and more | `false` | +| `PORT` | No | Port to run the app on | `7331` (default) | +| `BASE_URL` | No | Base URL for the application | `http://localhost:7331` | +| `SELF_HOSTED_MODE` | No | Set it to "true" if you're self-hosting the app: it enables auto-login, custom API keys, and more | `true` | | `DISABLE_SIGNUP` | No | Disable new user registration on your instance | `false` | +| `BETTER_AUTH_SECRET` | Yes | Secret key for authentication (min 16 characters) | `random-secret-key` | +| `OPENAI_MODEL_NAME` | No | OpenAI model to use for AI features | `gpt-4o-mini` | | `OPENAI_API_KEY` | No | OpenAI API key for AI features. In self-hosted mode you can set it up in settings too. | `sk-...` | -| `RESEND_API_KEY` | No | Resend API key for email notifications | `re_...` | -| `RESEND_FROM_EMAIL` | No | Email address to send from | `TaxHacker ` | ## ⌨️ Local Development diff --git a/app/landing/landing.tsx b/app/landing/landing.tsx index 80422fd..f4f2179 100644 --- a/app/landing/landing.tsx +++ b/app/landing/landing.tsx @@ -244,6 +244,41 @@ export default function LandingPage() {
+ {/* Self-Hosted Version */} +
+
+ Use Your Own Server +
+

+ Self-Hosted Edition +

+
    +
  • + + Free and open source +
  • +
  • + + Complete control over your data +
  • +
  • + + Use at your own infrastructure +
  • +
  • + + Bring your own OpenAI keys +
  • +
+ + Github + Docker Compose + +
+ {/* Cloud Version */}
@@ -280,41 +315,6 @@ export default function LandingPage() { LET'S GO!
- - {/* Self-Hosted Version */} -
-
- Use Your Own Server -
-

- Self-Hosted Edition -

-
    -
  • - - Free and open source -
  • -
  • - - Complete control over your data -
  • -
  • - - Use at your own infrastructure -
  • -
  • - - Bring your own OpenAI keys -
  • -
- - Github + Docker Compose - -
diff --git a/lib/config.ts b/lib/config.ts index 3eadef4..f13092d 100644 --- a/lib/config.ts +++ b/lib/config.ts @@ -3,8 +3,9 @@ import { z } from "zod" const envSchema = z.object({ BASE_URL: z.string().url().default("http://localhost:7331"), PORT: z.string().default("7331"), - SELF_HOSTED_MODE: z.enum(["true", "false"]).default("false"), + SELF_HOSTED_MODE: z.enum(["true", "false"]).default("true"), OPENAI_API_KEY: z.string().optional(), + OPENAI_MODEL_NAME: z.string().default("gpt-4o-mini"), BETTER_AUTH_SECRET: z .string() .min(16, "Auth secret must be at least 16 characters") @@ -22,7 +23,7 @@ const env = envSchema.parse(process.env) const config = { app: { title: "TaxHacker", - description: "Your personal AI helper for taxes", + description: "Your personal AI accountant", version: process.env.npm_package_version || "0.0.1", baseURL: env.BASE_URL || `http://localhost:${env.PORT || "7331"}`, supportEmail: "me@vas3k.com", @@ -37,7 +38,7 @@ const config = { }, ai: { openaiApiKey: env.OPENAI_API_KEY, - modelName: "gpt-4o-mini", + modelName: env.OPENAI_MODEL_NAME, }, auth: { secret: env.BETTER_AUTH_SECRET,