This project uses the following technologies:
- Next.js 15 - React framework. For more information about this technology, check out its documentation Next.js 15 check out the documentation at https://nextjs.org/docs
- tRPC - End-to-end typesafe APIs. For more information about this technology, check out its documentation tRPC check out the documentation at https://trpc.io
- Better Auth - Authentication. For more information about this technology, check out its documentation Better Auth check out the documentation at https://better-auth.com
- Drizzle ORM - TypeScript ORM for SQL databases. For more information about this technology, check out its documentation Drizzle ORM check out the documentation at https://orm.drizzle.team
- PostgreSQL - Database. For more information about this technology, check out its documentation PostgreSQL check out the documentation at https://postgresql.org
- AWS S3 - File storage and uploads. For more information about this technology, check out its documentation AWS S3 check out the documentation at https://aws.amazon.com/s3
- Polar - Payment processing. For more information about this technology, check out its documentation Polar check out the documentation at https://polar.sh
- Tailwind CSS - Styling. For more information about this technology, check out its documentation Tailwind CSS check out the documentation at https://tailwindcss.com
- TypeScript - Static type checking. For more information about this technology, check out its documentation TypeScript check out the documentation at https://typescriptlang.org
The project follows a standard Next.js 15 App Router structure with additional configurations for the tech stack:
βββ drizzle/ # Database migrations and metadata
βββ public/ # Static assets (images, icons, etc.)
βββ src/ # Main source code directory
βββ drizzle.config.ts # Drizzle ORM configuration
βββ next.config.ts # Next.js configuration
βββ package.json # Dependencies and scripts
βββ docker-compose.yml # Docker services (likely PostgreSQL)
βββ tsconfig.json # TypeScript configuration
src/
βββ app/ # Next.js App Router - pages and layouts
β βββ api/ # API routes
β β βββ auth/ # Authentication endpoints (Better Auth)
β β βββ trpc/ # tRPC API endpoints
β βββ demo-trpc/ # tRPC demonstration pages
β βββ demo-trpc-protected/ # Protected tRPC demo pages
β βββ login/ # Login page
β βββ signup/ # Signup page
β βββ layout.tsx # Root layout component
β βββ page.tsx # Home page
β βββ globals.css # Global styles
βββ components/ # Reusable React components
β βββ login.tsx # Login form component
β βββ logout.tsx # Logout component
β βββ signup.tsx # Signup form component
βββ db/ # Database configuration and schema
β βββ index.ts # Database connection
β βββ schema.ts # Drizzle schema definitions
β βββ clear.ts # Database utilities
βββ lib/ # Utility functions and configurations
β βββ auth.ts # Better Auth configuration
β βββ auth-client.ts # Client-side auth utilities
β βββ s3.ts # AWS S3 configuration
βββ trpc/ # tRPC setup and configuration
βββ client.tsx # tRPC client setup
βββ init.ts # tRPC initialization
βββ query-client.ts # React Query client
βββ server.ts # tRPC server setup
βββ routers/ # tRPC API route definitions
βββ _app.ts # Main tRPC router
- App Router: Uses Next.js 15 App Router for file-based routing
- API Routes: Located in
src/app/api/for server-side endpoints - Components: Reusable UI components in
src/components/ - Database: Drizzle ORM with schema in
src/db/schema.ts - Authentication: Better Auth setup in
src/lib/auth.ts - tRPC: Type-safe API with routers in
src/trpc/routers/ - File Storage: AWS S3 integration in
src/lib/s3.ts