How sofyan-lamperouge/inf-learning works
INF-Learning is a learning-portal frontend with a FastAPI authentication backend. The main user flow is registration or login, session restoration and route protection, then access to the materials page; the sampled backend implements registration, login and current-user lookup, but no materials API is shown. The frontend also exposes blueprint pages. The graph includes the main auth, persistence and security layers; materials and blueprint internals are only represented where the tree or excerpts support them.
Main entry points: App.jsx Route application · RegisterPage.jsx Registration page · LoginPage.jsx Login page · auth_service.py Auth workflows
Components 29
Frontend experience
- Route application
Frontend/src/App.jsx - Registration page
Frontend/src/pages/auth/RegisterPage.jsx - Login page
Frontend/src/pages/auth/LoginPage.jsx - Auth session
Frontend/src/context/AuthContext.jsx - Auth hook
Frontend/src/hooks/useAuth.js - Protected route
Frontend/src/components/common/ProtectedRoute.jsx - Auth client
Frontend/src/services/authService.js - HTTP client
Frontend/src/services/api.js - Form validation
Frontend/src/utils/validators.js - Input field
Frontend/src/components/common/InputField.jsx - Error message
Frontend/src/components/common/ErrorMessage.jsx - Success message
Frontend/src/components/common/SuccessMessage.jsx - Materials page
Frontend/src/pages/materi/MateriListPage.jsx - Materials client
Frontend/src/services/materiService.js
Backend auth
- API application
Backend/app/main.py - Auth endpoints
Backend/app/api/v1/auth.py - Auth workflows
Backend/app/services/auth_service.py - Auth contracts
Backend/app/schemas/auth.py - Auth dependencies
Backend/app/core/dependencies.py
Auth data and security
- User queries
Backend/app/crud/pengguna.py - User records
Backend/app/models/pengguna.py - DB sessions
Backend/app/db/session.py - Password and JWT
Backend/app/core/security.py - Runtime settings
Backend/app/core/config.py
Blueprint views
- Blueprint index
Frontend/src/pages/BlueprintIndexPage.jsx - Login blueprint
Frontend/src/pages/auth/LoginBlueprintPage.jsx - Register blueprint
Frontend/src/pages/auth/RegisterBlueprintPage.jsx - Materials blueprint
Frontend/src/pages/materi/MateriBlueprintPage.jsx
Other components
- Learner
Connections 41
- Learner → Route application: uses
Frontend/src/App.jsx - Route application → Login page: routes to
Frontend/src/App.jsx - Route application → Registration page: routes to
Frontend/src/App.jsx - Route application → Materials page: protects route
Frontend/src/App.jsx - Route application → Blueprint index: routes to
Frontend/src/App.jsx - Route application → Login blueprint: routes to
Frontend/src/App.jsx - Route application → Register blueprint: routes to
Frontend/src/App.jsx - Route application → Materials blueprint: routes to
Frontend/src/App.jsx - Registration page → Auth client: registers through
Frontend/src/pages/auth/RegisterPage.jsx - Registration page → Form validation: validates with
Frontend/src/pages/auth/RegisterPage.jsx - Registration page → Input field: renders
Frontend/src/pages/auth/RegisterPage.jsx - Registration page → Error message: renders
Frontend/src/pages/auth/RegisterPage.jsx - Registration page → Success message: renders
Frontend/src/pages/auth/RegisterPage.jsx - Login page → Auth client: authenticates through
Frontend/src/pages/auth/LoginPage.jsx - Login page → Form validation: validates with
Frontend/src/pages/auth/LoginPage.jsx - Login page → Input field: renders
Frontend/src/pages/auth/LoginPage.jsx - Login page → Error message: renders
Frontend/src/pages/auth/LoginPage.jsx - Login page → Success message: renders
Frontend/src/pages/auth/LoginPage.jsx - Auth session → Auth client: restores via
Frontend/src/context/AuthContext.jsx - Auth hook → Auth session: reads
Frontend/src/hooks/useAuth.js - Protected route → Auth hook: checks session
Frontend/src/components/common/ProtectedRoute.jsx - Auth client → HTTP client: sends requests
Frontend/src/services/authService.js - Materials client → HTTP client: sends requests
Frontend/src/services/materiService.js - API application → Auth endpoints: mounts routes
Backend/app/main.py - API application → DB sessions: initializes
Backend/app/main.py - Auth endpoints → Auth workflows: dispatches to
Backend/app/api/v1/auth.py - Auth endpoints → Auth contracts: validates with
Backend/app/api/v1/auth.py - Auth endpoints → DB sessions: gets sessions
Backend/app/api/v1/auth.py - Auth endpoints → Auth dependencies: checks identity
Backend/app/api/v1/auth.py - Auth workflows → User queries: queries users
Backend/app/services/auth_service.py - Auth workflows → Password and JWT: hashes and signs
Backend/app/services/auth_service.py - Auth workflows → User records: loads user
Backend/app/services/auth_service.py - Auth workflows → Auth contracts: uses contracts
Backend/app/services/auth_service.py - Auth workflows → Runtime settings: reads settings
Backend/app/services/auth_service.py - User queries → User records: queries
Backend/app/crud/pengguna.py - Auth dependencies → Password and JWT: decodes tokens
Backend/app/core/dependencies.py - Auth dependencies → DB sessions: uses session
Backend/app/core/dependencies.py - Auth dependencies → User records: loads user
Backend/app/core/dependencies.py - DB sessions → Runtime settings: reads URL
Backend/app/db/session.py - Password and JWT → Runtime settings: reads secrets
Backend/app/core/security.py - User records → DB sessions: persists through