Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/onboarding flow enhancements 2 #48

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

### Feat

- **client**: fixed, refactored and improevd frontend services and contexts
- **files-+-tasks**: filterable based on users and tags

### Fix
Expand Down
205 changes: 111 additions & 94 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# Legacy

An all-encompassing end-of-life planning app.

## Running Application

### Prerequisites

- [Node.js](https://nodejs.org/en/)
- [yarn](https://yarnpkg.com/en/)
- [expo](https://expo.io/)
Expand All @@ -15,124 +17,139 @@ An all-encompassing end-of-life planning app.
### Setup

1. **Clone the repository**
```bash
git clone https://github.com/GenerateNU/legacy.git
cd legacy
```

```bash
git clone https://github.com/GenerateNU/legacy.git
cd legacy
```

2. **Install dependencies**
```bash
cd client
yarn install
```

* If you get an error about `expo-cli` not being installed, run `yarn global add expo-cli` and then run `yarn install` again.
```bash
cd client
yarn install
```

```bash
cd server
go get ./...
```
- If you get an error about `expo-cli` not being installed, run `yarn global add expo-cli` and then run `yarn install` again.

* If this doesnt work, try running `go mod tidy` and then `go get ./...` again or delete the go.mod and go.sum files and then run `go mod init server` and `go mod tidy` again.
```bash
cd server
go get ./...
```

- If this doesnt work, try running `go mod tidy` and then `go get ./...` again or delete the go.mod and go.sum files and then run `go mod init server` and `go mod tidy` again.

3. **Install requirements.txt**
```bash
pip install -r requirements.txt
pre-commit install
```

* Using a virtual environment is not necessary, but recommended.
```bash
pip install -r requirements.txt
pre-commit install
```

- Using a virtual environment is not necessary, but recommended.

### Running

1. **Create client build**
```bash
cd client
eas login
eas build:configure
# ios
eas build -p ios --profile development
# android
eas build -p android --profile development

```

```bash
cd client
eas login
eas build:configure
# ios
eas build -p ios --profile development
# android
eas build -p android --profile development

```

2. **Download the build and drag into simulator**

1. **Start the client**
```bash
cd client
npx expo start --dev-client
```
3. **Start the client**

```bash
cd client
npx expo start --dev-client
```

- You can then open the app in the Expo app in the simulator.

* You can then open the app in the Expo app in the simulator.
4. **Start Postgres**

2. **Start Postgres**
- MacOS
```bash
brew services start postgresql@[version]
```
- MacOS

- Windows
```bash
pg_ctl -D /usr/local/var/postgres start
```
```bash
brew services start postgresql@[version]
```

3. **Start the server**
```bash
cd server
task run
```
- Windows

* If this returns an error like 'air does not exist' try running
```bash
go install github.com/cosmtrek/air@latest
```
```bash
pg_ctl -D /usr/local/var/postgres start
```

5. **Start the server**

```bash
cd server
task run
```

- If this returns an error like 'air does not exist' try running

```bash
go install github.com/cosmtrek/air@latest
```

## Contributing

### Getting Started

1. **Clone the repository**
```bash
git clone <repository-url>
```

```bash
git clone <repository-url>
```

2. **Create a new branch**
```bash
git checkout -b feature/<branch-name>
```

```bash
git checkout -b feature/<branch-name>
```

3. **Make changes and commit changes:**

- **Commit changes**
```bash
git add .
cz commit
```
- **Commit changes**

```bash
git add .
cz commit
```

* You are not required to use commitizen, but it is recommended. If you choose not to use commitizen, please follow the commit message format described [here](#commit-messages).

- **Bump version**
```bash
cz bump
```
- You are not required to use commitizen, but it is recommended. If you choose not to use commitizen, please follow the commit message format described [here](#commit-messages).

* We use pre-commits that allow us to format code before committing. This ensures that all code is formatted the same way. If your code gets formatted you will need to run `git add .` again before committing to add the formatted code to the commit. You can also run `task format` to format all code.
- **Bump version**
```bash
cz bump
```

* More information on commit messages can be found [here](#commit-messages).
* We use pre-commits that allow us to format code before committing. This ensures that all code is formatted the same way. If your code gets formatted you will need to run `git add .` again before committing to add the formatted code to the commit. You can also run `task format` to format all code.

* More information on commit messages can be found [here](#commit-messages).

4. **Push changes to GitHub**
```bash
git push origin feature/<branch-name>
```

```bash
git push origin feature/<branch-name>
```

5. **Create a pull request**
- Go to the [repository](https://github.com/GenerateNU/legacy) on GitHub
- Click on the `Pull requests` tab
- Click on the `New pull request` button
- Select the `base` branch as `main`
- Select the `compare` branch as `feature/<branch-name>`
- Click on the `Create pull request` button
- Go to the [repository](https://github.com/GenerateNU/legacy) on GitHub
- Click on the `Pull requests` tab
- Click on the `New pull request` button
- Select the `base` branch as `main`
- Select the `compare` branch as `feature/<branch-name>`
- Click on the `Create pull request` button

### Commit Messages

Expand All @@ -146,20 +163,20 @@ cz bump
- Commit messages should be in the present tense.
- Keep them short and concise. If necessary, add a longer description in the body of the commit.
- Use the following format for commit messages:
```
<type>: <subject>
<BLANK LINE>
<body>
```
```
<type>: <subject>
<BLANK LINE>
<body>
```
- The `<type>` can be one of the following:
- **feat**: A new feature
- **fix**: A bug fix
- **docs**: Documentation only changes
- **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc.)
- **refactor**: A code change that neither fixes a bug nor adds a feature
- **perf**: A code change that improves performance
- **test**: Adding missing tests
- **chore**: Changes to the build process or auxiliary tools and libraries such as documentation generation
- **feat**: A new feature
- **fix**: A bug fix
- **docs**: Documentation only changes
- **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc.)
- **refactor**: A code change that neither fixes a bug nor adds a feature
- **perf**: A code change that improves performance
- **test**: Adding missing tests
- **chore**: Changes to the build process or auxiliary tools and libraries such as documentation generation

### Pull Requests

Expand Down
36 changes: 18 additions & 18 deletions client-new/App.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { StatusBar } from 'expo-status-bar';
import { StyleSheet, Text, View } from 'react-native';
import Router from '@/navigation/Router';
import { NativeBaseProvider, extendTheme } from 'native-base';
import { SafeAreaProvider } from 'react-native-safe-area-context';
import { AuthProvider } from '@/contexts/AuthContext';
import { StatusBar } from "expo-status-bar";
import { StyleSheet, Text, View } from "react-native";
import Router from "@/navigation/Router";
import { NativeBaseProvider, extendTheme } from "native-base";
import { SafeAreaProvider } from "react-native-safe-area-context";
import { UserProvider } from "@/contexts/UserContext";
import {
useFonts,
DMSans_400Regular,
Expand All @@ -14,13 +14,11 @@ import {
DMSans_700Bold_Italic
} from '@expo-google-fonts/dm-sans';
import React from 'react';

import { QueryClient, QueryClientProvider } from 'react-query';

const queryClient = new QueryClient();

import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import { Inter_400Regular, Inter_600SemiBold } from '@expo-google-fonts/inter';
import { ProfileProvider } from "./src/contexts/ProfileContext";

const queryClient = new QueryClient();

export default function App() {
const [fontsLoaded] = useFonts({
Expand Down Expand Up @@ -95,13 +93,15 @@ export default function App() {

return (
<QueryClientProvider client={queryClient}>
<AuthProvider>
<SafeAreaProvider>
<NativeBaseProvider theme={theme}>
<Router />
</NativeBaseProvider>
</SafeAreaProvider>
</AuthProvider>
<UserProvider>
<ProfileProvider>
<SafeAreaProvider>
<NativeBaseProvider theme={theme}>
<Router />
</NativeBaseProvider>
</SafeAreaProvider>
</ProfileProvider>
</UserProvider>
</QueryClientProvider>
);
}
Expand Down
File renamed without changes.
4 changes: 3 additions & 1 deletion client-new/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,12 @@
"dependencies": {
"@expo-google-fonts/dm-sans": "^0.2.3",
"@expo-google-fonts/inter": "^0.2.3",
"@react-native-async-storage/async-storage": "^1.19.8",
"@react-native-community/slider": "^4.4.3",
"@react-navigation/bottom-tabs": "^6.5.11",
"@react-navigation/native": "^6.1.8",
"@react-navigation/native-stack": "^6.9.14",
"@tanstack/react-query": "^5.8.4",
"@ronradtke/react-native-markdown-display": "^8.0.0",
"@types/react": "^18.2.28",
"@types/react-dom": "^18.2.13",
Expand Down Expand Up @@ -59,4 +61,4 @@
"typescript": "^5.1.3"
},
"private": true
}
}
42 changes: 21 additions & 21 deletions client-new/patches/native-base+3.4.28.patch
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
diff --git a/node_modules/native-base/src/core/NativeBaseProvider.tsx b/node_modules/native-base/src/core/NativeBaseProvider.tsx
index 43b4bd1..dd1329c 100644
--- a/node_modules/native-base/src/core/NativeBaseProvider.tsx
+++ b/node_modules/native-base/src/core/NativeBaseProvider.tsx
@@ -4,7 +4,6 @@ import {
Metrics,
initialWindowMetrics as defaultInitialWindowMetrics,
} from 'react-native-safe-area-context';
-import { SSRProvider } from '@react-native-aria/utils';
import { theme as defaultTheme, ITheme } from './../theme';
import type { IColorModeProviderProps } from './color-mode';
import HybridProvider from './hybrid-overlay/HybridProvider';
@@ -94,7 +93,7 @@ const NativeBaseProvider = (props: NativeBaseProviderProps) => {
<OverlayProvider isSSR>
<ToastProvider>
<InitializeToastRef />
- <SSRProvider>{children}</SSRProvider>
+ {children}
</ToastProvider>
</OverlayProvider>
</HybridProvider>
# diff --git a/node_modules/native-base/src/core/NativeBaseProvider.tsx b/node_modules/native-base/src/core/NativeBaseProvider.tsx
# index 43b4bd1..dd1329c 100644
# --- a/node_modules/native-base/src/core/NativeBaseProvider.tsx
# +++ b/node_modules/native-base/src/core/NativeBaseProvider.tsx
# @@ -4,7 +4,6 @@ import {
# Metrics,
# initialWindowMetrics as defaultInitialWindowMetrics,
# } from 'react-native-safe-area-context';
# -import { SSRProvider } from '@react-native-aria/utils';
# import { theme as defaultTheme, ITheme } from './../theme';
# import type { IColorModeProviderProps } from './color-mode';
# import HybridProvider from './hybrid-overlay/HybridProvider';
# @@ -94,7 +93,7 @@ const NativeBaseProvider = (props: NativeBaseProviderProps) => {
# <OverlayProvider isSSR>
# <ToastProvider>
# <InitializeToastRef />
# - <>{children}</SSRProvider>
# + {children}
# </ToastProvider>
# </OverlayProvider>
# </HybridProvider>
Loading
Loading