Skip to content

Commit ee2c04a

Browse files
committed
docs: contributing, ci/cd, frontend setup
1 parent 7747a39 commit ee2c04a

File tree

8 files changed

+79
-28
lines changed

8 files changed

+79
-28
lines changed

.github/pull_request_template.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
## Description
2+
3+
Include a basic outline here of what this pull request is doing.
4+
5+
References and fixes [link to GitHub issue](https://github-issue-link-url.com).
6+
7+
### Imposed Changes
8+
- Item #1
9+
- Item #2
10+
11+
### Testing Procedures
12+
- Testing procedure #1
13+
- Testing procedure #2
14+
15+
### Checklist
16+
- [x] I have read the CONTRIBUTING.md.
17+
- [x] I have self-reviewed my code and written tests.
18+
- [x] I have made corresponding changes to the documentation.
19+
- [x] All unit tests are passing locally.
20+
- [x] **I have merged the most recent commit from `main` into my branch.**

.github/workflows/frontend.yml

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,50 @@
11
name: frontend
22

3-
permissions:
4-
contents:
5-
read: all
6-
write: all
7-
83
on:
94
push:
105
branches:
116
- "**"
12-
paths:
13-
- "frontend/**"
147

158
jobs:
169
format:
17-
name: format
10+
name: Format Code
1811
runs-on: ubuntu-latest
1912
steps:
2013
- name: Checkout Code
2114
uses: actions/checkout@v4
2215
- name: Setup Bun
2316
uses: oven-sh/setup-bun@v2
2417
- name: Install Dependencies
25-
run: cd frontend && bun install
26-
- name: Format Code
27-
run: cd frontend && bun run format
18+
run: bun install
19+
working-directory: frontend
20+
- name: Format
21+
run: bun run format
22+
working-directory: frontend
2823
lint:
29-
name: lint
24+
name: "Lint Code"
3025
runs-on: ubuntu-latest
3126
steps:
3227
- name: Checkout Code
3328
uses: actions/checkout@v4
3429
- name: Setup Bun
3530
uses: oven-sh/setup-bun@v2
3631
- name: Install Dependencies
37-
run: cd frontend && bun install
38-
- name: Lint Code
39-
run: cd frontend && bun run lint
32+
run: bun install
33+
working-directory: frontend
34+
- name: Lint
35+
run: bun run lint
36+
working-directory: frontend
4037
test:
41-
name: test
38+
name: Test Code
4239
runs-on: ubuntu-latest
4340
steps:
4441
- name: Checkout Code
4542
uses: actions/checkout@v4
4643
- name: Setup Bun
4744
uses: oven-sh/setup-bun@v2
4845
- name: Install Dependencies
49-
run: cd frontend && bun install
50-
- name: Test Code
51-
run: cd frontend && bun run test
46+
run: bun install
47+
working-directory: frontend
48+
- name: Test
49+
run: bun run test
50+
working-directory: frontend

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# jetbrains files
2+
.idea/
3+
4+
# visual studio code files
5+
.vscode/

docs/CONTRIBUTING.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
### Contributing
2+
3+
**Before making a commit, make sure the lint, test, and format checks pass.**
4+
5+
1. Create a pull request and fill out the provided template. Ensure all fields are filled and that **the title is detailed**.
6+
2. In order for a PR to be merged, it requires at least one approval from a technical lead, as well as a fully passing CI/CD pipeline. This is to ensure the commit tree in our main branch is clean and well-tested. To help with this, all pull requests will be squashed and merged.
7+
3. In the case your PR is not initially approved, a technical lead will leave suggestions to improve. Once you have incorporated said improvements, feel free to re-request a review or message one of your TLs on Slack for another review.
8+
9+
### Best Practices
10+
11+
- We use [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) for our commit messages. This methodology ensures uniformity, clarity, and ease of understanding for all contributors.
12+
- Make sure to write tests for the most complex parts of your code.
13+
- For manual API testing, include screenshots from Postman.
14+
- Go uses **TitleCase** and React Native uses **camelCase** for naming conventions.
15+
16+
### If you have time...
17+
18+
- *Want to go that extra level?* — Consider checking out [act](https://github.com/nektos/act).
19+
- If you're *real interested* in industry-level commit practices, consider [GPG/PGP signing](https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits) your commits.

docs/FRONTEND-SETUP.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
### Frontend Setup
2+
3+
**Please setup the backend before proceeding.**
4+
5+
1. Create a new `.env` file in the root of the frontend directory with the contents of `.env.example`.
6+
2. TODO: nix setup & configuration.

frontend/.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
EXPO_PUBLIC_BASE_URL=

frontend/.eslintrc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// https://docs.expo.dev/guides/using-eslint/
22
module.exports = {
33
extends: ["expo", "prettier"],
4+
plugins: ["prettier"],
45
ignorePatterns: ["/dist/*"],
56
rules: {
67
"prettier/prettier": "error",

frontend/package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"preset": "jest-expo"
1515
},
1616
"dependencies": {
17-
"@expo/vector-icons": "^14.0.2",
17+
"@expo/vector-icons": "^14.0.4",
1818
"@react-navigation/bottom-tabs": "^7.2.0",
1919
"@react-navigation/native": "^7.0.14",
2020
"@testing-library/react-native": "^12.9.0",
@@ -37,23 +37,23 @@
3737
"react-dom": "18.3.1",
3838
"react-native": "0.76.5",
3939
"react-native-gesture-handler": "~2.20.2",
40-
"react-native-reanimated": "~3.16.1",
40+
"react-native-reanimated": "~3.16.6",
4141
"react-native-safe-area-context": "4.12.0",
4242
"react-native-screens": "~4.4.0",
4343
"react-native-web": "~0.19.13",
4444
"react-native-webview": "13.12.5"
4545
},
4646
"devDependencies": {
47-
"@babel/core": "^7.25.2",
48-
"@types/jest": "^29.5.12",
49-
"@types/react": "~18.3.12",
50-
"@types/react-test-renderer": "^18.3.0",
51-
"eslint": "^8.57.0",
47+
"@babel/core": "^7.26.0",
48+
"@types/jest": "^29.5.14",
49+
"@types/react": "~18.3.18",
50+
"@types/react-test-renderer": "^18.3.1",
51+
"eslint": "^8.57.1",
5252
"eslint-config-expo": "~8.0.1",
53-
"jest": "^29.2.1",
53+
"jest": "^29.7.0",
5454
"jest-expo": "~52.0.2",
5555
"react-test-renderer": "18.3.1",
56-
"typescript": "^5.3.3",
56+
"typescript": "^5.7.2",
5757
"@types/bun": "latest"
5858
},
5959
"private": true

0 commit comments

Comments
 (0)