A modern monorepo containing the Git-Search application stack with Next.js frontend and FastAPI backend.
├── apps/
│ ├── web/ # Next.js frontend application
│ └── api/ # FastAPI backend application
├── packages/ # Shared packages (future use)
└── documentation/ # Project documentation
- Framework: Next.js 15 (App Router)
- Language: TypeScript
- Authentication: Clerk
- Database: Supabase
- Styling: Tailwind CSS v4
- UI Components: shadcn/ui
- AI Integration: Vercel AI SDK
- Theme System: next-themes
- Framework: FastAPI
- Language: Python 3.8+
- Database: Supabase / PostgreSQL
- Authentication: JWT with integration to Clerk
- Validation: Pydantic
Before you begin, ensure you have the following:
- Node.js 18+ and npm
- Python 3.8+ and pip
- A Clerk account for authentication
- A Supabase account for database
- Optional: OpenAI or Anthropic API key for AI features
- Generated project documents for best development experience
-
Clone the repository
git clone <repository-url> cd git-search-monorepo
-
Install dependencies
npm install
-
Start the web application
npm run dev:web
The web app will be available at http://localhost:3000
-
Start the API server (in a new terminal)
npm run dev:api
The API will be available at http://localhost:8000
-
Web app environment variables
cp apps/web/.env.example apps/web/.env.local # Edit apps/web/.env.local with your values
-
API environment variables
cp apps/api/.env.example apps/api/.env # Edit apps/api/.env with your values
npm run dev
- Start the web application (default)npm run dev:web
- Start the Next.js web applicationnpm run dev:api
- Start the FastAPI backendnpm run build
- Build the web applicationnpm run build:web
- Build the Next.js applicationnpm run build:api
- Build the FastAPI applicationnpm run lint
- Run ESLint on the web applicationnpm run type-check
- Run TypeScript type checking
- Go to Clerk Dashboard
- Create a new application
- Go to API Keys
- Copy the
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY
andCLERK_SECRET_KEY
- Go to Supabase Dashboard
- Create a new project
- Go to Authentication → Integrations → Add Clerk (for third-party auth)
- Go to Project Settings > API
- Copy the
Project URL
asNEXT_PUBLIC_SUPABASE_URL
- Copy the
anon
public key asNEXT_PUBLIC_SUPABASE_ANON_KEY
- Go to OpenAI Platform or Anthropic Console
- Create an API key
- Add to your environment variables
Create a .env.local
file in the root directory with the following variables:
# Clerk Authentication
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=your_publishable_key
CLERK_SECRET_KEY=your_secret_key
# Supabase
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
# AI Integration (Optional)
OPENAI_API_KEY=your_openai_api_key
ANTHROPIC_API_KEY=your_anthropic_api_key
- 🔐 Authentication with Clerk (middleware protection)
- 🗄️ Supabase Database with third-party auth integration
- 🤖 AI Chat Interface with OpenAI/Anthropic support
- 🎨 40+ shadcn/ui components (New York style)
- 🌙 Dark mode with system preference detection
- 🎯 Built-in setup dashboard with service status
- 🚀 App Router with Server Components
- 🔒 Row Level Security examples with Clerk user IDs
- 📱 Responsive design with TailwindCSS v4
- 🎨 Custom fonts (Geist Sans, Geist Mono, Parkinsans)
git-search-monorepo/
├── src/
│ ├── app/ # Next.js app router pages
│ │ ├── api/chat/ # AI chat API endpoint
│ │ ├── globals.css # Global styles with dark mode
│ │ ├── layout.tsx # Root layout with providers
│ │ └── page.tsx # Hero + setup dashboard
│ ├── components/ # React components
│ │ ├── ui/ # shadcn/ui components (40+)
│ │ ├── chat.tsx # AI chat interface
│ │ ├── theme-provider.tsx # Theme context
│ │ └── theme-toggle.tsx # Dark mode toggle
│ ├── lib/ # Utility functions
│ │ ├── supabase.ts # Supabase client with Clerk auth
│ │ ├── user.ts # User utilities
│ │ ├── utils.ts # General utilities
│ │ └── env-check.ts # Environment validation
│ └── middleware.ts # Clerk route protection
├── supabase/
│ └── migrations/ # Database migrations with RLS examples
├── CLAUDE.md # AI coding agent documentation
├── SUPABASE_CLERK_SETUP.md # Integration setup guide
└── components.json # shadcn/ui configuration
This starter includes modern Clerk + Supabase integration:
- Third-party auth (not deprecated JWT templates)
- Row Level Security policies using
auth.jwt() ->> 'sub'
for Clerk user IDs - Example migrations with various RLS patterns (user-owned, public/private, collaboration)
- Server-side client with automatic Clerk token handling
This project is optimized for development:
CLAUDE.md
- Comprehensive project context and patterns- Setup guides with detailed integration steps
- Example migrations with RLS policy templates
- Clear file structure and naming conventions
- TypeScript integration with proper type definitions
Project documentation is available in the documentation/
directory:
# Example structure
documentation/
├── project_requirements_document.md
├── app_flow_document.md
├── frontend_guideline_document.md
└── backend_structure_document.md
These documentation files can be used as a reference for your project's features and implementation details.
Contributions are welcome! Please feel free to submit a Pull Request.