A modern, full-stack portfolio website built with Next.js 15, featuring dynamic content management, user authentication, and interactive components.
- Responsive design with mobile-first approach
- Dark/light mode support
- Smooth animations and transitions
- Gradient text effects and modern styling
- Interactive hover effects and micro-interactions
- Home: Introduction, about section, and technology showcase
- Projects: Dynamic project gallery with Sanity CMS integration
- Certificates: Professional certifications and achievements display
- Guestbook: Interactive message board with user authentication
- Kinde Auth integration for secure user management
- XSS protection for user-generated content
- Input validation and sanitization
- Secure API routes with proper error handling
- PostgreSQL database with Prisma ORM
- Sanity CMS for content management
- Real-time data fetching with caching
- Optimized database queries
- TypeScript for type safety
- ESLint configuration for code quality
- Winston logging system
- Hot reload with Turbopack
- Comprehensive error handling
- Framework: Next.js 15 with App Router
- Language: TypeScript
- Styling: Tailwind CSS 4.0
- UI Components: Radix UI primitives
- Icons: Lucide React
- Animations: Tailwind CSS Animate
- Database: PostgreSQL
- ORM: Prisma
- Authentication: Kinde Auth
- CMS: Sanity
- API: Next.js API Routes
- Package Manager: npm
- Linting: ESLint
- Logging: Winston with daily rotation
- Build Tool: Turbopack
- Security: XSS protection
- Node.js 18+
- PostgreSQL database
- Sanity account
- Kinde Auth account
-
Clone the repository
git clone https://github.com/Haoming9527/portfolio.git cd portfolio
-
Install dependencies
npm install
-
Environment Setup Create a
.env.local
file in the root directory:# Database DATABASE_URL="postgresql://username:password@localhost:5432/portfolio" # Kinde Auth KINDE_CLIENT_ID=your_kinde_client_id KINDE_CLIENT_SECRET=your_kinde_client_secret KINDE_ISSUER_URL=https://your-domain.kinde.com KINDE_SITE_URL=http://localhost:3000 KINDE_POST_LOGOUT_REDIRECT_URL=http://localhost:3000 KINDE_POST_LOGIN_REDIRECT_URL=http://localhost:3000 # Sanity NEXT_PUBLIC_SANITY_PROJECT_ID=your_sanity_project_id NEXT_PUBLIC_SANITY_DATASET=production SANITY_API_TOKEN=your_sanity_api_token
-
Database Setup
npx prisma generate npx prisma db push
-
Run the development server
npm run dev
-
Open your browser Navigate to http://localhost:3000
portfolio/
βββ app/ # Next.js App Router
β βββ api/ # API routes
β βββ components/ # React components
β βββ lib/ # Utility functions
β βββ projects/ # Projects page
β βββ certificates/ # Certificates page
β βββ guestbook/ # Guestbook page
βββ components/ # Shared UI components
βββ lib/ # Generated Prisma client
βββ prisma/ # Database schema
βββ sanity/ # Sanity CMS configuration
βββ public/ # Static assets
npm run dev
- Start development server with Turbopacknpm run build
- Build for productionnpm run start
- Start production servernpm run lint
- Run ESLintnpx prisma studio
- Open Prisma Studionpx prisma generate
- Generate Prisma client
- Create a new Sanity project
- Configure schemas for projects and certificates
- Add your Sanity credentials to environment variables
- Create a Kinde account
- Set up your application
- Configure redirect URLs
- Add credentials to environment variables
- Push your code to GitHub
- Connect your repository to Vercel
- Add environment variables
- Deploy!
The application can be deployed on any platform that supports Next.js:
- Netlify
- Railway
- DigitalOcean App Platform
- AWS Amplify
This project is licensed under the MIT License - see the LICENSE file for details.
β Star this repository if you found it helpful! This repository contains the source code for a personal portfolio website designed to showcase projects, skills, and professional experience. The website is built using modern web technologies to ensure a responsive, user-friendly, and visually appealing presentation.