Files
nl-blogs/.trae/documents/System Upgrade_ Password Reset, UI Replication & Backend Refactoring.md
2026-01-15 13:51:44 +08:00

1.9 KiB

Implementation Plan

I will address your four requirements systematically:

1. Password Reset for User lq

  • Action: Create a secure Go script (server/scripts/reset_password.go) to reset the password.
  • Security:
    • Use bcrypt for hashing (standard security practice).
    • Update the database directly.
    • The script will be executed once to enforce the change to qiqi991012.

2. Frontend Pixel-Perfect Replication (UI2.html)

  • Global Styles: Migrate the CSS variables, animations (float, reveal, spotlight), and custom scrollbar styles from UI2.html to the Vue project's global CSS.
  • Pages Update:
    • Home: Replicate the "Design/Digital/Soul" hero section and Bento grid.
    • Services: Implement the 3D Tilt Cards and "Danmaku" testimonials exactly as designed.
    • Works/Blog: Ensure the list and detail views match the "Artistic" layout.
    • Interaction: Port the custom JavaScript logic (tilt effect, mouse tracking) to Vue Composables/Components.

3. Backend UI Optimization

  • Theme: Enforce the #050505 background and #d4b383 accent color across all Admin pages.
  • Layout: Verify the sidebar and header match the "Glass" aesthetic of the frontend while maintaining high density for data presentation.

4. Backend Project Restructuring (Standardization)

  • Refactoring: Move all HTTP handler functions from main.go into a new server/handlers package.
  • Structure:
    • server/handlers/: Contains user.go, post.go, auth.go, etc.
    • server/main.go: Will become a clean entry point that only handles setup and routing.
  • Startup: This will allow you to run the server using the standard go run main.go (or go build) command without "undefined" errors, as dependencies will be properly imported.

I will start with the password reset and backend refactoring, then move to the visual frontend work.