Skip to content

Commit

Permalink
Initial Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelcsx committed Nov 10, 2023
0 parents commit b43881b
Show file tree
Hide file tree
Showing 47 changed files with 20,787 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Learn more https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files

# dependencies
node_modules/

# Expo
.expo/
dist/
web-build/

# Native
*.orig.*
*.jks
*.p8
*.p12
*.key
*.mobileprovision

# Metro
.metro-health-check*

# debug
npm-debug.*
yarn-debug.*
yarn-error.*

# macOS
.DS_Store
*.pem

# local env files
.env*.local
.env

# typescript
*.tsbuildinfo
11 changes: 11 additions & 0 deletions App.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React, { useState, useEffect, useRef } from 'react';
import { NavigationContainer } from '@react-navigation/native';
import TabNavigator from './app/tabs/TabNavigator';

export default function App() {
return (
<NavigationContainer>
<TabNavigator />
</NavigationContainer>
);
}
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 Miguel Cárdenas

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
47 changes: 47 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# PillMate

![PillMate Logo](./assets/images/splash.png)

## Overview

PillMate is a mobile application designed to improve medication adherence and enhace personal health management. Built with [React Native](https://reactnative.dev/) and [Expo](https://expo.dev/), it provides intelligent medication reminders, seamless communication with healthcare professionals, and a comprehensive health experience.


## Features

- **Intelligent Medication Reminders**: Utilizes artificial intelligence to personalize medication notifications based on user needs.

- **Healthcare Professional Communication**: Facilitates easy communication between users and their healthcare providers, ensuring coordinated and effective healthcare.

- **Comprehensive Personal Health Experience**: Goes beyond simple medication reminders, allowing users to store medical information, access updated health news, and maintain health records.

- **Data Security**: Committed to protecting user information with the highest standards of security and compliance.


## Getting Started

### Prerequisites

- Node.js and npm installed

- Expo CLI installed globally (`npm install -g expo-cli`)

### Installation

1. Clone the repository `git clone https://github.com/miguelcsx/pillmate.git`
2. Navigate to the project directory `cd pillmate`
3. Install dependencies `npm install`
4. Start the Expo development server: `npm start`

## Usage

- Scan the QR code generated by Expo to launch the app on you Expo client.
- Explore the features and functionalities to understand how PillMate enhances medication management and personal health.

## Contributing

We welcome contributions! If you find any issues or have suggestions for improvements, fell free to open an issue or submit a pull request.

## License

This project is licensed under the [MIT License](./LICENSE)
47 changes: 47 additions & 0 deletions app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"expo": {
"plugins": [
[
"expo-notifications",
{
"icon": "./assets/images/icon.png",
"sounds": [
"./assets/sounds/mynotification.wav"
]
}
]
],
"name": "pillmate",
"slug": "pillmate",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/images/icon.png",
"userInterfaceStyle": "light",
"splash": {
"image": "./assets/images/splash.png",
"resizeMode": "contain",
"backgroundColor": "#4b648c"
},
"assetBundlePatterns": [
"**/*"
],
"ios": {
"supportsTablet": true
},
"android": {
"adaptiveIcon": {
"foregroundImage": "./assets/images/adaptive-icon.png",
"backgroundColor": "#ffffff"
},
"package": "com.mc107.pillmate"
},
"web": {
"favicon": "./assets/images/favicon.png"
},
"extra": {
"eas": {
"projectId": "2a640618-5b9a-4b61-8b5f-7099bcbd18f4"
}
}
}
}
50 changes: 50 additions & 0 deletions app/components/AddMed.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
import React from "react";
import { useNavigation } from "@react-navigation/native";
import { Pressable, StyleSheet, Text, View } from "react-native";
import { Ionicons } from "@expo/vector-icons";

const AddMed = () => {
const navigation = useNavigation();

const handleAddMedClick = () => {
// Navigate to the screen to add a new medication
navigation.navigate("MedicationTracker");
};

return (
<View style={styles.container}>
<Pressable style={styles.addButton} onPress={handleAddMedClick}>
<View style={styles.buttonContent}>
<Ionicons name="add" size={20} color="white" style={styles.icon} />
<Text style={styles.buttonText}>Add Med</Text>
</View>
</Pressable>
</View>
);
};

const styles = StyleSheet.create({
container: {
position: "absolute",
bottom: 20,
right: 20,
},
addButton: {
backgroundColor: "#00358b",
borderRadius: 10,
padding: 10,
},
buttonContent: {
flexDirection: "row",
alignItems: "center",
},
icon: {
marginRight: 4, // Adjust the margin as needed
},
buttonText: {
color: "white",
fontSize: 16,
},
});

export default AddMed;
64 changes: 64 additions & 0 deletions app/components/AdherenceBox.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
import React from "react";
import { View, Text, StyleSheet, Pressable } from "react-native";
import ProgressBar from "react-native-progress/Bar";

const AdherenceBox = ({ takenMeds, totalMeds, onPress }) => {
// Check if totalMeds is zero, and set percentage accordingly
const percentage = totalMeds === 0 ? 0 : (takenMeds / totalMeds) * 100;

return (
<Pressable onPress={onPress}>
<View style={styles.container}>
<Text style={styles.title}>Today's Adherence</Text>
<View style={styles.infoContainer}>
<Text style={styles.infoText}>Taken meds</Text>
<Text style={styles.counterText}>{`${takenMeds}/${totalMeds}`}</Text>
</View>
<Text style={styles.percentageText}>{`${percentage.toFixed(0)}%`}</Text>
<ProgressBar
progress={percentage / 100}
width={null}
style={styles.progressBar}
/>
</View>
</Pressable>
);
};

const styles = StyleSheet.create({
container: {
width: "100%",
backgroundColor: "#ADC8E6",
borderRadius: 20,
padding: 16,
marginVertical: 4,
},
title: {
fontSize: 14,
fontWeight: "bold",
marginBottom: 4,
},
infoContainer: {
flexDirection: "row",
alignItems: "center",
},
infoText: {
flex: 1,
fontSize: 12,
},
counterText: {
fontSize: 12,
fontWeight: "bold",
},
percentageText: {
fontSize: 30,
fontWeight: "bold",
marginTop: 16,
},
progressBar: {
width: "auto",
marginTop: 8,
},
});

export default AdherenceBox;
Loading

0 comments on commit b43881b

Please sign in to comment.