Developer Manual - IMS-IIITH/docs GitHub Wiki

Welcome to the developer documentation for the IMS Mobile App. This is intended for future maintainers of and contributors to the project, as a guide to the source code and how to add new features.

Basic Information

We've used React Native with TypeScript to build the app frontend, which fetches data from and posts data to a middleware which is in turn connected to the IMS backend. We've used Gradle as a building tool, as currently we only support Android. Currently we generate an APK to use the app, but hopefully, if our college's IT office approves, we can release it on Play Store as well.

Code Structure

The codebase contains the following directories:

  • __tests__/: (hopefully) some unit/integration tests to make sure the app works as intended
  • android/: android stuff, has gradle files, build files, and the .aab and .apk file generated on building
  • node_modules/: dependencies required for the project
  • src/: the main code files, organized according to the app logic

There are some other files at the root directory level, that are required to build the project.

Main Source Code

The src/ directory has the main .tsx files for the app screens, components as well as the icon files. It is structured as follows.

  • assets/: contains static files, currently just icon images, that we need for the app
  • backend_requests/: contains code interacting with the backend, including access token management, authentication, cookies etc. Visit manual page.
  • components/: some basic (non-screen) components we need like the bottom tab, header, sidebar etc.
  • constants/: related to the app-wide information we need, in one place for modularity purposes
  • device_permissions/: contains a file with code to ask the user for file permissions
  • screens/: the main features of the app, with their code and style files
  • styles/: located badly currently; has style files used by some features

Other than these, `src/ contains the following files:

  • custom-types.tsx: some custom enums and types we use throughout the app
  • Navigation.tsx: here we define the nav stack, declaring all our screen elements