Skip to content

trueLoving/Profiliuli

Repository files navigation

Profiliuli


About

Profiliuli is a modern, interactive portfolio website with a macOS-inspired interface, featuring dynamic video backgrounds and bilingual language support.

This project is based on macos-terminal-portfolio, built with Astro, React, and Tailwind CSS.

πŸ“› Project Name: Profiliuli

Name Origin: The name "Profiliuli" is derived from Profile + uli, following the naming convention of other projects in the portfolio (Pixuli, Stationuli). The "uli" suffix creates a consistent brand identity across projects.

Meaning:

  • Profile represents a personal profile or professional portfolio, emphasizing the project's core purpose of showcasing personal competitiveness, skills, and achievements.
  • The "uli" suffix maintains consistency with the existing project naming pattern, creating a cohesive brand identity.

Pronunciation: /ˈproʊfΙͺljuːli/

🎯 Core Features

  • macOS-style Interface: Dock, toolbar, draggable windows, Notes app, GitHub project viewer
  • Dynamic Video Backgrounds: Support for MP4 video wallpapers with automatic playback, loop, and mute
  • Bilingual Support: Full English/Chinese language switching with i18n support
  • Spotlight Search: Global search with fuzzy matching (Fuse.js), grouped results, and deep-linking
  • AI Terminal: Chat endpoint powered by Groq
  • Contact Form: In-app contact form modal that saves messages to Supabase Postgres
  • Admin Dashboard: Dedicated /admin route with username/password login

✨ Enhancements

Based on the original project, this version adds the following features:

1. Dynamic Video Background Support

  • Support for MP4 video files as wallpapers
  • Automatic playback, loop, and mute
  • Smooth transitions between backgrounds
  • Fallback to static images if video fails to load
  • Video files should be placed in public/background/video/

2. Complete Internationalization

  • English/Chinese (Simplified) language switching (default: English)
  • Language preference saved in localStorage
  • All UI elements and content support both languages
  • Configuration files organized by language: src/config/en/ and src/config/zh/
  • Easy to extend to additional languages

3. Multi-language Configuration System

  • Configuration files organized by language directory (src/config/en/ and src/config/zh/)
  • Supports localization of personal info, education, experience, skills, etc.
  • Unified configuration loader and React hooks

4. Server-side Locale Inference (SEO follows language)

  • Server infers locale via: query (?lang= / ?locale=) β†’ cookie (locale=) β†’ Accept-Language
  • SEO/OG meta tags are generated from getUserConfig(locale) on the server

5. Localized Resume PDFs

  • English: /resume/resume-en.pdf
  • Chinese: /resume/resume-zh.pdf

πŸ› οΈ Tech Stack

  • Astro β€” Content-focused web framework
  • React β€” UI interactivity
  • Tailwind CSS β€” Utility-first styling
  • TypeScript β€” Type safety
  • Vercel β€” Hosting and analytics
  • Supabase β€” Database and contact form storage
  • Groq β€” AI terminal chat service

πŸš€ Quick Start

1. Clone Repository

git clone https://github.com/your-username/portfolio
cd portfolio

2. Install Dependencies

pnpm install

3. Configure Environment Variables

Copy .env.example to .env and fill in (see .env.example for detailed comments):

# AI Terminal
GROQ_API_KEY=your_groq_api_key_here

# Site
PUBLIC_SITE_URL=https://your-domain.tld

# Supabase (server-only; do NOT expose in PUBLIC_ vars)
SUPABASE_URL=https://YOUR-PROJECT.supabase.co
SUPABASE_SERVICE_ROLE_KEY=your_service_role_key

# Admin dashboard credentials (server-only)
ADMIN_USERNAME=admin
ADMIN_PASSWORD=change_me

4. Create Database Table

Run this SQL in the Supabase SQL editor:

create table if not exists public.contact_messages (
    id uuid primary key default gen_random_uuid(),
    created_at timestamptz not null default now(),
    name text not null,
    email text not null,
    message text not null,
    time_on_page int,
    ip text,
    user_agent text
);

-- Enable RLS and do NOT add anon policies (server-only access via service_role)
alter table public.contact_messages enable row level security;

5. Configure Personal Information

Configuration files are located in src/config/ directory, organized by language:

English Configuration (src/config/en/):

  • personal.ts β€” Personal information (name, role, location, website)
  • education.ts β€” Education background
  • experience.ts β€” Work experience
  • skills.ts β€” Skills list
  • site.ts β€” SEO and theme configuration
  • social.ts β€” Social media links
  • contact.ts β€” Contact information
  • projects.ts β€” Project configuration
  • apps.ts β€” Resume and Spotify configuration

Chinese Configuration (src/config/zh/):

  • Same structure as English configuration, with Chinese translations

6. Add Background Resources

  • Static Images: Place in public/background/images/ directory
  • Video Files: Place in public/background/video/ directory (MP4 format)
  • Background config: Manage available backgrounds in src/config/background.ts (no hardcoding in pages)

πŸ’» Development

Start Development Server

pnpm run dev

The development server will start at http://localhost:4321.

Build for Production

pnpm run build

Preview Production Build

pnpm run preview

πŸš€ Deployment

Deploy to Vercel

Method 1: Using Vercel CLI (Recommended)

  1. Build the project
pnpm run build
  1. Deploy to production
npx vercel deploy --prod

Or deploy to preview first:

npx vercel deploy

Then select the deployment from the Vercel dashboard.

Method 2: Automatic Deployment via GitHub

  1. Push code to GitHub
  2. Connect the repository in Vercel
  3. Configure environment variables (see below)
  4. Vercel will deploy automatically

Note: If GitHub auto-deployment has issues, use Method 1 (CLI deployment).

Environment Variables

Configure in Vercel Project Settings β†’ Environment Variables:

Required Variables:

  • PUBLIC_SITE_URL β€” Production URL (e.g., https://your-domain.tld)
  • GROQ_API_KEY β€” Groq API key (for AI Terminal)

Optional Variables (for contact form and admin dashboard):

  • SUPABASE_URL β€” Supabase project URL
  • SUPABASE_SERVICE_ROLE_KEY β€” Supabase service role key
  • ADMIN_USERNAME β€” Admin dashboard username
  • ADMIN_PASSWORD β€” Admin dashboard password

Deployment Tips

  • Ensure all environment variables are properly configured
  • Check that PUBLIC_SITE_URL is correct, as this affects SEO and Open Graph links
  • If using a custom domain, configure DNS records in Vercel

πŸ“ Project Structure

β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/      # React components
β”‚   β”‚   └── global/      # Global components (Dock, Toolbar, Spotlight, etc.)
β”‚   β”œβ”€β”€ layouts/         # Astro/React layouts
β”‚   β”œβ”€β”€ pages/           # Astro pages (includes API routes)
β”‚   β”œβ”€β”€ config/          # Configuration files
β”‚   β”‚   β”œβ”€β”€ en/          # English configuration
β”‚   β”‚   β”œβ”€β”€ zh/          # Chinese configuration
β”‚   β”‚   β”œβ”€β”€ loader.ts    # Configuration loader
β”‚   β”‚   └── hooks.tsx    # React hooks
β”‚   β”œβ”€β”€ i18n/            # Internationalization
β”‚   β”‚   β”œβ”€β”€ locales/     # Language files (en.json, zh-CN.json)
β”‚   β”‚   └── context.tsx   # i18n Context
β”‚   β”œβ”€β”€ types/           # TypeScript type definitions
β”‚   └── styles/          # Global styles
β”œβ”€β”€ public/              # Public assets
β”‚   └── background/      # Background resources (images and videos)
β”œβ”€β”€ util/                # Utility scripts
└── astro.config.mjs     # Astro configuration

⌨️ Keyboard Shortcuts

  • Cmd/Ctrl + K β€” Open Spotlight search
  • ? β€” Show shortcuts overlay
  • Ctrl/Cmd + ↑ or F3 β€” Open Mission Control
  • Cmd/Ctrl + C β€” Open Contact form

πŸ”§ Configuration

Multi-language Configuration

Configuration files are organized by language in src/config/en/ and src/config/zh/:

  • Localized Content: personal.ts, education.ts, experience.ts, skills.ts, site.ts, apps.ts (resume)
  • Non-localized Content: social.ts, contact.ts, projects.ts, spotify (loaded from src/config/en/ only)

Using Configuration

In React Components:

import { useUserConfig } from '../../config/hooks';

function MyComponent() {
  const userConfig = useUserConfig(); // Automatically loads config based on current language
  // ...
}

In Astro Pages (server-side, locale-aware):

import { getUserConfig } from '../config/loader';
import { inferServerLocale } from '../i18n/server';

const url = new URL(Astro.request.url);
const locale = inferServerLocale({ request: Astro.request, url });
const config = getUserConfig(locale); // 'en' | 'zh-CN'

πŸ“ Features

  • βœ… macOS-style interface (Dock, toolbar, draggable windows)
  • βœ… Dynamic video background support
  • βœ… English/Chinese bilingual switching
  • βœ… Spotlight global search
  • βœ… Mission Control window management
  • βœ… AI Terminal chat
  • βœ… Contact form (Supabase storage)
  • βœ… Admin dashboard
  • βœ… Responsive design
  • βœ… SEO optimization
  • βœ… Accessibility support

πŸ“œ Acknowledgments

  • Original Project: macos-terminal-portfolio
  • Original Author: Johnny Culbreth (Austin, TX)
  • Modified by: aabdoo23 (Giza, Egypt)
  • Enhanced by: trueLoving - Added dynamic video backgrounds and bilingual language support

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ“ž Support

δΈ­ζ–‡ζ–‡ζ‘£ | English

About

πŸ–₯️ macOS Portfolio - Dynamic video backgrounds, bilingual switching, and interactive macOS-style interface.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors