Skip to content

Feature/refactor v 1 fe#22

Merged
TNTHNGVDYNND merged 19 commits into
mainfrom
feature/refactor-v-1-fe
Feb 11, 2026
Merged

Feature/refactor v 1 fe#22
TNTHNGVDYNND merged 19 commits into
mainfrom
feature/refactor-v-1-fe

Conversation

@TNTHNGVDYNND
Copy link
Copy Markdown
Collaborator

UI Refactor Phrase 1.

- Implements route guard for user-only routes like /profile
- Checks for valid access token before rendering protected content
- Redirects to login if authentication is missing
- Implements route guard for admin-only routes like /admin, /characters/edit/:id, /characters/new
- Validates both authentication and admin role
- Redirects unauthorized users appropriately
- Creates persistent navigation wrapper for all routes
- Replaces old view-based routing with React Router structure
- Integrates Navigation component as fixed header
- Implements fixed top navigation bar with glassmorphism effect
- Shows different nav items based on authentication state
- Includes Logo, Characters link, User menu (Profile, Admin, Logout), and Auth buttons
- Documents standardized button usage across the application
- Shows primary (SpaceBtn), secondary (Button), and destructive button patterns
- Part of Phase 1 design system standardization
- Replaced ViewRouter with React Router Routes
- Added route guards (ProtectedRoute, AdminRoute)
- Implemented routes: /, /characters, /characters/:id, /login, /register, /profile, /admin
- Added nested routing with Layout component
- Removed view-based routing state (setView, view)
- Updated handleLogout to use window.location for navigation
- Simplified context to focus on auth state management
- Added useNavigate and useLocation hooks for client-side routing
- Implemented href prop handling with smooth scroll for hash links
- Fixed navigation to prevent full page reloads
- Replaced Link wrappers with direct Button/SpaceBtn href props
- Updated navigation buttons to use href prop for routing
- Removed unused Link import
- Fixed navigation buttons to use href props instead of Link wrappers
- Ensured compatibility with updated Button and SpaceBtn components
…tion

- Fixed all Link wrappers to use Button href props
- Added Return to Home button at bottom of list
- Fixed error state Return to Home navigation
- Updated character name links and Edit buttons to use href prop
…tion

- Fixed Back button to use Button href prop instead of Link wrapper
- Fixed Edit button to use SpaceBtn href prop
- Removed unused Link import
- Fixed navigation after successful login
- Updated to work with React Router navigation patterns
- Fixed navigation after successful registration
- Updated to work with React Router navigation patterns
- Fixed navigation after form submission
- Updated to work with React Router navigation patterns
…ports

- Added http://127.0.0.1:5173 to allowed origins
- Added alternative Vite ports (5174) for development
- Fixed CORS errors when accessing via 127.0.0.1 instead of localhost
- Added missing next() call when password not modified
- Added next() after successful hashing
- Changed error handling from throw to next(err)
- Fixed new user registration password storage issue
- Removed obsolete view-based routing component
- Replaced with React Router v6 implementation in App.jsx
- Added comprehensive Phase 1 Foundation completion summary
- Documented all 8 implementation areas with completion status
- Listed all 18 git commits with descriptions
- Updated Status to Phase 1 Complete - Ready for Phase 2
@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 11, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
star-wars-character-data-api Ready Ready Preview, Comment Feb 11, 2026 11:10am

@TNTHNGVDYNND TNTHNGVDYNND merged commit c6e12ea into main Feb 11, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant