Hilariously deceptive landing page for an AI course. A modern, full-stack web application built with Next.js 14, React 18, TypeScript, and Prisma ORM. This project features a comprehensive UI component library, authentication system, data visualization capabilities, and cloud storage integration. Note: This is a joke project. No actual AI course exists.
- Features
- Tech Stack
- Prerequisites
- Installation
- Environment Setup
- Database Setup
- Running the Application
- Available Scripts
- Project Structure
- Key Dependencies
- Development Guidelines
- Troubleshooting
- Browser Support
- Modern UI Components: Built with Radix UI primitives and styled with Tailwind CSS
- Authentication: NextAuth.js integration with Prisma adapter
- Data Visualization: Multiple charting libraries (Chart.js, Recharts, Plotly.js)
- Form Management: React Hook Form with Yup and Zod validation
- State Management: Zustand, Jotai, and TanStack Query
- Cloud Storage: AWS S3 integration for file uploads
- Animations: Framer Motion for smooth transitions
- Dark Mode: Theme switching with next-themes
- Type Safety: Full TypeScript support
- Database ORM: Prisma with PostgreSQL
- Next.js 14.2.28 - React framework with App Router
- React 18.2.0 - UI library
- TypeScript 5.2.2 - Type safety
- Tailwind CSS 3.3.3 - Utility-first CSS framework
- Tailwind Animate - Animation utilities
- PostCSS - CSS processing
- Class Variance Authority - Component variants
- clsx - Conditional classnames
- Radix UI - Accessible component primitives (20+ components)
- Lucide React - Icon library
- Magic UI - Additional UI components
- Headless UI - Unstyled accessible components
- React Hook Form 7.53.0 - Form state management
- Yup 1.3.0 - Schema validation
- Zod 3.23.8 - TypeScript-first schema validation
- Formik 2.4.5 - Alternative form library
- Zustand 5.0.3 - Lightweight state management
- Jotai 2.6.0 - Atomic state management
- TanStack Query 5.0.0 - Server state management
- SWR 2.2.4 - Data fetching hooks
- Chart.js 4.4.9 - Canvas-based charts
- React Chart.js 2 - React wrapper for Chart.js
- Recharts 2.15.3 - Composable charting library
- Plotly.js 2.35.3 - Scientific charting
- React Plotly.js - React wrapper for Plotly
- Prisma 6.7.0 - Next-generation ORM
- @prisma/client - Prisma client
- NextAuth.js 4.24.11 - Authentication solution
- bcryptjs - Password hashing
- jsonwebtoken - JWT tokens
- AWS SDK S3 - S3 file storage
- AWS S3 Request Presigner - Presigned URL generation
- date-fns 3.6.0 - Date manipulation
- dayjs 1.11.13 - Date library
- lodash 4.17.21 - Utility functions
- gray-matter - Front matter parsing
- csv 6.3.11 - CSV parsing
- ESLint 9.24.0 - Code linting
- TypeScript ESLint - TypeScript linting
- Prettier - Code formatting
- ts-node - TypeScript execution
- tsx - TypeScript runner
Before you begin, ensure you have the following installed:
- Node.js: Version 16.x or higher (recommended: 18.x or 20.x)
- Yarn: Version 1.22.x or higher (preferred package manager)
- PostgreSQL: Version 12.x or higher
- Git: For version control
-
Clone the repository
git clone <repository-url> cd pyramid-lading-page
-
Install dependencies
Important: This project uses Yarn. Do NOT use npm due to peer dependency conflicts.
yarn install
If you encounter the error
ERESOLVE unable to resolve dependency treewith npm, it's because ESLint 9.24.0 is incompatible with @typescript-eslint/parser@7.0.0. Use Yarn instead.
-
Create environment file
Create a
.envfile in the root directory:touch .env
-
Configure environment variables
Add the following variables to your
.envfile:# Database DATABASE_URL="postgresql://username:password@localhost:5432/database_name" # NextAuth NEXTAUTH_URL="http://localhost:3000" NEXTAUTH_SECRET="your-secret-key-here" # AWS S3 (if using file uploads) AWS_ACCESS_KEY_ID="your-aws-access-key" AWS_SECRET_ACCESS_KEY="your-aws-secret-key" AWS_REGION="us-east-1" AWS_S3_BUCKET_NAME="your-bucket-name" # Optional: Additional configuration NODE_ENV="development"
Generate NEXTAUTH_SECRET:
openssl rand -base64 32
-
Ensure PostgreSQL is running
# Check PostgreSQL status pg_isready -
Create database
createdb your_database_name
-
Generate Prisma Client
npx prisma generate
-
Run database migrations
npx prisma migrate dev
-
Seed database (if seed script exists)
yarn prisma db seed
-
Open Prisma Studio (optional)
npx prisma studio
This opens a GUI at
http://localhost:5555to view and edit your database.
Start the development server with hot-reload:
yarn devThe application will be available at http://localhost:3000
-
Build the application
yarn build
-
Start production server
yarn start
The optimized production build will run at http://localhost:3000
| Command | Description |
|---|---|
yarn dev |
Start development server with hot-reload |
yarn build |
Create optimized production build |
yarn start |
Start production server (requires build first) |
yarn lint |
Run ESLint to check code quality |
npx prisma generate |
Generate Prisma Client |
npx prisma migrate dev |
Run database migrations in development |
npx prisma migrate deploy |
Run database migrations in production |
npx prisma studio |
Open Prisma Studio GUI |
npx prisma db seed |
Seed database with initial data |
pyramid-lading-page/
├── app/ # Next.js App Router directory
│ ├── components/ # Route-specific components
│ ├── globals.css # Global styles
│ ├── layout.tsx # Root layout
│ └── page.tsx # Home page
├── components/ # Reusable React components
├── hooks/ # Custom React hooks
├── lib/ # Utility functions and configurations
├── prisma/ # Prisma schema and migrations
│ └── schema.prisma # Database schema
├── public/ # Static assets
├── node_modules/ # Dependencies (auto-generated)
├── .env # Environment variables (create this)
├── components.json # Shadcn UI configuration
├── next.config.js # Next.js configuration
├── package.json # Project dependencies and scripts
├── postcss.config.js # PostCSS configuration
├── tailwind.config.ts # Tailwind CSS configuration
├── tsconfig.json # TypeScript configuration
└── yarn.lock # Yarn lock file
- Radix UI: Provides 20+ accessible, unstyled component primitives
- Lucide React: 1000+ consistent icons
- Framer Motion: Production-ready animation library
- React Hook Form: Performant form validation
- Yup & Zod: Schema validation with TypeScript support
- Zustand: Simple, fast state management
- Jotai: Primitive and flexible state management
- TanStack Query: Async state management for server data
- Chart.js: Simple yet flexible charting
- Recharts: Composable React charts
- Plotly.js: Advanced scientific visualization
- NextAuth.js: Complete authentication solution
- bcryptjs: Secure password hashing
- JWT: Token-based authentication
- Follow TypeScript best practices
- Use ESLint and Prettier for consistent formatting
- Run
yarn lintbefore committing
- Use Radix UI primitives for accessible components
- Style with Tailwind CSS utility classes
- Create reusable components in
/componentsdirectory
- Use Zustand for global client state
- Use TanStack Query for server state
- Use React Hook Form for form state
- Modify
prisma/schema.prisma - Run
npx prisma migrate dev --name description - Commit both schema and migration files
- Never commit
.envfile - Document all required variables
- Use
.env.examplefor reference
1. Dependency Installation Errors
# Clear cache and reinstall
rm -rf node_modules yarn.lock
yarn install2. Database Connection Issues
- Verify PostgreSQL is running
- Check DATABASE_URL in
.env - Ensure database exists
3. Prisma Client Errors
# Regenerate Prisma Client
npx prisma generate4. Build Errors
# Clear Next.js cache
rm -rf .next
yarn build5. Port Already in Use
# Use different port
yarn dev -p 30016. TypeScript Errors
# Check TypeScript configuration
npx tsc --noEmit- Check Next.js documentation: https://nextjs.org/docs
- Check Prisma documentation: https://www.prisma.io/docs
- Check component documentation: https://ui.shadcn.com
This application supports:
- Internet Explorer 11+
- Last 2 versions of major browsers
- Browsers with >0.5% market share
- Actively maintained browsers
Configured in package.json browserslist.
Note: This is a private project. For questions or contributions, please contact the project maintainer.