This project is a personal website and portfolio built with Next.js 15, React 19, Tailwind CSS v4, Framer Motion for animations, and PayloadCMS as a headless CMS with PostgreSQL database (via Vercel Postgres).
- Modern, responsive UI with pixel art design elements
- Light/dark mode theming using CSS variables and next-themes
- Terminal-style interactions and AI chat assistance
- Interactive guest book system with comment moderation
- Uber delivery service portfolio with customer review system
- Animated page transitions and UI elements using Framer Motion
- Interactive code activity visualizations powered by WakaTime API
- Headless CMS for content management with PayloadCMS
- Advanced security features with Cloudflare Turnstile integration
- TypeScript for type safety
- Optimized image handling with Next.js Image component
- Comprehensive API routes with proper error handling and validation
src/app/(frontend): Frontend components, pages, API routes, styles, and utilitiescomponents/: UI components organized by featureguest-book/: Guest book system components (forms, sections)uber/: Uber delivery service portfolio componentswelcome/: Welcome page components including AI chat botcommon/terminal/: Terminal interface for AI chat
pages/: Page components for different routeswelcome/guest-book/: Digital guest book pageservices/uber/: Uber delivery service showcase
api/: API routes for the frontendai-chat/: AI chat bot API with security featuresquery-functions/: Data fetching functions for guest book and Uber comments
styles/: CSS modules and styling utilitieshooks/,contexts/,providers/: React patterns for state management
src/app/(payload): PayloadCMS admin panel and API routessrc/collections: PayloadCMS collection definitions (data models)GuestBookComments.ts: Guest book comment collectionUberComments.ts: Uber delivery service review collection
public: Static assets (fonts, images, pixel art)
next.config.mjs: Next.js configurationpostcss.config.mjs: PostCSS configuration for Tailwind CSS v4tsconfig.json: TypeScript configurationpackage.json: Project dependencies and scriptspayload.config.ts: PayloadCMS configurationdocker-compose.yml: Docker configuration for local development
The project uses PayloadCMS with these main collections:
- Users: Authentication and admin access with role-based permissions
- Media: Manages uploaded media files with metadata
- Posts: Blog posts with rich text content, categories, tags, and automatic read time calculation
- Guest Book Comments: User-submitted comments with moderation system and Turnstile verification
- Uber Comments: Customer reviews for delivery service with rating system and approval workflow
- Digital guest book where visitors can leave messages
- Comment moderation system with admin approval
- Cloudflare Turnstile integration for spam prevention
- Real-time display of approved comments
- Responsive design with pixel art aesthetics
- Professional delivery driver showcase
- Customer review and rating system (0.5 to 5 stars)
- Service statistics and professional gear display
- Comment submission with delivery type categorization
- Moderated review system for quality control
- Interactive AI assistant with terminal interface
- Command system with built-in help and utilities
- Natural language processing for portfolio inquiries
- Advanced security with Turnstile verification per message
- Markdown support for formatted responses
- XSS protection and input sanitization
- Node.js 20.2+ or 22.14+
- pnpm 9 or 10
- PostgreSQL database (or Docker for local setup)
Create a .env file with the following variables:
# Database
POSTGRES_URL=your_database_url
# PayloadCMS
PAYLOAD_SECRET=your_payload_secret
# Security
TURNSTILE_SECRET_KEY=your_turnstile_secret
NEXT_PUBLIC_TURNSTILE_SITE_KEY=your_turnstile_site_key
# AI Chat (Optional)
AI_CHAT_JWT_SECRET=your_jwt_secret
N8N_WEBHOOK_URL=your_n8n_webhook_url
# Email (Optional)
EMAIL_USER=your_email
EMAIL_PASS=your_email_password-
Clone the repository
git clone https://github.com/lst97/lst97-dev.git cd lst97-dev -
Install dependencies
pnpm install
-
Set up environment variables
cp .env.example .env
Update
.envwith your database connection details and other required variables. -
Start the development server
pnpm dev
-
Open http://localhost:3000 in your browser
For local development with Docker:
-
Make sure Docker and Docker Compose are installed
-
Update the
POSTGRES_URLin your.envfile -
Run the containers
docker-compose up -d
pnpm dev: Starts the development server with Turbopackpnpm devsafe: Cleans the Next.js cache and starts the development serverpnpm build: Builds the application for productionpnpm start: Starts the production serverpnpm lint: Runs the linterpnpm generate:types: Generates TypeScript types for PayloadCMS collections
The project features a comprehensive API architecture with:
/ai-chat: AI chat bot with JWT authentication and Turnstile verification/guest-book-comments: Guest book comment management/uber-comments: Uber delivery service review management/client-info: Client information gathering for security/wakatime/*: WakaTime integration for coding statistics
- Cloudflare Turnstile integration for spam prevention
- JWT authentication for AI chat services
- Input sanitization and XSS protection
- Rate limiting and abuse prevention
- IP address and user agent logging for moderation
- Zod schemas for all API inputs
- Comprehensive error handling
- Type-safe API responses
- Request/response standardization
The project uses a custom styling system with:
- Tailwind CSS v4 for utility classes
- CSS modules for component-specific styles
- Theme variables for light/dark mode in globals.css
- Custom utility classes for special effects
- Pixel art aesthetic with retro gaming inspiration
State is managed through a combination of:
- React hooks for local component state
- Context API for global state
- Zustand for more complex state management
- TanStack React Query for server state and caching
- Frontend: Next.js 15, React 19, Tailwind CSS v4, Framer Motion
- Backend: Next.js API Routes, PayloadCMS
- Database: PostgreSQL (via Vercel Postgres)
- AI Integration: Custom AI chat with n8n webhook integration
- Security: Cloudflare Turnstile, JWT authentication, Zod validation
- State Management: TanStack React Query, Zustand, React Context
- Deployment: Vercel (recommended)
- Package Manager: pnpm
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
MIT