How tondi11/loginauth-frontend works
This is a React account-management frontend. A user enters through routed login or registration; authentication state and API calls support email verification, password recovery, protected dashboard access, profile editing, and account settings, including session and two-factor controls. The API client handles bearer tokens and refresh retries. Shared components provide loading placeholders and inline or toast feedback. Several feature files were not excerpted, so their presence and routing are supported by the source index or App.js, but their internal behavior is not detailed here.
Main entry points: App.js Route application · AuthContext.js Auth state · api.js API client · Settings.jsx Account settings
Components 20
App routing
- Route application
src/App.js - Protected route
src/components/ProtectedRoute.js - Protected page
src/components/ProtectedPage.js
Authentication
- Login
src/components/Login.js - Registration
src/components/Register.js - Google login
src/components/GoogleLogin.js - Email verification
src/components/VerifyEmail.js - Forgot password
src/components/ForgotPassword.js - Reset password
src/components/ResetPassword.js - Auth state
src/contexts/AuthContext.js
Account workspace
- Dashboard
src/components/Dashboard.js - Profile editor
src/components/Profile.jsx - Account settings
src/components/Settings.jsx
Shared UI and API
- API client
src/services/api.js - User-agent parser
src/components/UserAgent.js - Loading placeholders
src/components/SkeletonLoaders.jsx - Inline messages
src/components/InlineMessages.jsx - Toast notifications
src/components/toast.js
Other components
- User
- Application backend
Connections 33
- User → Route application: uses
- Route application → Auth state: provides auth
src/App.js - Route application → Login: routes to
src/App.js - Route application → Registration: routes to
src/App.js - Route application → Email verification: routes to
src/App.js - Route application → Forgot password: routes to
src/App.js - Route application → Reset password: routes to
src/App.js - Route application → Protected route: guards routes
src/App.js - Route application → Dashboard: routes to
src/App.js - Route application → Profile editor: routes to
src/App.js - Route application → Account settings: routes to
src/App.js - Protected route → Auth state: checks auth
src/components/ProtectedRoute.js - Protected route → Protected page: renders
src/App.js - Login → Auth state: uses auth
src/components/Login.js - Login → Google login: renders
src/components/Login.js - Registration → Auth state: registers via
src/components/Register.js - Google login → API client: calls
src/components/GoogleLogin.js - Auth state → API client: calls
src/contexts/AuthContext.js - Auth state → Toast notifications: notifies with
src/contexts/AuthContext.js - API client → Application backend: sends requests
src/services/api.js - API client → Toast notifications: notifies with
src/services/api.js - Dashboard → Auth state: uses auth
src/components/Dashboard.js - Dashboard → API client: calls
src/components/Dashboard.js - Dashboard → User-agent parser: formats agent
src/components/Dashboard.js - Profile editor → Auth state: uses auth
src/components/Profile.jsx - Profile editor → API client: calls
src/components/Profile.jsx - Profile editor → Loading placeholders: renders
src/components/Profile.jsx - Profile editor → Inline messages: renders
src/components/Profile.jsx - Account settings → Auth state: uses auth
src/components/Settings.jsx - Account settings → API client: calls
src/components/Settings.jsx - Account settings → Loading placeholders: renders
src/components/Settings.jsx - Account settings → Inline messages: renders
src/components/Settings.jsx - Account settings → Toast notifications: notifies with
src/components/Settings.jsx