-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set up github actions (status checks) (#1)
[chore]Set up basic navigation
- Loading branch information
1 parent
d4ee4e7
commit f9e3b8c
Showing
26 changed files
with
11,084 additions
and
5,693 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
module.exports = { | ||
extends: ['@calblueprint/eslint-config-react'], | ||
rules: { | ||
'react/react-in-jsx-scope': 'off', | ||
'react/jsx-uses-react': 'off', | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
## What's new in this PR | ||
|
||
### Description | ||
|
||
[//]: # "Required - Describe what's new in this PR in a few lines. A description and bullet points for specifics will suffice." | ||
|
||
### Screenshots | ||
|
||
[//]: # "Required for frontend changes, otherwise optional but strongly recommended. Add screenshots of expected behavior - GIFs if you're feeling fancy!" | ||
|
||
## How to review | ||
|
||
[//]: # 'Required - Describe the order in which to review files and what to expect when testing locally. Is there anything specifically you want feedback on? Should this be reviewed commit by commit, or all at once? What are some user flows to test? What are some edge cases to look out for?' | ||
|
||
## Next steps | ||
|
||
[//]: # "Optional - What's NOT in this PR, doesn't work yet, and/or still needs to be done. Note any temporary fixes in this PR that should be cleaned up later." | ||
|
||
## Relevant Links | ||
|
||
### Online sources | ||
|
||
[//]: # 'Optional - copy links to any tutorials or documentation that was useful to you when working on this PR' | ||
|
||
### Related PRs | ||
|
||
[//]: # "Optional - related PRs you're waiting on/ PRs that will conflict, etc; if this is a refactor, feel free to add PRs that previously modified this code" | ||
|
||
CC: @stephaniewong2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
--- | ||
name: Lint | ||
|
||
############################# | ||
# Start the job on push # | ||
############################# | ||
on: | ||
push: | ||
branches-ignore: [main] | ||
pull_request: | ||
branches: [main] | ||
|
||
############### | ||
# Set the Job # | ||
############### | ||
jobs: | ||
build: | ||
# Name the Job | ||
name: Run ESLint, Prettier, and TypeScript compiler | ||
# Set the agent to run on | ||
runs-on: ubuntu-latest | ||
|
||
################## | ||
# Load all steps # | ||
################## | ||
steps: | ||
########################## | ||
# Checkout the code base # | ||
########################## | ||
- name: Checkout Code | ||
uses: actions/checkout@v3 | ||
with: | ||
# Full git history is needed to get a proper | ||
# list of changed files within `super-linter` | ||
fetch-depth: 0 | ||
|
||
################################ | ||
# Install packages # | ||
################################ | ||
- name: Install packages | ||
run: npm ci | ||
################################ | ||
# Lint codebase # | ||
################################ | ||
- name: Run ESLint | ||
run: npx eslint . | ||
################################ | ||
# Check Prettier on codebase # | ||
################################ | ||
- name: Run Prettier | ||
run: npx prettier --check . | ||
################################ | ||
# Check for TypeScript errors # | ||
################################ | ||
- name: Run TypeScript compiler (tsc) | ||
run: npx tsc --noEmit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
npm run prepare | ||
npm run prettier |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
module.exports = { | ||
...require('@calblueprint/prettier-config'), | ||
// Add any overrides here | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"recommendations": [ | ||
"dbaeumer.vscode-eslint", | ||
"esbenp.prettier-vscode", | ||
"eamodio.gitlens" | ||
], | ||
"unwantedRecommendations": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"editor.codeActionsOnSave": { | ||
"source.formatDocument": true, | ||
"source.fixAll.eslint": true, | ||
"source.organizeImports": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { NavigationContainer } from '@react-navigation/native'; | ||
import { createNativeStackNavigator } from '@react-navigation/native-stack'; | ||
import React from 'react'; | ||
import WelcomeScreen from './src/screens/Authentication/Welcome/Welcome'; | ||
import CasesScreen from './src/screens/Cases/Cases'; | ||
import ProfileScreen from './src/screens/Profile/Profile'; | ||
import QRCodeScannerScreen from './src/screens/QRCodeScanner/QRCodeScanner'; | ||
import UpdatesScreen from './src/screens/Updates/Updates'; | ||
import { RootStackParamList } from './src/types/types'; | ||
|
||
export default function App() { | ||
const Stack = createNativeStackNavigator<RootStackParamList>(); | ||
return ( | ||
<NavigationContainer> | ||
<Stack.Navigator> | ||
<Stack.Screen name="Cases" component={CasesScreen} /> | ||
<Stack.Screen name="Welcome" component={WelcomeScreen} /> | ||
<Stack.Screen name="QRCodeScanner" component={QRCodeScannerScreen} /> | ||
<Stack.Screen name="Updates" component={UpdatesScreen} /> | ||
<Stack.Screen name="Profile" component={ProfileScreen} /> | ||
</Stack.Navigator> | ||
</NavigationContainer> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,66 @@ | ||
# impact-fund | ||
# Impact Fund | ||
|
||
This project is designed and developed by a team of UC Berkeley students through one of [Cal Blueprint](https://calblueprint.org/)'s project teams during the 2023-24 academic year. | ||
|
||
Learn more about [Impact Fund](https://www.impactfund.org/) and [Cal Blueprint](https://calblueprint.org/). | ||
|
||
--- | ||
|
||
## Getting Started | ||
|
||
### Prerequisites | ||
|
||
Check your installation of `npm` and `node`: | ||
|
||
```sh | ||
node -v | ||
npm -v | ||
``` | ||
|
||
We strongly recommend using a Node version manager like [nvm](https://github.com/nvm-sh/nvm) (for Mac) or [nvm-windows](https://github.com/coreybutler/nvm-windows) (for Windows) to install Node.js and npm. See [Downloading and installing Node.js and npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm). | ||
|
||
### Installation | ||
|
||
1. Clone the repo & install dependencies | ||
1. Clone this repo | ||
- using SSH (recommended) | ||
```sh | ||
git clone [email protected]:calblueprint/impact-fund.git | ||
``` | ||
- using HTTPS | ||
```sh | ||
git clone https://github.com/calblueprint/impact-fund.git | ||
``` | ||
2. Enter the cloned directory | ||
```sh | ||
cd impact-fund | ||
``` | ||
3. Install project dependencies. This command installs all packages from [`package.json`](package.json). | ||
```sh | ||
npm install | ||
``` | ||
2. Set up secrets: | ||
1. In the project's root directory (`impact-fund/`), create a new file named `.env` | ||
2. Copy the credentials from [Blueprint's internal Notion](https://www.notion.so/calblueprint/Environment-Variables-7647e2a6dad84c688fe4f43565523eaf) (access is required) and paste them into the `.env` file. | ||
|
||
**Helpful resources** | ||
|
||
- [GitHub: Cloning a Repository](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository#cloning-a-repository) | ||
- [GitHub: Generating SSH keys](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent) | ||
|
||
### Development environment | ||
|
||
- **[VSCode](https://code.visualstudio.com/) (recommended)** | ||
1. Open the `impact-fund` project in VSCode. | ||
2. Install recommended workspace VSCode extensions. You should see a pop-up on the bottom right to "install the recommended extensions for this repository". | ||
|
||
### Running the app | ||
|
||
1. In the project directory, run: | ||
```shell | ||
npx expo start | ||
``` | ||
2. There are several ways to test the app: | ||
- **Expo Go (Recommended)**: [download Expo Go](https://docs.expo.dev/get-started/installation/#2-expo-go-app-for-android-and) on your phone, **connect to same network as your laptop**, and use your phone camera to scan the QR code displayed in the command line. | ||
- Web: typing `w` into the expo command line opens the app in a web view. | ||
- Warning: since the app is designed to be used on a mobile app, web compatibility might be limited, and some functionality might be different when using the web setup. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.