Skip to content

Commit 660c349

Browse files
committed
renaming files and changing directory layout in Contributing.md
1 parent 68087db commit 660c349

Some content is hidden

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

68 files changed

+218
-282
lines changed

CONTRIBUTING.md

+91-53
Original file line numberDiff line numberDiff line change
@@ -11,49 +11,85 @@ This section will walk you through how you can get started with the project.
1111
<pre>
1212

1313
├── <strong>client</strong>
14+
| └── <strong>src</strong>
15+
| ├── <strong>assets</strong>
16+
| ├── <strong>components</strong>
17+
| | ├── <strong>chatComp</strong>
18+
| | ├── <strong>commentComp</strong>
19+
| | ├── <strong>contractComp</strong>
20+
| | ├── <strong>generalComp</strong>
21+
| | ├── <strong>homeComp</strong>
22+
| | ├── <strong>postComp</strong>
23+
| | └── <strong>profileComp</strong>
24+
| |
25+
| ├── <strong>pages</strong>
26+
| | ├── <strong>Chat.tsx</strong>
27+
| | ├── <strong>Contracts.tsx</strong>
28+
| | ├── <strong>Home.tsx</strong>
29+
| | ├── <strong>Login.tsx</strong>
30+
| | ├── <strong>Profile.tsx</strong>
31+
| | └── <strong>Register.tsx</strong>
32+
| |
33+
| ├── <strong>types</strong>
34+
| | ├── <strong>chatTypes.ts</strong>
35+
| | ├── <strong>commentTypes.ts</strong>
36+
| | ├── <strong>contractTypes.ts</strong>
37+
| | ├── <strong>messageTypes.ts</strong>
38+
| | ├── <strong>postTypes.ts</strong>
39+
| | ├── <strong>searchTypes.ts</strong>
40+
| | └── <strong>userTypes.ts</strong>
41+
| |
42+
| └── <strong>utils</strong>
43+
| ├── <strong>apiRoutes.ts</strong>
44+
| ├── <strong>globalConstants.ts</strong>
45+
| ├── <strong>globalStyles.ts</strong>
46+
| ├── <strong>helperFunction.ts</strong>
47+
| ├── <strong>outsideAlerter.ts</strong>
48+
| └── <strong>themes.ts</strong>
1449
|
15-
├── <strong>server</strong>
16-
| ├── <strong>controllers</strong>
17-
| ├── <strong>authController.js</strong>
18-
| ├── <strong>chatController.js</strong>
19-
| │ └── <strong>commentController.js</strong>
20-
| │ └── <strong>errorController.js</strong>
21-
| │ └── <strong>handlerFactory.js</strong>
22-
| │ └── <strong>messageController.js</strong>
23-
| │ └── <strong>postcontrollers.js</strong>
24-
| └── <strong>usercontrollers.js</strong>
25-
|
26-
| ├── <strong>models</strong>
27-
| ├── <strong>chatModel.js</strong>
28-
| ├── <strong>commentModel.js</strong>
29-
| │ └── <strong>contractModel.js</strong>
30-
| │ └── <strong>messageModel.js</strong>
31-
| │ └── <strong>postModel.js</strong>
32-
| └── <strong>userModel.js</strong>
33-
|
34-
| ├── <strong>Routes</strong>
35-
| ├── <strong>chatRoutes.js</strong>
36-
| ├── <strong>commentRoutes.js</strong>
37-
| │ └── <strong>contractRoutes.js</strong>
38-
| │ └── <strong>messageRoutes.js</strong>
39-
| │ └── <strong>postRoutes.js</strong>
40-
| └── <strong>userRoutes.js</strong>
41-
| |
42-
| ├── <strong>utils</strong>
43-
| ├── <strong>apiFeatures.js</strong>
44-
| ├── <strong>appError.js</strong>
45-
| │ └── <strong>catchAsync.js</strong>
46-
| │ └── <strong>email.js</strong>
47-
| └── <strong>exludedFields.js</strong>
48-
| |
49-
| ├── <strong>views</strong>
50-
| ├── <strong>_style.pug</strong>
51-
| ├── <strong>baseEmail.pug</strong>
52-
| │ └── <strong>passwordReset.pug</strong>
53-
| └── <strong>welcome.pug</strong>
54-
|
55-
| └── app.js
50+
├── <strong>controllers</strong>
51+
| ├── <strong>authController.js</strong>
52+
| ├── <strong>chatController.js</strong>
53+
| ├── <strong>commentController.js</strong>
54+
| ── <strong>contractController.js</strong>
55+
| ── <strong>errorController.js</strong>
56+
| ── <strong>handlerController.js</strong>
57+
| ── <strong>messageController.js</strong>
58+
| ── <strong>postController.js</strong>
59+
| └── <strong>userController.js</strong>
60+
|
61+
├── <strong>models</strong>
62+
| ├── <strong>chatModel.js</strong>
63+
| ├── <strong>commentModel.js</strong>
64+
| ── <strong>contractModel.js</strong>
65+
| ── <strong>messageModel.js</strong>
66+
| ── <strong>postModel.js</strong>
67+
| └── <strong>userModel.js</strong>
68+
|
69+
├── <strong>routes</strong>
70+
| ├── <strong>chatRoutes.js</strong>
71+
| ├── <strong>commentRoutes.js</strong>
72+
| ── <strong>contractRoutes.js</strong>
73+
| ── <strong>messageRoutes.js</strong>
74+
| ── <strong>postRoutes.js</strong>
75+
| └── <strong>userRoutes.js</strong>
76+
|
77+
├── <strong>utils</strong>
78+
| ├── <strong>apiFeatures.js</strong>
79+
| ├── <strong>appError.js</strong>
80+
| ── <strong>catchAsync.js</strong>
81+
| ── <strong>email.js</strong>
82+
| └── <strong>exludedFields.js</strong>
83+
|
84+
├── <strong>views</strong>
85+
| ├── <strong>_style.pug</strong>
86+
| ├── <strong>baseEmail.pug</strong>
87+
| ── <strong>passwordReset.pug</strong>
88+
| └── <strong>welcome.pug</strong>
89+
|
90+
── app.js
5691
|
92+
├── CONTRIBUTING.md
5793
|
5894
└── README.md
5995
</pre>
@@ -79,17 +115,19 @@ If you dont have [MongoDB]() you use [MongoDB Atls]()
79115
2. Create a file called .env in the Backend directory of your project:
80116

81117

82-
server
83-
└──- controllers
84-
- models
85-
- Routes
86-
- utils
87-
- views
88-
- .env <-- create it here
89-
- .gitignore
90-
- app.js
91-
- package-lock.json
92-
- package.json
118+
- client
119+
- controllers
120+
- models
121+
- routes
122+
- utils
123+
- views
124+
- .env <-- create it here
125+
- .gitignore
126+
- app.js
127+
- CONTRIBUTING.md
128+
- package-lock.json
129+
- package.json
130+
- README.ms
93131

94132

95133

@@ -103,7 +141,7 @@ MONGO_URL = "YOUR_DB_LOCAL_HOST"
103141
```
104142

105143

106-
1. Starting the Server application
144+
4. Starting the Server application
107145
```bash
108146
cd server
109147
npm install

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ Users have to make a submission in their contracts before the due-date. Only the
9191
" style="margin-left:10px" width="50%" align="right"/>
9292
<h3 align="center">All Contracts</h3>
9393
<p align="justify">
94-
Users have to make a submission in their contracts before the due-date. Only the Admin can initialise the submission which further would need approval from every other member. In the submission, it is required project or work done in contract. The whole submission would then have to be approved by other members and
94+
User can view all his contract (approved or not) in the Contracts Page. From here, the user can view contracts, accept or deny contract approvals and also accept the contract submission. Only the contracts which are approved will be shown in th profile page but in Contracts page, all contracts would be shown that the user is a part of.
9595
<br/>
9696
</p>
9797
<br/>
@@ -103,7 +103,7 @@ Users have to make a submission in their contracts before the due-date. Only the
103103
<p align="justify">
104104
You can check a user's past projects/contracts in their profile page. Only approved contracts would be added to the past projects section in a users profile.<br/>
105105
Through these contracts, one can infer that if that person would be fit for collaborating on the project. If they complete their projects, or they are habitual of leaving the projects pending or they often break the contracts.
106-
<br/><br/>
106+
<br/>
107107
The contract has different status as :-
108108
<br />
109109
1) <ins>In-Progress</ins> :- When submission is to be made and contract hasn't reached its due date.<br/>

client/src/App.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ import Login from "./pages/Login";
44
import Profile from "./pages/Profile";
55
import Register from "./pages/Register";
66
import Chats from "./pages/Chats";
7-
import GlobalStyles from "./utils/GlobalStyles";
7+
import GlobalStyles from "./utils/globalStyles";
88
import { ThemeProvider } from "styled-components";
9-
import { light, dark, workedinScheme } from "./utils/Themes";
9+
import { light, dark, workedinScheme } from "./utils/themes";
1010
import Contracts from "./pages/Contracts";
1111
import SinglePost from "./components/postComp/SinglePost";
1212

client/src/Components/ChatComp/AllChats.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React, { useState } from "react";
22
import styled from "styled-components";
33
import CreateChatModal from "./chatModals/CreateChatModal";
44
import { BsFillUnlockFill, BsFillLockFill } from "react-icons/bs";
5-
import { userProps } from "../../types/userProps";
5+
import { userProps } from "../../types/userTypes";
66
import { chatObj } from "../../types/chatTypes";
77
import { BrokenLock, BrokenLock2 } from "../generalComp/SVG";
88
import { MdOutlineDoneAll, MdRemoveDone } from "react-icons/md";

client/src/Components/ChatComp/ChatMembers.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import FinishContract from "../contractComp/contractModals/FinishContract";
1212
import DeleteContract from "../contractComp/contractModals/DeleteContract";
1313
import FinishApprovalBtn from "../contractComp/FinishApprovalBtn";
1414
import BreakContract from "../contractComp/contractModals/BreakContract";
15-
import { userProps } from "../../types/userProps";
15+
import { userProps } from "../../types/userTypes";
1616
import { chatObj } from "../../types/chatTypes";
1717
import ContractBrokenBtn from "./ContractBrokenBtn";
1818
import UpdateSubmission from "../contractComp/contractModals/UpdateSubmission";

client/src/Components/ChatComp/ChatMessages.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import axios from "axios";
22
import React, { useEffect, useState } from "react";
33
import styled from "styled-components";
4-
import { BASE_URL, chatEnd } from "../../utils/APIRoutes";
4+
import { BASE_URL, chatEnd } from "../../utils/apiRoutes";
55
import { getHeaders } from "../../utils/helperFunction";
66

77
import formatDistance from "date-fns/formatDistance";
8-
import { userProps } from "../../types/userProps";
8+
import { userProps } from "../../types/userTypes";
99
import { chatObj } from "../../types/chatTypes";
1010
import { messageProps } from "../../types/messageTypes";
1111

client/src/Components/ChatComp/ChatOptions.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import styled from "styled-components";
33
import { AiOutlineDown, AiOutlineClose } from "react-icons/ai";
44
import { MdModeEdit } from "react-icons/md";
55
import { HiUserAdd } from "react-icons/hi";
6-
import { useOutsideAlerter } from "../../utils/OutsideAlerter";
76
import { TfiWrite } from "react-icons/tfi";
87
import { BsFillFileEarmarkSpreadsheetFill } from "react-icons/bs";
98
import { IoIosMedal } from "react-icons/io";
@@ -12,7 +11,8 @@ import { RiGhostFill } from "react-icons/ri";
1211
import { ImExit } from "react-icons/im";
1312
import { RxCrumpledPaper } from "react-icons/rx";
1413
import { chatObj } from "../../types/chatTypes";
15-
import { userProps } from "../../types/userProps";
14+
import { userProps } from "../../types/userTypes";
15+
import { useOutsideAlerter } from "../../utils/outsideAlerter";
1616

1717
const Section = styled.div`
1818
border-bottom: 1px solid #3a421b;

client/src/Components/ChatComp/ContractBrokenBtn.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React, { useState } from "react";
22
import styled from "styled-components";
33
import { chatObj } from "../../types/chatTypes";
4-
import { userProps } from "../../types/userProps";
4+
import { userProps } from "../../types/userTypes";
55
import SubmitBrokenWork from "../contractComp/contractModals/SubmitBrokenWork";
66

77
const Section = styled.div`

client/src/Components/ChatComp/NoSelectedChat.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import React, { useState } from 'react'
33
import styled from 'styled-components'
44
import { chatObj } from '../../types/chatTypes'
55
import { searchResultProps } from '../../types/searchTypes'
6-
import { userProps } from '../../types/userProps'
7-
import { BASE_URL, chatEnd, searchUserEnd } from '../../utils/APIRoutes'
6+
import { userProps } from '../../types/userTypes'
7+
import { BASE_URL, chatEnd, searchUserEnd } from '../../utils/apiRoutes'
88
import { getHeaders } from '../../utils/helperFunction'
99
import SearchedUser from '../generalComp/SearchedUser'
1010

client/src/Components/ChatComp/chatModals/CreateChatModal.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import axios from 'axios'
22
import React, { useState, useRef } from 'react'
33
import styled from 'styled-components'
4-
import { BASE_URL, chatEnd, searchUserEnd } from '../../../utils/APIRoutes'
4+
import { BASE_URL, chatEnd, searchUserEnd } from '../../../utils/apiRoutes'
55
import { getHeaders } from '../../../utils/helperFunction'
66
import UserBadge from '../../generalComp/UserBadge'
77
import SearchedUser from '../../generalComp/SearchedUser'
8-
import { useOutsideAlerter } from '../../../utils/OutsideAlerter';
9-
import { userProps } from '../../../types/userProps'
8+
import { useOutsideAlerter } from '../../../utils/outsideAlerter';
9+
import { userProps } from '../../../types/userTypes'
1010
import { searchResultProps } from '../../../types/searchTypes'
1111

1212
const Section = styled.div`

client/src/Components/ChatComp/chatModals/ManageMembers.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ import React, { useEffect, useState, useRef } from "react";
33
import styled from "styled-components";
44
import { chatObj } from "../../../types/chatTypes";
55
import { searchResultProps } from "../../../types/searchTypes";
6-
import { userProps } from "../../../types/userProps";
7-
import { BASE_URL, chatEnd, searchUserEnd } from "../../../utils/APIRoutes";
6+
import { userProps } from "../../../types/userTypes";
7+
import { BASE_URL, chatEnd, searchUserEnd } from "../../../utils/apiRoutes";
88
import { getHeaders } from "../../../utils/helperFunction";
9-
import { useOutsideAlerter } from "../../../utils/OutsideAlerter";
9+
import { useOutsideAlerter } from "../../../utils/outsideAlerter";
1010
import SearchedUser from "../../generalComp/SearchedUser";
1111
import UserBadge from "../../generalComp/UserBadge";
1212

client/src/Components/ChatComp/chatModals/UpdateChatModal.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import axios from "axios";
2-
import React, { useState, useEffect, useRef } from "react";
2+
import { useState, useRef } from "react";
33
import styled from "styled-components";
4-
import { BASE_URL, chatEnd } from "../../../utils/APIRoutes";
4+
import { BASE_URL, chatEnd } from "../../../utils/apiRoutes";
55
import { getHeaders } from "../../../utils/helperFunction";
6-
import { useOutsideAlerter } from "../../../utils/OutsideAlerter";
6+
import { useOutsideAlerter } from "../../../utils/outsideAlerter";
77

88
const Section = styled.div`
99
position: absolute;

client/src/Components/HomeComp/CreatePost.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import axios from "axios";
22
import React, { useEffect, useState } from "react";
33
import styled from "styled-components";
4-
import { userProps } from "../../types/userProps";
5-
import { BASE_URL, postEnd } from "../../utils/APIRoutes";
6-
import { localStorageUser } from "../../utils/GlobalContants";
4+
import { userProps } from "../../types/userTypes";
5+
import { BASE_URL, postEnd } from "../../utils/apiRoutes";
6+
import { localStorageUser } from "../../utils/globalContants";
77
import { getHeaders } from "../../utils/helperFunction";
88

99
const Section = styled.div`

client/src/Components/HomeComp/PostFeed.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import React, { useState } from "react";
22
import styled from "styled-components";
33
import CommentBox from "../commentComp/CommentBox";
4-
import { userProps } from "../../types/userProps";
5-
import { postProps } from "../../types/postProps";
4+
import { userProps } from "../../types/userTypes";
5+
import { postProps } from "../../types/postTypes";
66
import PostContent from "../postComp/PostContent";
77

88
const Section = styled.div`

client/src/Components/HomeComp/ProfileBriefBox.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React, { useState, useEffect } from "react";
22
import styled from "styled-components";
3-
import { userProps } from "../../types/userProps";
4-
import { localStorageUser } from "../../utils/GlobalContants";
3+
import { userProps } from "../../types/userTypes";
4+
import { localStorageUser } from "../../utils/globalContants";
55

66
const Section = styled.div`
77
/* border: 1px solid red; */

client/src/Components/ProfileComp/Intro.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React, { useEffect, useState } from "react";
22
import { FaPencilAlt } from "react-icons/fa";
33
import styled from "styled-components";
4-
import { userProps } from "../../types/userProps";
4+
import { userProps } from "../../types/userTypes";
55
import Socials from "./Socials";
66
import UpdateIntroModal from "./profileModals/UpdateIntroModal";
77

client/src/Components/ProfileComp/profileModals/UpdateAboutModal.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import axios from "axios";
22
import React, { useRef, useState } from "react";
33
import styled from "styled-components";
4-
import { BASE_URL, userEnd } from "../../../utils/APIRoutes";
4+
import { BASE_URL, userEnd } from "../../../utils/apiRoutes";
55
import { getHeaders } from "../../../utils/helperFunction";
6-
import { useOutsideAlerter } from "../../../utils/OutsideAlerter";
6+
import { useOutsideAlerter } from "../../../utils/outsideAlerter";
77

88
const Section = styled.div`
99
position: absolute;

client/src/Components/ProfileComp/profileModals/UpdateIntroModal.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import axios from "axios";
2-
import React, { useRef, useState, useEffect } from "react";
2+
import { useRef, useState } from "react";
33
import styled from "styled-components";
4-
import { userProps } from "../../../types/userProps";
5-
import { BASE_URL, userEnd } from "../../../utils/APIRoutes";
4+
import { userProps } from "../../../types/userTypes";
5+
import { BASE_URL, userEnd } from "../../../utils/apiRoutes";
66
import { getHeaders } from "../../../utils/helperFunction";
7-
import { useOutsideAlerter } from "../../../utils/OutsideAlerter";
7+
import { useOutsideAlerter } from "../../../utils/outsideAlerter";
88

99
const Section = styled.div`
1010
position: absolute;

client/src/Components/ProfileComp/profileModals/UpdateSkills.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ import axios from "axios";
22
import React, { useRef, useState } from "react";
33
import { GrFormClose } from "react-icons/gr";
44
import styled from "styled-components";
5-
import { BASE_URL, userEnd } from "../../../utils/APIRoutes";
5+
import { BASE_URL, userEnd } from "../../../utils/apiRoutes";
66
import { getHeaders } from "../../../utils/helperFunction";
7-
import { useOutsideAlerter } from "../../../utils/OutsideAlerter";
7+
import { useOutsideAlerter } from "../../../utils/outsideAlerter";
88

99
const Section = styled.div`
1010
position: absolute;

0 commit comments

Comments
 (0)