Documentation 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.
AMS follows a clear, feature-oriented source layout that separates concerns into discrete directories under src/. The root holds React Native’s standard configuration files while all application code lives inside src/, organised by type — screens, components, navigation, state management, services, constants, and utilities. Understanding this layout makes it easy to locate any piece of logic and to add new features without touching unrelated code.
AMS/
├── App.tsx # Root component
├── index.js # Entry point
├── app.json # App name / displayName
├── package.json
├── tsconfig.json
├── metro.config.js
└── src/
├── assets/ # Fonts, icons (SVG), images (PNG)
├── components/ # Reusable UI components
├── constants/ # Colors, fonts, spacing, typography
├── navigator/ # React Navigation stacks & tabs
├── redux/
│ ├── slices/ # Auth, doctors, appointments, snackbar
│ ├── thunk/ # Async thunks (auth, doctors, appointments)
│ └── store.js # configureStore
├── screens/ # Full-screen components
├── services/ # API clients and storage helpers
└── utils/ # Data helpers, time slots, responsive utils
Root Files
App.tsx is the root React component. It wraps the application in SafeAreaProvider, the Redux Provider, and renders AppNavigator alongside the global GlobalSnackbar overlay. index.js is the true entry point — it calls AppRegistry.registerComponent with the app name read from app.json.
src/screens/
Every full-screen UI component lives here. Screens are registered by name in the appropriate navigator and rendered by React Navigation when their route is active.
| Screen File | Purpose |
|---|
RegisterScreen.jsx | Initial screen — choose between login and sign-up |
LoginScreen.jsx | Email / password login |
SignUpScreen.jsx | New account creation form |
SetPassword.jsx | Password creation step during sign-up |
HomeScreen.jsx | Main home dashboard |
Doctors.jsx | Filterable list of all doctors |
DoctorInfo.jsx | Detailed doctor profile with ratings and reviews |
ScheduleScreen.jsx | Calendar and time-slot picker for booking |
YourAppoinmentScreen.jsx | Booking confirmation / appointment preview |
CancelAppointment.jsx | Appointment cancellation flow |
AllAppointmentsScreen.jsx | Bottom-tab screen listing all user appointments |
Review.jsx | Post-appointment review submission |
PaymentMethod.jsx | Payment method selection |
AddCard.jsx | Debit / credit card entry form |
PaymentSummary.jsx | Pre-payment order summary |
PaymentComplete.jsx | Payment success confirmation |
ChatScreen.jsx | In-app messaging screen |
ProfileScreen.jsx | User profile and settings menu |
EditProfileScreen.jsx | Edit personal details |
SettingScreen.jsx | App settings |
NotificationScreen.jsx | Notification feed |
NotificationSettingScreen.jsx | Toggle notification preferences |
PasswordManager.jsx | Change / manage password |
PrivacyPolicy.jsx | Privacy policy viewer |
HelpCenter.jsx | FAQ and support links |
src/components/
Reusable UI building blocks that are shared across multiple screens. Each component is a focused, single-responsibility React Native element.
| Component File | Purpose |
|---|
ButtonComp.jsx | Generic touchable button |
PrimaryButton.jsx | Branded primary action button |
CustomInput.jsx | Styled text input with validation states |
PaymentInput.jsx | Specialised input for card number / CVV fields |
SocialButton.jsx | OAuth social login button (Google, Facebook) |
DoctorCard.jsx | Card displaying a doctor’s avatar, name, and specialty |
DoctorsHeader.jsx | Search and filter header for the doctors list |
HomeHeaders.jsx | Header bar shown on the Home screen |
Headers.jsx | Generic back-navigation header |
ScheduleHeader.jsx | Header for the scheduling screen |
Favourites.jsx | Favourited-doctor list component |
RatingCard.jsx | Star-rating display card |
ProfileAvatar.jsx | Circular user avatar with initials fallback |
ProfileMenuItems.jsx | Individual item row in the profile menu |
ProfileMenuList.jsx | Container rendering the full profile menu |
SettingsItem.jsx | Row component for the settings screen |
TabButtons.jsx | Custom tab-switcher buttons |
GlobalSnackbar.jsx | App-wide snackbar driven by the Redux snackbar slice |
PasswordManager/PasswordInput.jsx | Secure password input with show/hide toggle |
src/navigator/
React Navigation is configured across four navigator files that together form the complete navigation tree.
AppNavigator.jsx
The top-level stack navigator wrapped in NavigationContainer. On mount it dispatches checkAuthSession and hides the boot splash when ready. It routes unauthenticated users to AuthStack and authenticated users to BottomTabsNavigator, and also registers every full-screen modal route (EditProfile, Settings, NotificationSetting, PasswordManager, PrivacyPolicy, HelpCenter, Payment, Debit, PaymentComplete, PaymentSummary).
AuthNavigator.jsx
A native stack navigator with four screens for the authentication flow:
Register → RegisterScreen
Login → LoginScreen
SignUp → SignUpScreen
SetPassword → SetPassword
BottomTabsNavigator.jsx
Renders the floating bottom tab bar (blue pill, positioned with react-native-size-matters scaling). The four tabs are:
| Tab Name | Component | Icon asset |
|---|
| Home | DoctorsStack | Home1.png |
| Chat | ChatScreen | chat.png |
| Profile | ProfileScreen | Profile.png |
| Appointments | AllAppointmentsScreen | Appointment.png |
A nested native stack navigator mounted inside the Home tab. It manages the doctor discovery and appointment booking journey:
HomeScreen → Doctors → Info (DoctorInfo) → Schedule → YourAppointment → CancelAppointment → Review, with a side-accessible NotificationScreen.
src/redux/
Global application state is managed with Redux Toolkit. The store is composed of four slices, each with a companion async thunk file.
store.js
Created with configureStore, combining all four reducers:
{
auth: authReducer,
doctors: doctorsReducer,
snackbar: snackBarReducer,
appointments: appointmentReducer,
}
Slices (slices/)
| File | State Key | Responsibility |
|---|
authSlice.js | auth | isAuthenticated, current user, loading and error states |
doctorSlice.js | doctors | Doctor list, selected doctor, favourites, loading state |
appointmentSlice.js | appointments | All appointments, booking in progress, cancellation state |
snackBarSlice.js | snackbar | Snackbar visibility, message text, and type (success / error) |
Thunks (thunk/)
| File | Async Operations |
|---|
authThunk.js | checkAuthSession, loginUser, registerUser, logoutUser |
doctorThunk.js | fetchDoctors, fetchDoctorById |
appointmentThunk.js | fetchAppointments, createAppointment, deleteAppointment |
src/services/
Thin service modules that abstract all I/O away from the Redux layer.
| File | Purpose |
|---|
api.js | Pre-configured Axios instance with baseURL: https://6a61e9edda10c59c180a02b0.mockapi.io |
appointmentApi.js | Appointment CRUD functions using the Axios instance |
doctorServices.js | Doctor fetch functions using the Axios instance |
storage.js | AsyncStorage helpers for persisting and retrieving the auth session |
src/constants/
Design tokens and static string values that ensure visual consistency across the app.
| File | Exports |
|---|
colors.js | Colour palette — primary (#2260FF), secondary, background, error, and more |
Fonts.js | League Spartan font-family name constants |
spacing.js | Padding, margin, and gap scale values |
typography.js | Font-size and line-height text-style presets |
strings.js | Localisation-ready static UI strings |
border.js | Border-radius scale values |
index.js | Barrel export of all constants |
src/utils/
Helper modules providing static data sets, computation utilities, and responsive layout helpers.
| File | Purpose |
|---|
WeekData.js | Generates the 7-day week strip used by the schedule calendar |
timeSlots.js | Static array of bookable time-slot strings (e.g. 09:00 AM) |
responsive.js | Convenience wrappers around react-native-size-matters scaling functions |
chatData.js | Mock chat conversation data for the Chat screen |
notificationData.js | Static notification feed entries |
notification.js | Notification utility helpers |
privacyData.js | Privacy policy text content |
HelpData.js | FAQ entries rendered by the Help Center screen |
CustomerServiceData.js | Customer service contact information |
Contact.js | Contact details data |
Configuration Files
| File | Purpose |
|---|
babel.config.js | Uses module:@react-native/babel-preset — the standard React Native Babel preset |
metro.config.js | Extends the default Metro config to add react-native-svg-transformer, enabling .svg files to be imported as React components |
tsconfig.json | Extends @react-native/typescript-config, adds jest to types, and includes all .ts / .tsx files while excluding node_modules and Pods |
.eslintrc.js | Extends @react-native/eslint-config for React Native–aware lint rules |
.prettierrc.js | Prettier formatting configuration (defaults from prettier@2.8.8) |