Commit Graph

59 Commits

Author SHA1 Message Date
hosseintaromi 64a63e01fb refactor(login): update Login page to use custom hook
- Replace direct AuthContext usage with useLogin hook
- Change form field from email to username
- Add proper error handling and navigation
- Follow separation of concerns pattern
2025-07-18 13:06:12 +03:30
hosseintaromi 7ec69a67e7 refactor(auth): update AuthContext for new API structure
- Remove login logic from context (moved to custom hook)
- Add restoreSession functionality
- Update state management for new auth response structure
- Add permission checking by ID and title
- Manage access_token and refresh_token separately
2025-07-18 13:06:09 +03:30
hosseintaromi d45f588fa7 feat(auth): implement authentication structure
- Add auth helper functions (getAuth, postLogout)
- Add postLogin API request function
- Add useLogin custom hook with React Query
- Update validation schema from email to username
2025-07-18 13:06:06 +03:30
hosseintaromi 2ea8d19c87 feat(types): add authentication type definitions
- Add Permission, Role, AdminUser interfaces
- Add LoginRequest, LoginResponse, AuthState types
- Update main types index with auth exports
2025-07-18 13:06:03 +03:30
hosseintaromi b15c0ac5ab feat(config): add API configuration and constants
- Add API base URL and routes configuration
- Add environment variables types
- Add query keys for React Query
- Add general variables like pageSize
2025-07-18 13:06:00 +03:30
hosseintaromi 2ef0ad3c1d Add swagger.json for API documentation and define admin routes 2025-07-18 12:49:20 +03:30
hosseintaromi 07acb8c1b8 Update package dependencies to include js-cookie and its type definitions 2025-07-18 12:49:14 +03:30
hossein 9e416e5d05 add docker-compose for stage 2025-07-13 20:05:16 +00:00
hosseintaromi 46d9c20d87 Update file structure and improve code organization in the main directory 2025-07-13 22:03:22 +03:30