Sign inSign up

world56/website

By world56

Updated 5 months ago

Simple and beautiful personal homepage.快速、简约风格的个人主页。

Image
Web servers
Content management system
1

2.1K

world56/website repository overview

English · 中文

Personal Website

A fast and minimalist personal homepage

Home

Home

✨ Tech Stack

  • 🍔 Next.JS (Actions)
  • 🥪 TypeScript
  • 📦 React Query
  • 🧑‍🎨 Tailwind CSS (shadcn/ui)
  • 🍟 Prisma (MySQL)

💡 Highlights

  • 📱 Mobile-friendly
    Responsive layout that supports low-resolution devices.

  • 🌗 Light/Dark Theme Support
    Automatically switches between light and dark themes based on system settings.

  • 📖 Multilingual
    Supports Simplified Chinese, Traditional Chinese, and English.

  • 🌏 SEO
    In-depth SEO practice, supporting major search engines. SEO

  • 🥯 Incremental Rendering
    Uses SSG and ISR rendering to greatly improve rendering efficiency.

  • 📷 Resource Compression
    Compresses uploaded image resources to improve loading speed and reduce storage usage.

  • 🧑‍🎨 Text Editing
    Supports (including but not limited to): uploads, tables, audio, video, iframe, and code examples in multiple programming languages.

  • 🙋‍♂️ Admin Management
    Site info and personal info editing, content management, message management, static resource management, etc. Related features

  • 🤩 Access Logs
    Access log feature helps you understand visitor frequency and identify malicious requests.

  • 🐳 Docker
    Supports multiple Docker image sources and one-click deployment, reducing cognitive load.

👮 Environment Variables

# MYSQL URL
DATABASE_URL = mysql://root:pwd@localhost:3306/website

# System secret (required)
SECRET = your_key

# System language (default: zh-Hans)
# zh-Hans 简体中文
# zh-Hant 繁體中文
# en      English
LANG = zh-Hans

# Public root URL of your site (used to generate absolute links for robots.txt / sitemap.xml to improve SEO)
SITE_URL = https://your_website.com

👷 Local Development

# Note: npx prisma related commands only need to run once. They generate Prisma Client and create/link database tables.
$ git clone https://github.com/world56/website.git
$ cd website
$ npm install
$ npx prisma generate
$ npx prisma db push
$ npm run dev

🐳 Production Deployment

1. Pull image
# Official registry
$ docker pull world56/website

# Alibaba Cloud registry
$ docker pull registry.cn-hangzhou.aliyuncs.com/world56/website
2. Start container
# Static resources are hosted under /app/resource. Please bind a data volume (-v) to avoid resource loss.
$ docker run -d -p 8001:3000 -e DATABASE_URL=mysql://root:mysql:3306/website -e SECRET=your_key -e LANG=zh-Hans -e SITE_URL=https://your_website.com -v ~/app/website/resource:/app/resource world56/website

🙋‍♂️ About Nginx

If you use Nginx as a reverse proxy, make sure to add the following parameters.


server {
 ...
 location / {
   proxy_pass http://127.0.0.1:3000; # website service port (customizable)
   proxy_set_header Host              $host;  # "Server Actions" feature
   proxy_set_header X-Forwarded-Proto $scheme; # "Server Actions" feature
   proxy_set_header X-Real-IP         $remote_addr; # "Log Management" feature
   proxy_set_header X-Forwarded-For   $proxy_add_x_forwarded_for; # "Log Management" feature
 }

 location /api/auth/upload {
  client_max_body_size 21M; # "Upload Resource" feature
  proxy_pass http://127.0.0.1:3000; # website service port (customizable)
 }
}

🚀 Migration & Upgrade

v1.3.0

When upgrading to 1.3.0 or above, you need to manually execute the SQL file (for better scalability).

v2.0.0

When upgrading to 2.0.0 or above, refer to the Nginx configuration above (for Server Actions compatibility).

🔍 Access URLs (Example)

Visitor: http://127.0.0.1:3000

Admin panel: http://127.0.0.1:3000/signin (first-time use requires admin registration)

📷 Screenshots

More detail screenshots, click to view

🙏 Special Thanks

The UI inspiration for this project comes from @codewithsadee and his outstanding open-source project vcard-personal-portfolio. Grateful for his dedication and open-source spirit.

⚠️ Update Tips (v2.0.0)

  • Refactor and upgrade to Next.js v16 and related dependencies, adapting for Server Actions

  • Add "Logout" functionality

  • Add "Log Management" and "Unauthorized Access" types

  • Optimize "SEO" HTML layout and configuration files

  • Fix cache expiration issue in "Log Management"

  • Fix character length validation issue in "Comment" functionality

  • Fix transparency issue of the top status bar in "IOS Safari browser"

  • Breaking change in "Upload" functionality, maximum file size adjusted to 20MB

  • Warning ⚠

  1. Due to Server Actions features, users must adjust Nginx configuration. Please refer to the documentation for details.

  2. This update includes the core security patch for RSC. It is recommended that all users immediately perform a forced update.

Tag summary

Content type

Image

Digest

sha256:b8b491bea

Size

650.9 MB

Last updated

5 months ago

docker pull world56/website