Features
Explore all the features included in CodeBaseHub starter kit
Authentication & Security
CodeBaseHub includes a complete authentication system powered by Better Auth, supporting multiple authentication methods and security features.
Email/Password Authentication
Secure user registration and login with email verification:
import { authClient } from "@/lib/auth-client";
// Sign up
await authClient.signUp.email({
  email: "user@example.com",
  password: "secure-password",
  name: "John Doe",
});
// Sign in
await authClient.signIn.email({
  email: "user@example.com",
  password: "secure-password",
});Features:
- Bcrypt password hashing
- Email verification
- Password reset flow
- Session management
OAuth Authentication
Sign in with popular OAuth providers:
// Sign in with OAuth providers
await authClient.signIn.social({
  provider: "github",
  callbackURL: "/dashboard",
});Supported providers:
- GitHub
- Discord
- Easy to add more providers
Two-Factor Authentication
Enhanced security with TOTP-based 2FA:
// Enable 2FA
await authClient.twoFactor.enable({
  password: "user-password",
});
// Verify 2FA code
await authClient.twoFactor.verify({
  code: "123456",
});Features:
- TOTP-based authentication
- QR code generation
- Backup codes
- Optional per user
All authentication routes are protected with CSRF tokens and secure session management.
Internationalization (i18n)
Built-in support for multiple languages with next-intl, making it easy to reach a global audience.
Multi-language Support
English, Turkish, and Arabic with easy expansion to more languages.
RTL Support
Automatic right-to-left layout for Arabic and other RTL languages.
Type-safe Translations
Fully typed translations with TypeScript autocomplete.
Usage Example
import { useTranslations } from 'next-intl';
export function MyComponent() {
  const t = useTranslations('common');
  return (
    <div>
      <h1>{t('welcome.title')}</h1>
      <p>{t('welcome.description')}</p>
    </div>
  );
}import { getTranslations } from 'next-intl/server';
export default async function Page() {
  const t = await getTranslations('common');
  return <h1>{t('welcome.title')}</h1>;
}import { useLocale } from 'next-intl';
import { useRouter } from 'next/navigation';
export function LanguageSwitcher() {
  const locale = useLocale();
  const router = useRouter();
  const changeLanguage = (newLocale: string) => {
    router.push(`/${newLocale}`);
  };
  return (
    <select value={locale} onChange={(e) => changeLanguage(e.target.value)}>
      <option value="en">English</option>
      <option value="tr">Türkçe</option>
      <option value="ar">العربية</option>
    </select>
  );
}User Interface
Modern, accessible UI components built with shadcn/ui and Tailwind CSS.
Example Usage
import { Button } from "@/components/ui/button";
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
export function Example() {
  return (
    <Card>
      <CardHeader>
        <CardTitle>Example Card</CardTitle>
      </CardHeader>
      <CardContent>
        <Button variant="default">Click me</Button>
      </CardContent>
    </Card>
  );
}Database & ORM
PostgreSQL database with Drizzle ORM for type-safe database queries.
Define Schema
import { pgTable, text, timestamp, uuid } from "drizzle-orm/pg-core";
export const users = pgTable("users", {
  id: uuid("id").defaultRandom().primaryKey(),
  email: text("email").notNull().unique(),
  name: text("name").notNull(),
  createdAt: timestamp("created_at").defaultNow().notNull(),
});Query Data
import { db } from "@/lib/db";
import { users } from "@/lib/schema";
import { eq } from "drizzle-orm";
const user = await db.query.users.findFirst({
  where: eq(users.email, "user@example.com"),
});Run Migrations
# Generate migration
pnpm db:generate
# Apply migration
pnpm db:migrateAdditional Features
Theme System
Beautiful dark mode support with automatic system preference detection.
Dashboard
Full-featured admin panel with user management and analytics.
Documentation
Built-in documentation system powered by Fumadocs.
Code Quality
Biome, TypeScript, and ESLint configured for consistent code style.
Monorepo
Organized workspace structure with Turborepo for efficient builds.
Desktop App
Build native desktop apps with Tauri integration.
All features are production-ready and follow industry best practices.