ChemTrack is a mobile app for managing chemical inventory in schools, featuring built-in QR code scanning. It was designed, developed, and tested from the ground up for the chemistry department at Encina High School to streamline their inventory management process.
- Introduction
- Application Demo
- Contributors
- Prerequisites
- Setup
- Running the Project
- Testing
- Deployment
- Secrets Management
- API Endpoints
- Additional Information
ChemTrack is an innovative chemical inventory management system designed specifically for educational institutions. This powerful tool leverages QR code technology to streamline the tracking and management of chemical inventories, ensuring safety and compliance in school laboratories.
With ChemTrack, users can easily add, view, and manage chemical details, including CAS numbers, purchase and expiration dates, storage locations, and quantities. The system provides real-time updates and alerts for expired or low-quantity chemicals, helping schools maintain a safe and well-organized chemical inventory.
ChemTrack's user-friendly interface allows for quick access to Safety Data Sheets (SDS) and other critical information, ensuring that all necessary safety protocols are readily available. The software also supports the generation and printing of QR codes for each chemical, enabling efficient scanning and retrieval of chemical data.
Designed with scalability and ease of use in mind, ChemTrack integrates seamlessly with existing school systems and provides robust reporting and analytics features. Whether you're a science teacher, lab technician, or school administrator, ChemTrack offers a comprehensive solution to manage your chemical inventory with confidence and ease.
ChemTrack is built using a modern technology stack to ensure reliability, scalability, and ease of use:
React Native: For building a cross-platform mobile application that runs on both iOS and Android devices, providing a seamless user experience. Expo: To streamline the development process, allowing for quick testing and deployment of the React Native application. Axios: For making HTTP requests to the backend API, ensuring efficient data retrieval and manipulation. TypeScript: To add static typing to JavaScript, enhancing code quality and maintainability.
Go (Golang): A statically typed, compiled programming language known for its performance and efficiency, used to build the backend API. Gin: A high-performance HTTP web framework for Go, used to create robust and scalable RESTful APIs. Google Cloud Firestore: A flexible, scalable database for mobile, web, and server development, used to store chemical data securely. Google Cloud Storage: For storing and serving QR code images and other static assets. bcrypt: For securely hashing and storing user passwords, ensuring data security.
Swagger: For API documentation, making it easy for developers to understand and interact with the backend services. Docker: To containerize the application, ensuring consistent environments across development, testing, and production. GitHub: For version control and collaboration, enabling seamless teamwork and code management. By leveraging these cutting-edge technologies, ChemTrack ensures a reliable, efficient, and user-friendly experience for managing chemical inventories in educational institutions.
App running on production build on an iOS device with master access.
Better quality version: here
- Team Lead: Ekjyot Shinh (@ekjyotshinh)
- Rahul Gupta (@rahulio96)
- Ajaydeep Singh (@Ajay1-me)
- Katy Chan (@Kren1375)
- Mari Moslehi (@marimoslehi)
- Harmanjot Singh (@harmanharry96)
- Romin Akoliya (@Romin-6522)
- Kevin Esquivel (@AggressiveGas)
- Node.js (v14 or higher)
- npm or yarn
- Go (v1.16 or higher)
- Expo CLI (
npm install -g expo-cli)
- Navigate to the
backenddirectory:cd backend - Install Go dependencies:
go mod tidy
- Set up environment variables:
- Create a
.envfile in thebackenddirectory and add your environment variables.
- Create a
- Navigate to the
frontenddirectory:cd frontend - Install Node.js dependencies:
or
npm install
yarn install
- Navigate to the [backend] directory:
cd backend - Start the backend server:
go run main.go
- The backend server should now be running on
http://localhost:8080.
-
Navigate to the [frontend] directory:
cd frontend -
Start the Expo development server:
npm start
or
yarn start
-
Install notification dependencies:
npm install expo-notifications expo-constants
-
Expo Project Setup:
- Make sure you're logged into your Expo account:
npx expo login
- Get your Expo project ID by running:
npx expo projects
- Add your Expo project ID to your .env file:
Note: Without the correct project ID in your .env file, push notifications won't work properly.
EXPO_PROJECT_ID=your_project_id_here
- Make sure you're logged into your Expo account:
-
Testing Notifications:
- Download the Expo Go app from App Store (iOS) or Play Store (Android)
- Create and sign in to your Expo account in the Expo Go app
- Note: You must be signed in to the same Expo account on both your development environment and the Expo Go app for notifications to work properly.
-
Install Firebase CLI :
curl -sL https://firebase.tools | bash -
Start Firestore emulator in the background:
firebase emulators:start --only firestore --project <project_id>
-
Wait for the Firestore emulator to be ready before testing and make sure is is running while the tests are running:
-
Clear Firestore emulator data manually from the UI at
http://localhost:4000. -
Alternatively, reset the emulator using the Firebase CLI:
firebase emulators:reset --only firestore
- Run unit tests for backend functions:
go test -v ./tests - Use Postman or curl to manually test API endpoints.
- Run unit tests for UI components using Jest:
npm test
The frontend mobile application is deployed using Expo Application Services (EAS) for both building and submitting the iOS app.
-
Log in to Expo
expo login
- Use the provided Expo Developer Account credentials:
Email: <your-email-id>
- Use the provided Expo Developer Account credentials:
-
Build the iOS App
eas build --platform ios
- This creates a production-ready
.ipafile for iOS.
- This creates a production-ready
-
Submit the Build to the Apple App Store
eas submit --platform ios
- You will be prompted to log in with the Apple Developer Account:
Email: <your-email-id> - Ensure 2FA (Two-Factor Authentication) is accessible during submission.
- You will be prompted to log in with the Apple Developer Account:
- Go to the Apple Developer Portal
- Navigate to App Store Connect
- Select your app
- Add:
- Release notes
- Screenshots
- Version metadata
- Submit the app for App Review
The backend is containerized using Docker and deployed to Google Cloud Run using a container image uploaded to Google Container Registry (GCR).
To log in to Google Cloud (GCP) via the terminal, use the Google Cloud SDK (gcloud).
-
Install Google Cloud SDK
Install SDK → -
Authenticate with GCP
gcloud auth login
- This will open a browser prompting login.
- Log in using your GCP account:
Email: <your-email-id>
-
Set Your Project ID
gcloud config set project <your-project-id>
cd backendIf you're on an Apple M-series or ARM-based system, use the platform flag for compatibility:
docker build --platform linux/amd64 -t gcr.io/<project-id>/<image-name> .docker push gcr.io/<project-id>/<image-name>- Go to Google Cloud Console
- Navigate to Cloud Run
- Select the
<project-id>service - Click "Edit & Deploy New Revision"
- Under Container Image, select the newly pushed image (e.g.,
:latestor your tag) - Click Deploy
- While editing your Cloud Run revision, go to "Variables & Secrets"
- Add or update required secrets
- Click Deploy after saving changes
⚠️ Note:
- Always maintain an internal, secure record of updated secrets (API keys, tokens, etc.)
- Never hardcode credentials into the codebase
- Use GCP's Secret Manager for adding the keys
Refer to the http://localhost:8080/swagger/index.html#/ when running the backend for a list of available API endpoints and their usage.
- For more details on the project structure and code, refer to the individual files and directories.
- Ensure that you have the necessary environment variables set up for both the backend and frontend to function correctly.
- The app includes push notification functionality for alerting users about chemical updates. Users will be prompted to enable notifications when first accessing the app.


