This is a T3 Stack project bootstrapped with create-t3-app.
- Node.js (v18 or later)
- npm or yarn
- PostgreSQL database
- Clone the repository:
git clone <repository-url>
cd t3test- Install dependencies:
npm install- Set up environment variables:
Create a
.envfile in the root directory with the following variables:
# Database
DATABASE_URL="postgresql://user:password@localhost:5432/database_name"
# Clerk Authentication
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=your_clerk_publishable_key
CLERK_SECRET_KEY=your_clerk_secret_key
# UploadThing
UPLOADTHING_SECRET=your_uploadthing_secret
UPLOADTHING_APP_ID=your_uploadthing_app_id- Start the database (if using Docker):
./start-database.sh- Run database migrations:
npm run db:push
# or
npm run db:migrate- Start the development server:
npm run devThe application should now be running at http://localhost:3000.
npm run dev- Start the development servernpm run build- Build the application for productionnpm run start- Start the production servernpm run lint- Run ESLintnpm run db:push- Push database schema changesnpm run db:studio- Open Drizzle Studio for database management
We try to keep this project as simple as possible, so you can start with just the scaffolding we set up for you, and add additional things later when they become necessary.
If you are not familiar with the different technologies used in this project, please refer to the respective docs. If you still are in the wind, please join our Discord and ask for help.
To learn more about the T3 Stack, take a look at the following resources:
- Documentation
- Learn the T3 Stack — Check out these awesome tutorials
You can check out the create-t3-app GitHub repository — your feedback and contributions are welcome!
Follow our deployment guides for Vercel, Netlify and Docker for more information.
This project uses Clerk for authentication and user management. Clerk provides:
- Email and password authentication
- Social login providers
- User profile management
- Session management
- Role-based access control (RBAC)
- Organization management
To protect routes and components, you can use Clerk's built-in components and helpers:
// Server-side
import { auth } from "@clerk/nextjs";
const { userId, sessionId, orgId } = await auth();
// Client-side
import { useUser, useAuth } from "@clerk/nextjs";
const { user } = useUser();
const { userId, sessionId } = useAuth();