import { FormSelectCurrency } from "@/components/forms/select-currency" import { FormInput } from "@/components/forms/simple" import { Button } from "@/components/ui/button" import { Card, CardDescription, CardTitle } from "@/components/ui/card" import { ColoredText } from "@/components/ui/colored-text" import config from "@/lib/config" import { DEFAULT_CURRENCIES, DEFAULT_SETTINGS } from "@/models/defaults" import { getSelfHostedUser } from "@/models/users" import { ShieldAlert } from "lucide-react" import Image from "next/image" import { redirect } from "next/navigation" import { selfHostedGetStartedAction } from "../actions" export default async function SelfHostedWelcomePage() { if (!config.selfHosted.isEnabled) { return ( Self-Hosted Mode is not enabled

To use TaxHacker in self-hosted mode, please set SELF_HOSTED_MODE=true in your environment.

In self-hosted mode you can use your own ChatGPT API key and store your data on your own server.

) } const user = await getSelfHostedUser() if (user) { redirect(config.selfHosted.redirectUrl) } return ( Logo TaxHacker: Self-Hosted Edition

Welcome to your own instance of TaxHacker. Let's set up a couple of settings to get started.

Get your API key from{" "} OpenAI Platform Console
s.code === "default_currency")?.value ?? "EUR"} currencies={DEFAULT_CURRENCIES} />
) }