README.md 4.09 KB
Newer Older
Zuubatman's avatar
Zuubatman committed
1
# Pagges Mobile
João Vitor Morandi's avatar
João Vitor Morandi committed
2

Guilherme Moraes's avatar
Guilherme Moraes committed
3
Pagges mobile repository
João Vitor Morandi's avatar
João Vitor Morandi committed
4

Guilherme Moraes's avatar
Guilherme Moraes committed
5
## Dependency Installation
João Vitor Morandi's avatar
João Vitor Morandi committed
6

Guilherme Moraes's avatar
Guilherme Moraes committed
7
- Install [Expo GO](https://expo.dev/go) on your mobile device;
João Vitor Morandi's avatar
João Vitor Morandi committed
8

Guilherme Moraes's avatar
Guilherme Moraes committed
9
- Install [Node.js](https://nodejs.org/en);
João Vitor Morandi's avatar
João Vitor Morandi committed
10

Guilherme Moraes's avatar
Guilherme Moraes committed
11
- Install [VSCode](https://code.visualstudio.com/);
João Vitor Morandi's avatar
João Vitor Morandi committed
12

Guilherme Moraes's avatar
Guilherme Moraes committed
13
- Install the `Prettier` extension in VSCode;
Zuubatman's avatar
Zuubatman committed
14

Guilherme Moraes's avatar
Guilherme Moraes committed
15
- Install the `ES7+ React/Redux/React-Native` snippets extension in VSCode.
Guilherme Moraes's avatar
Guilherme Moraes committed
16

Guilherme Moraes's avatar
Guilherme Moraes committed
17
## Clone the Repository
João Vitor Morandi's avatar
João Vitor Morandi committed
18

Guilherme Moraes's avatar
Guilherme Moraes committed
19
- Create a folder for the repository;
Zuubatman's avatar
Zuubatman committed
20

Guilherme Moraes's avatar
Guilherme Moraes committed
21
22
23
24
- Open a terminal inside the folder and clone the repository:
  ```bash
  git clone https://tools.ages.pucrs.br/pagges/pagges-mobile.git
  ```
Guilherme Moraes's avatar
Guilherme Moraes committed
25

Guilherme Moraes's avatar
Guilherme Moraes committed
26
## How to Run the Project?
Guilherme Moraes's avatar
Guilherme Moraes committed
27

Guilherme Moraes's avatar
Guilherme Moraes committed
28
1. Navigate to the `pagges-mobile` folder:
Guilherme Moraes's avatar
Guilherme Moraes committed
29

Guilherme Moraes's avatar
Guilherme Moraes committed
30
2. Install the project dependencies:
João Vitor Morandi's avatar
João Vitor Morandi committed
31

Guilherme Moraes's avatar
Guilherme Moraes committed
32
33
34
   ```bash
   npm install
   ```
João Vitor Morandi's avatar
João Vitor Morandi committed
35

Guilherme Moraes's avatar
Guilherme Moraes committed
36
3. Start the project:
João Vitor Morandi's avatar
João Vitor Morandi committed
37

Guilherme Moraes's avatar
Guilherme Moraes committed
38
39
40
   ```bash
   npm run start
   ```
João Vitor Morandi's avatar
João Vitor Morandi committed
41

Guilherme Moraes's avatar
Guilherme Moraes committed
42
43
44
45
4. Scan the QR Code with your phone.
   - On Android, use **Expo Go > Scan QR**.
   - On iOS, use the default camera app.

46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#ESLint

## Required Extensions

- Install the `ESLint` extension in VSCode

## How to Run ESLint

1. To check for linting errors in your code:

   ```bash
   npx eslint path/to/file
   ```

   So if you want to run the ESLint for the entire project you can run from root:

   ```bash
   npx eslint app
   ```

2. To automatically fix linting errors:

   ```bash
   npx eslint --fix
   ```

Note: ESLint will automatically run when you save files if you have the ESLint extension installed in VSCode.

# Prettier

## Required Extensions

- Install the `Prettier` extension in VSCode

- Open the Command Pallete (Ctrl + Shift + P) and search for "Preferences: Open User Settings (JSON)"

- Enable "Format on Save" in your VSCode by adding this to the settings:

{
...
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
}

Now Prettier will automatically format your code when you save files (Ctrl + S) if you have the Prettier extension installed in VSCode.

Guilherme Moraes's avatar
Guilherme Moraes committed
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
# Branch Naming Convention

## Format

### Types:

- `feature/` → For new features
- `fix/` → For bug fixes
- `refactor/` → For code refactoring or improvements

### Examples:

- `feature/US-01-login-page`
- `fix/US-02-login-error`
- `refactor/US-03-optimize-api-calls`

### Rules:

1. **US-XX**: Represents the user story or issue number.
2. **SHORT-NAME**: A concise description of the feature, fix, or refactor.
3. **Use lowercase** for the short name and separate words with hyphens (`-`).
4. **Keep it short and meaningful**.

This ensures consistency across branches and makes it easier to track work in progress.

# Commit Message Conventions

- The `<TYPE>` defines the purpose of the commit.
- The `<Short description>` should be concise and written in **present tense** (e.g., "add login validation" instead of "added login validation").

---

## Commit Types:

- **feat**: A new feature  
  _Example:_ `feat: add user profile page`
- **fix**: A bug fix  
  _Example:_ `fix: resolve login validation error`
- **refactor**: Code restructuring without changing behavior  
  _Example:_ `refactor: improve authentication logic`
- **docs**: Documentation updates  
  _Example:_ `docs: update README with setup instructions`
- **style**: Code style changes (formatting, missing semicolons, etc.), no functional changes  
  _Example:_ `style: fix indentation in settings component`
- **test**: Adding or updating tests  
  _Example:_ `test: add unit tests for login service`
- **chore**: Maintenance tasks, dependency updates, or build process changes  
  _Example:_ `chore: update eslint dependencies`
- **perf**: Performance improvements  
  _Example:_ `perf: optimize database query for faster response time`
- **ci**: Continuous integration updates  
  _Example:_ `ci: add GitHub Actions workflow for testing`
- **build**: Changes that affect the build system or external dependencies  
  _Example:_ `build: upgrade Webpack to version 5`

---

## Additional Guidelines:

1. **Use lowercase** for commit types.
2. **Keep descriptions concise** but meaningful.
3. **Use imperative mood** (_"fix issue"_, not _"fixed issue"_).
4. **Reference issues if applicable** (e.g., `fix: resolve login issue (#123)`).
5. **Use multiple types when needed**  
   _Example:_ `feat(auth): add JWT token refresh`