A modern AI chat application built with React, tRPC, Express.js and Vercel AI SDK.
This project began as an exploration into technologies I hadn’t used before, including:
- Express.js
- tRPC
- Tailwind CSS
- shadcn/ui
- Vercel AI SDK
- Turborepo (monerepos)
I was also curious to see how modern AI tools and workflows perform in a greenfield project, since most of my professional experience has been with legacy applications. Inspired by the amazing t3.chat—though this is a humble and much simpler imitation.
While it started as a learning project, my hope is to grow it into a comprehensive platform for prompt engineering and agent/assistant development.
- 🚀 Modern Tech Stack: Built with TypeScript, React, React Native, tRPC, Express.js.
- 📱 Mobile App: React Native app, Paper UI, and React Navigation.
- 🤖 AI Integration: Powered by Vercel AI SDK.
- 🔐 Authentication: Secure user authentication with Clerk
- 🗄️ Database: PostgreSQL with Drizzle ORM for type-safe database operations
- 🏗️ Monorepo: Organized with Turborepo for efficient development
- Node.js 18+
- pnpm
- PostgreSQL database
- Clone the repository:
git clone https://github.com/yourusername/prompt-dev.git
cd prompt-dev
- Install dependencies:
pnpm install
- Set up environment variables:
# Copy the example environment file
cp apps/api/.env.example apps/api/.env
- Configure your environment variables in
apps/api/.env
:
PORT=3001
DATABASE_URL=postgresql://username:password@localhost:5432/prompt_dev
OPENAI_API_KEY=your_openai_api_key
CLERK_PUBLISHABLE_KEY=your_clerk_publishable_key
CLERK_SECRET_KEY=your_clerk_secret_key
- Run database migrations:
cd apps/api
pnpm db:migrate
- Start the development servers:
# From the root directory
pnpm dev
The web app will be available at http://localhost:5173
and the API at http://localhost:3001
.
This project is organized as a monorepo with the following structure:
apps/web
: React frontend application built with Viteapps/api
: Express.js backend with tRPC endpointsapps/mobile
: React Native mobile app, Paper UI, and React Navigationpackages/shared-types
: Shared TypeScript types and schemaspackages/trpc-api
: tRPC router definitionspackages/eslint-config
: Shared ESLint configurationspackages/typescript-config
: Shared TypeScript configurationspackages/prettier-config
: Shared Prettier configurations
├── apps/
│ ├── api/ # Express.js backend
│ ├── web/ # React frontend
│ └── mobile/ # React Native mobile app
├── packages/
│ ├── shared-types/ # Shared TypeScript types
│ ├── trpc-api/ # tRPC router definitions
│ └── config/ # Shared configurations
└── docs/ # Documentation
The mobile app is built with React Native and Material Design 3, using React Native Paper and React Navigation for UI and navigation. It shares types and API logic with the web and API apps via workspace packages.
- Material Design 3 theming using Paper UI components
- Drawer and tab navigation structure
- Shared authentication (Clerk) and API logic with the Web
- Install dependencies:
cd apps/mobile pnpm install
- Start the Metro bundler:
pnpm start
- Run on your device/emulator (using Expo or React Native CLI):
pnpm android # for Android pnpm ios # for iOS
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with Turborepo
- UI components from shadcn/ui
- AI capabilities powered by Vercel AI SDK
- Authentication by Clerk
- Inspired by t3.chat