Skip to content

techfreaque/my-next-js-page

Repository files navigation

πŸš€ Max's Portfolio - AI-Powered Next.js Website

Next.js TypeScript AI Models Bun

Production-ready portfolio showcasing senior full-stack development skills with advanced AI integration

🌟 Live Demo β€’ ⚑ Quick Start β€’ πŸ—οΈ Tech Stack


🎯 Features

  • AI Chat System: Interactive assistant with 10 different AI models and 6 personality tones
  • Modern Stack: Next.js 15, React 19, TypeScript, Tailwind CSS 4
  • Production Ready: 100% TypeScript, comprehensive ESLint rules, optimized build
  • High Performance: <300kB bundle, fast builds with Bun, optimized for production
  • Advanced UI: Custom design system with rainbow gradients, dark/light themes, responsive design
  • Clean Architecture: Well-documented, type-safe, modular component structure
  • Customizable: Fork and adapt for your own portfolio

⚑ Quick Start

git clone https://github.com/techfreaque/my-next-js-page
cd my-next-js-page
bun install
bun dev

Note: This project uses Bun for optimal performance. You can also use npm, pnpm, yarn etc. if preferred.

To customize for your own portfolio:

  1. Fork this repository
  2. Edit files in src/me/ with your information
  3. Replace images in public/ and src/
  4. Add your OPENROUTER_API_KEY to .env.local
  5. Customize AI models and tones in src/utils/
  6. Deploy with Docker or Vercel

πŸ—οΈ Tech Stack

Core Technologies

  • Next.js 15 - Awesome DX, React SSR and client hydration for a fast site and built in api server
  • React 19 - Latest features with concurrent rendering and compiler
  • TypeScript 5.9 - Strict type safety throughout
  • Tailwind CSS 4 - Modern utility-first styling with CSS variables
  • Bun - Ultra-fast JavaScript runtime and package manager

AI Integration

  • OpenRouter API - Access to 10 selected AI models from different providers
  • AI SDK - Vercel AI SDK for the backend with custom React hooks for streaming
  • Multiple Providers - OpenAI, Google, Mistral, DeepSeek, X-AI, Alibaba, MoonshotAI
  • Tone System - 6 different AI personalities (Professional, Pirate, Enthusiastic, Zen, Detective, Shakespearean)
  • Cost Optimization - Mix of cheap premium and free models, because why not
  • Real-time Streaming - Live response streaming with abort controllers
  • Local Storage as DB - Input and messages are always in sync with with local storage. For this purpose its perfectly fine, as I want to avoid a DB for this project.

UI & Design System

  • UI Components - Shared UI library with consistent styling, some based on shadcn
  • Rainbow Gradients - Dynamic color system with CSS variables
  • Dark/Light Themes - Complete theme system with next-themes
  • Responsive Design - Optimal design for any screen size with tailwind breakpoints
  • Animations - Smooth transitions and hover effects

Quality & Performance

  • ESLint - Comprehensive linting rules
  • TypeScript Strict Mode - Maximum type safety
  • Bundle Size - <300kB optimized production build
  • Build Performance - ~9 second builds with Bun
  • Documentation - JSDoc comments throughout codebase

πŸ“ Project Structure

src/
β”œβ”€β”€ app/                    # Next.js App Router
β”‚   β”œβ”€β”€ api/chat/          # AI chat API endpoint with streaming
β”‚   β”œβ”€β”€ globals.css        # Global styles and CSS variables
β”‚   β”œβ”€β”€ layout.tsx         # Root layout with theme provider
β”‚   └── page.tsx           # Main portfolio page
β”œβ”€β”€ components/            # React components
β”‚   β”œβ”€β”€ ai-chat-section/   # Complete AI chat system
β”‚   β”‚   β”œβ”€β”€ components/    # Chat UI components
β”‚   β”‚   β”œβ”€β”€ hooks/         # Custom React hooks
β”‚   β”‚   └── AIChatContext.tsx # Chat state management
β”‚   β”œβ”€β”€ navbar/            # Navigation with responsive design
β”‚   β”œβ”€β”€ footer/            # Footer with social links
β”‚   β”œβ”€β”€ loading-cat/       # Animated loading component
β”‚   β”œβ”€β”€ ui/                # Shared UI component library
β”‚   └── [section].tsx      # other portfolio sections
β”œβ”€β”€ lib/                   # Core utilities
β”‚   β”œβ”€β”€ constants.ts       # App constants
β”‚   β”œβ”€β”€ rainbow-style.ts   # Rainbow gradient system
β”‚   β”œβ”€β”€ api-validation.ts  # Zod schemas
β”‚   └── utils.ts           # Helper functions
β”œβ”€β”€ me/                    # Personal info (customize this!)
β”‚   β”œβ”€β”€ about-me.tsx       # Personal details & story
β”‚   β”œβ”€β”€ projects.tsx       # Portfolio projects
β”‚   β”œβ”€β”€ resume.tsx         # Work experience & education
β”‚   └── metadata.ts        # SEO metadata
└── utils/                 # AI system configuration
    β”œβ”€β”€ model-config.ts    # AI model definitions
    β”œβ”€β”€ tone-config.ts     # Personality configurations
    └── system-prompt.ts   # AI system prompts

🎨 Customization

Personal Information

All personal data is centralized in src/me/:

  • about-me.tsx - Contact details, personal story, social links
  • projects.tsx - Portfolio projects with descriptions and tech stacks
  • resume.tsx - Work experience, education, and skills organized by learning journey
  • metadata.ts - SEO metadata and site configuration

AI System Configuration

Customize the AI chat system in src/utils/:

Add new AI models in model-config.ts:

{
  id: ModelId.YOUR_MODEL,
  name: "Your Model",
  provider: "Provider",
  description: "Model description",
  parameterCount: 70,
  contextWindow: 100000,
  icon: "πŸ€–", // or React component
  openRouterModel: "provider/model-name",
}

Add new personality tones in tone-config.ts:

{
  id: ToneId.YOUR_TONE,
  name: "Your Tone",
  description: "Tone description",
  systemPromptModifier: "Instructions for AI behavior...",
  emoji: "🎭",
}

UI Customization

  • Colors: Modify CSS variables in src/app/globals.css
  • Components: Customize shared components in src/components/ui/
  • Themes: Extend the theme system in the globals.css file
  • Animations: Adjust rainbow gradients in src/lib/rainbow-style.ts

Development

Available Scripts

# Development with Turbo (recommended)
bun dev

# Production build
bun run build

# Start production server
bun start

# Lint and fix code issues
bun lint

# Type checking
bun typecheck

Development Tips

  • Use bun dev for the fastest development experience with Turbo
  • Run bun run build before committing for typecheck and lint
  • The project uses strict TypeScript - all types must be properly defined
  • Components are organized by feature with shared UI components in src/components/ui/

οΏ½πŸš€ Deployment

Vercel (the easy way)

  1. Push to GitHub
  2. Connect to Vercel
  3. Add OPENROUTER_API_KEY environment variable
  4. Deploy!

Docker

docker build -t portfolio .
docker run -p 3000:3000 -e OPENROUTER_API_KEY=your_key portfolio

πŸ“ License

GPL-V3 License - see LICENSE for details.


Built with ❀️ and lots of β˜• by Max Brandstaetter

A production-ready portfolio template for the modern web

⭐ Star this repo if it helped you! ⭐

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published