Skip to content

bradb345/t3test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

220 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Create T3 App

This is a T3 Stack project bootstrapped with create-t3-app.

Getting Started

Prerequisites

  • Node.js (v18 or later)
  • npm or yarn
  • PostgreSQL database

Installation

  1. Clone the repository:
git clone <repository-url>
cd t3test
  1. Install dependencies:
npm install
  1. Set up environment variables: Create a .env file 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
  1. Start the database (if using Docker):
./start-database.sh
  1. Run database migrations:
npm run db:push
# or
npm run db:migrate
  1. Start the development server:
npm run dev

The application should now be running at http://localhost:3000.

Available Scripts

  • npm run dev - Start the development server
  • npm run build - Build the application for production
  • npm run start - Start the production server
  • npm run lint - Run ESLint
  • npm run db:push - Push database schema changes
  • npm run db:studio - Open Drizzle Studio for database management

What's next? How do I make an app with this?

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.

Learn More

To learn more about the T3 Stack, take a look at the following resources:

You can check out the create-t3-app GitHub repository — your feedback and contributions are welcome!

How do I deploy this?

Follow our deployment guides for Vercel, Netlify and Docker for more information.

Authentication

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

Protected Routes

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();

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages