AMS uses React Navigation to orchestrate every screen in the app. A single rootDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Jay-byte389/AMS/llms.txt
Use this file to discover all available pages before exploring further.
NativeStackNavigator — AppNavigator — owns the top-level routing decision: send unauthenticated users into the Auth stack, or drop authenticated users straight into the BottomTabs experience. All modal-style screens (settings, payments, profile editing) live at the root stack level so they slide over any tab or nested screen without disrupting the underlying navigation state.
Navigation Tree
AppNavigator
AppNavigator is the entry point rendered directly inside App.tsx. On mount it dispatches checkAuthSession, which reads @logged_in_user from AsyncStorage. Only after that promise resolves does the component render the NavigationContainer, ensuring the splash screen is visible for the minimum time required to make an auth decision.
App mounts
App.tsx renders <Provider store={store}><AppNavigator /></Provider>. The Redux store is available before any navigation occurs.Session check
checkAuthSession thunk calls getLoggedInUser() from AsyncStorage and returns the stored user object (or null).Auth state resolves
The
auth slice sets isAuthenticated based on the payload. setIsReady(true) triggers a re-render.AuthStack
AuthStack is a NativeStackNavigator with initialRouteName="Register". New users flow Register → SignUp → SetPassword; returning users tap “Login” from the Register screen and land on LoginScreen.
New User Flow
Register → SignUp (enter personal details) → SetPassword (choose a password) →
signupUser thunk saves the account and sets isAuthenticated = true, causing AppNavigator to swap to BottomTabs.Returning User Flow
Register → Login (enter email/phone + password) →
loginUser thunk validates credentials and sets isAuthenticated = true.BottomTabsNavigator
The bottom tab bar uses@react-navigation/bottom-tabs. It is styled as a floating pill — positioned absolutely above the bottom edge of the screen with rounded corners and a solid blue (#2260FF) background. Labels are hidden; each tab shows only an icon image.
- Home
- Chat
- Profile
- Appointments
Renders the
DoctorsStack nested navigator. This tab is the primary entry point for browsing doctors and booking appointments.DoctorsStack
DoctorsStack is a NativeStackNavigator nested inside the Home tab. All screens share a white contentStyle background and no visible header.
DoctorsStack is:
HomeScreen
Displays featured doctors and categories. Tapping a doctor dispatches
setSelectedDoctor and navigates to Info.Info (DoctorInfo)
Shows full doctor profile. The user selects a date/time and taps Book Appointment.
Passing Data Between Screens
Data flows between screens throughroute.params. Because doctor objects are stored in Redux (state.doctors.selectedDoctor), most screens read from the store rather than from params, but the pattern is available for lightweight payloads.
For larger objects (full doctor profiles, appointment records) prefer reading from Redux state via
useSelector rather than serialising the whole object into route.params. This keeps navigation params small and avoids stale data if the store updates.App Entry Point
App.tsx wraps everything in SafeAreaProvider and the Redux Provider before rendering AppNavigator. A GlobalSnackbar component sits outside the navigator so it can overlay any screen.