Skip to content

Commit dd40fb3

Browse files
Merge pull request #18 from Aksh-Bansal-dev/patch-3
Auth
2 parents a754f56 + 0941786 commit dd40fb3

62 files changed

Lines changed: 2795 additions & 151 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.husky/.gitignore

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

.husky/commit-msg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx --no-install commitlint --edit $1

.husky/pre-commit

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
echo "Commiting..."
5+
npm run frontend:lint
6+
npm run server:lint

CONTRIBUTING.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,14 @@ commit messages are standardized:
3030
- Add remote upstream `git add upstream https://github.com/BitByte-TPC/TPC-website.git`
3131
- Run `npm i` in the root directory of the repository.
3232

33+
### Backend setup
34+
35+
- Start MongoDB server
36+
- Run `npm install` to install all dependencies
37+
- Make a `.env` file with all secrets. You also need to generate google client id and secret key. You may refer [to this](https://developers.google.com/identity/protocols/oauth2https://developers.google.com/adwords/api/docs/guides/authentication#create_a_client_id_and_client_secret) for the steps.
38+
> Note: Put `<server_url>/api/auth/google/redirect` in redirect url when generating google client id and secret.
39+
- Run `npm run dev` to start server
40+
3341
### Frontend setup
3442

3543
- Run `cd frontend`

README.md

Lines changed: 46 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,70 @@
11
# TPC-website
2+
23
This is the official website of the Programming Club at IIITDM Jabalpur
34

45
## Tech Stack
6+
57
- Frontend - React
6-
- Backend - Django
8+
- Backend - Express (nodejs)
79

810
## Fixing issues
11+
912
### Step 1: Pick an issue
13+
1014
After selecting an issue
15+
1116
1. Comment on the issue saying that you are working on the issue.
1217
2. We expect you to discuss the approach by comments.
1318
3. Updates or progress on the issue would be nice.
1419

1520
### Step 2: Follow branch policies
21+
1622
1. Create a new branch and switch to it (make sure you are on master before doing this).
17-
```
18-
git branch mybranch
19-
git checkout mybranch
20-
```
21-
'mybranch' can be replaced by your preferred name for the branch or the issue for which it was created.
22-
The above two commands are equivalent to the following
23-
```
24-
git checkout -b mybranch
25-
```
23+
24+
```
25+
git branch mybranch
26+
git checkout mybranch
27+
```
28+
29+
'mybranch' can be replaced by your preferred name for the branch or the issue for which it was created.
30+
The above two commands are equivalent to the following
31+
32+
```
33+
git checkout -b mybranch
34+
```
2635

2736
2. Make your changes and then execute the tests to make sure you didn't break anything.
2837

29-
```
30-
python3 manage.py test
31-
```
32-
Ensure that you follow [PEP8](https://www.python.org/dev/peps/pep-0008/#descriptive-naming-styles) style guide for python code while naming functions or classes.
38+
```
39+
python3 manage.py test
40+
```
41+
42+
Ensure that you follow [PEP8](https://www.python.org/dev/peps/pep-0008/#descriptive-naming-styles) style guide for python code while naming functions or classes.
3343

34-
Then stage them and commit them.
35-
Check out Chris Beams's guide to writing good commit messages [here](https://chris.beams.io/posts/git-commit/).
44+
Then stage them and commit them.
45+
Check out Chris Beams's guide to writing good commit messages [here](https://chris.beams.io/posts/git-commit/).
3646

37-
*A small description of your changes is must in the commit messages.*
47+
_A small description of your changes is must in the commit messages._
3848

3949
3. After you are done making changes, push the branch to your fork.
40-
```
41-
git push -u myfork mybranch
42-
```
43-
The **-u** option is required only the first time you push the branch.
50+
```
51+
git push -u myfork mybranch
52+
```
53+
The **-u** option is required only the first time you push the branch.
4454

45-
Make sure your branch is up-to-date with the latest version of the master. Else you are required to do a rebase to place your changes above master branch.
55+
Make sure your branch is up-to-date with the latest version of the master. Else you are required to do a rebase to place your changes above master branch.
4656

4757
### Step 3: Follow Coding policy
4858

49-
1. Please help us follow the best practice to make it easy for the reviewer as well as the contributor. We want to focus on the code quality more than on managing pull request ethics.
50-
2. Single commit per pull request
51-
3. For writing commit messages please adhere to the Commit style guidelines.
52-
4. Follow uniform design practices.
53-
5. The pull request will not get merged until and unless the commits are squashed. In case there are multiple commits on the PR, the commit author needs to squash them and not the maintainers cherrypicking and merging squashes.
54-
6. If the PR is related to any front end change, please attach relevant screenshots in the pull request description.
59+
1. Please help us follow the best practice to make it easy for the reviewer as well as the contributor. We want to focus on the code quality more than on managing pull request ethics.
60+
2. Single commit per pull request
61+
3. For writing commit messages please adhere to the Commit style guidelines.
62+
4. Follow uniform design practices.
63+
5. The pull request will not get merged until and unless the commits are squashed. In case there are multiple commits on the PR, the commit author needs to squash them and not the maintainers cherrypicking and merging squashes.
64+
6. If the PR is related to any front end change, please attach relevant screenshots in the pull request description.
5565

5666
### Step 4: Submitting a Pull request
67+
5768
Once a PR is opened, try and complete it within 2 weeks, or at least stay actively working on it. Inactivity for a long period may necessitate a closure of the PR. As mentioned earlier updates would be nice.
5869

5970
### Step 5: Code Review
@@ -63,16 +74,18 @@ Your code will be reviewed, by :
6374
1. Reviewer: A core team member will review your pull request and approve it or he will suggest changes.
6475

6576
### Step 6: Help us by reviewing other Pull Requests!
77+
6678
If you have the time and the knowledge then you must review other Pull Requests. This would stop Pull Requests from stacking up and will definitely mean your Pull Request would be reviewed faster.
6779

6880
**Things to keep in mind while reviewing a Pull Request:**
6981

7082
If any of the following questions has a **YES** for an answer then the request shall **NOT** be approved.
71-
* Will the referenced issue **NOT** be fixed with the Pull Request?
72-
* Is the commit message **NOT** good?
73-
* Are there unnecessary changes?
74-
* Is a rebase required?
75-
* Is the fix dirty / hacky?
83+
84+
- Will the referenced issue **NOT** be fixed with the Pull Request?
85+
- Is the commit message **NOT** good?
86+
- Are there unnecessary changes?
87+
- Is a rebase required?
88+
- Is the fix dirty / hacky?
7689

7790
## License
7891

commitlint.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = { extends: ['@commitlint/config-conventional'] };

frontend/package.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,20 @@
55
"dependencies": {
66
"@material-ui/core": "^4.11.4",
77
"@material-ui/icons": "^4.11.2",
8+
"@material-ui/lab": "^4.0.0-alpha.58",
89
"@testing-library/jest-dom": "^5.11.4",
910
"@testing-library/react": "^11.1.0",
1011
"@testing-library/user-event": "^12.1.10",
12+
"formik": "^2.2.6",
13+
"query-string": "^7.0.0",
1114
"react": "^17.0.1",
1215
"react-dom": "^17.0.1",
1316
"react-router-dom": "^5.2.0",
1417
"react-scripts": "^4.0.3",
15-
"web-vitals": "^0.2.4"
18+
"swr": "^0.5.6",
19+
"web-vitals": "^0.2.4",
20+
"yup": "^0.32.9",
21+
"zustand": "^3.5.1"
1622
},
1723
"scripts": {
1824
"start": "react-scripts start",
Lines changed: 47 additions & 0 deletions
Loading
26.5 KB
Loading
-11.2 KB
Binary file not shown.

0 commit comments

Comments
 (0)