Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
126 commits
Select commit Hold shift + click to select a range
dc6c603
setup backend
Nov 5, 2020
82f8f7c
setup client
Nov 6, 2020
15dace3
create basic auth&user routes
Nov 6, 2020
d2050da
create user model
Nov 6, 2020
1eb5bcb
handle signup/signin, jwt token gen., simple validation
Nov 6, 2020
a41761f
fix login, isMatch negation & set correct token expire value
Nov 9, 2020
c052fdf
add auth middleware
Nov 9, 2020
7a1252d
add answer, question model & vote schema
Nov 9, 2020
f6e343d
add questions route
Nov 9, 2020
62c5bab
add answers route
Nov 9, 2020
383a5d1
add vote api
Nov 10, 2020
948d7cf
create simple auth page
Nov 10, 2020
64bb806
update user model with score, answers & questions
Nov 10, 2020
30b7979
update user score on vote answer or vote question
Nov 11, 2020
1ee3b0f
push question & answer id to user on create
Nov 11, 2020
e9e5e49
generate refresh token on login, attach http-only /auth restricted co…
Nov 11, 2020
72bd22f
setup redux, react-router, create auth reducer
Nov 11, 2020
6b65775
added composeWithDevTools for redux
Nov 12, 2020
93e06b0
fix error catching in auth actions
Nov 12, 2020
e777542
add token refreshing(raw)
Nov 12, 2020
43e2e12
reworked refresh token
Nov 13, 2020
89635db
add user reducer, simple user page
Nov 13, 2020
8af402d
remove unused constant
Nov 13, 2020
fb4da27
remove unnecessary import
Nov 13, 2020
ade8c81
move initial token check outside of App component
Nov 16, 2020
6054105
create separate Button & Input components
Nov 16, 2020
fccf093
add client auth page+validation
Nov 17, 2020
9563295
add according server validation
Nov 17, 2020
18deb43
add redirect after auth
Nov 17, 2020
17714d7
add bestAnswer prop to question.model, isBest to answer.model
Nov 18, 2020
59b785e
create pick-asnwer route
Nov 18, 2020
2eec1e6
disable adding answers to closed question
Nov 18, 2020
01791c0
create QuestionCard component
Nov 18, 2020
4c81282
add slim version to QuestionCard component
Nov 18, 2020
b6b6769
add navbar
Nov 19, 2020
b9e2018
add load user functional
Nov 19, 2020
8b04ec3
fix typo users=>user in path
Nov 19, 2020
08d633b
update get user route, now populates answers and questions
Nov 19, 2020
2436ce6
edit users reducer, now shows the needed attributes clearer
Nov 19, 2020
5045c1e
create user page
Nov 19, 2020
c65844a
create questions page, question reducer
Nov 20, 2020
2bc4310
fix checking token route
Nov 20, 2020
04504b6
refactor refresh token middleware
Nov 20, 2020
f499d9e
add user propr nickName
Nov 20, 2020
875bbd5
move fontSize, border-radius, box-shadow to css variables, design adj…
Nov 20, 2020
c52fd7f
modify questions reducer to work with one question
Nov 23, 2020
4516b41
modify get_question route, populate answers, author etc.
Nov 23, 2020
f3a39ba
question discussion: question preview, voteblock
Nov 23, 2020
01452b3
add vote logic to client
Nov 23, 2020
47b728a
creat answer list
Nov 23, 2020
0b240a6
add answers to questions client
Nov 23, 2020
c86dc12
picking best answers
Nov 23, 2020
da6653b
Merge branch 'new/question-page' into dev
Nov 23, 2020
a582a3b
add search question
Nov 24, 2020
e309f42
redirect on expired refresh token
Nov 24, 2020
bcc4821
add CreateQuestion Page
Nov 24, 2020
5918400
add jsconfig
Nov 24, 2020
f04b2ea
refactor component folder structure, naming, import order
Nov 25, 2020
2ec422c
add Field component
Nov 25, 2020
48f9cdc
add signature
Nov 25, 2020
6b05075
add Post component
Nov 25, 2020
00b0b4d
add page, background component
Nov 25, 2020
b5f62be
add Notfound page
Nov 25, 2020
4ca3ecb
minor edits
Nov 25, 2020
6b32ea1
add answer pagination
Nov 25, 2020
bf981ec
fix loading for questionlist and question
Nov 26, 2020
062c8b6
add spinner component
Nov 26, 2020
f96d50c
replace directTo action with link
Nov 26, 2020
7b0a379
add alerts
Nov 26, 2020
a16901c
clean up QuestionCard, add createdAt
Nov 26, 2020
6284380
check tokens in actions instead of middleware
Nov 26, 2020
cd74e36
make minor style adjustments
Nov 26, 2020
88fa625
refactor question discussion votes, mark best, sorting, etc.
Nov 26, 2020
86ef5bf
implement simple tags
Nov 27, 2020
4f29b4e
remove unnecessary redirect in User component
Nov 27, 2020
47199dc
added breakpoint constants, layout modification to look better on sma…
Nov 27, 2020
a06c71d
simulate click when Button is focused and Enter/Space is pressed for …
Nov 27, 2020
a4404f2
fix margin for rating on user page to look better on small screens
Nov 27, 2020
9525fc1
sort up questions reducer a bit
Nov 27, 2020
5cd8509
add scripts to package and add build resolver to server to host demo …
Nov 27, 2020
acf5483
return user index.route on server
Nov 27, 2020
c14137a
fix answer vote, clean up votes.route
Nov 27, 2020
ce2eec8
save user on vote
Nov 27, 2020
f0e985f
rework questions search route to work with multiple title words&tags
Dec 3, 2020
6981a11
add search by multiple arguments/tags on client and typeahead
Dec 3, 2020
f35e8d0
add answer pagination
Dec 4, 2020
b42130b
add question list pagination
Dec 4, 2020
7d4399c
sorting answers
Dec 4, 2020
59aeb8d
reset reducer state on page unmount for question list and question di…
Dec 4, 2020
c34c77a
remove unnecessary code, minor fixes
Dec 4, 2020
bfd7531
update the score value on upvote/downvote answer
Dec 4, 2020
908b779
basic backend test setup
Dec 7, 2020
3667b5b
moved server package.json into the server folder, add basic auth test
Dec 7, 2020
b948b52
drop database on each test
Dec 8, 2020
34924f5
create separate controller, user service, user model methods for regi…
Dec 9, 2020
df8e690
create separate validation middleware
Dec 9, 2020
6d6381f
create config directory
Dec 9, 2020
e2a9ae5
add auth service for tokens
Dec 9, 2020
f39d6bb
static method for user service in order to not create an instance of …
Dec 9, 2020
17c924a
refactor the rest of auth routes
Dec 9, 2020
282abbb
added tests for auth service and user service
Dec 9, 2020
a1a14fd
created question service, added tests for question service
Dec 11, 2020
cc43df8
work with answers, tests for answers
Dec 11, 2020
00f2a3a
vote service, vote service unit tests
Dec 14, 2020
fe21424
refactor user route
Dec 14, 2020
c299e7d
reworked validate middleware
Dec 14, 2020
67f06f3
add tests for validate middleware
Dec 14, 2020
f5f1405
add auth middleware tests
Dec 14, 2020
8b344be
implemented memory database server
Dec 15, 2020
7c529de
add tests for answer controller
Dec 15, 2020
6040535
fixed question service getPage, getById
Dec 16, 2020
c17fce3
add tests for question controller
Dec 16, 2020
0cc9f7e
added basic auth controller tests
Dec 16, 2020
dfefbad
add tests for vote controller
Dec 17, 2020
29b5746
add id to Field, in order to have htmlFor on label components inside …
Dec 21, 2020
950eaff
add update auth tests
Dec 21, 2020
e99af27
add create qeustion tests
Dec 21, 2020
ae78d78
fix onSubmit in auth page
Dec 22, 2020
0c9f256
remove act warnings on auth tests
Dec 22, 2020
19d0145
changed imported controller names
Dec 22, 2020
2f2e6ed
accessibility changes for pagination component
Dec 22, 2020
4e46174
add questions page tests, minor edits to the component
Dec 22, 2020
e98b0fa
Merge pull request #3 from MoophHD/dev
Apr 2, 2021
a5b533a
Update README.md
Sep 29, 2021
97b0181
test
MoophHD Jul 29, 2024
b4527a0
Revert "test"
MoophHD Jul 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
PORT=
MONGODB_URI=
MONGODB_TEST_URI=
JWT_SECRET=
JWT_EXPIRY=
ACCESS_TOKEN_EXPIERY=
REFRESH_TOKEN_EXPIERY=
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
build/
node_modules/

.env
.env.test

.eslintcache
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# p4.itechart

23 changes: 23 additions & 0 deletions client/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
70 changes: 70 additions & 0 deletions client/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Getting Started with Create React App

This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).

## Available Scripts

In the project directory, you can run:

### `npm start`

Runs the app in the development mode.\
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.

The page will reload if you make edits.\
You will also see any lint errors in the console.

### `npm test`

Launches the test runner in the interactive watch mode.\
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.

### `npm run build`

Builds the app for production to the `build` folder.\
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.\
Your app is ready to be deployed!

See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.

### `npm run eject`

**Note: this is a one-way operation. Once you `eject`, you can’t go back!**

If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.

Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.

You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.

## Learn More

You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).

To learn React, check out the [React documentation](https://reactjs.org/).

### Code Splitting

This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting)

### Analyzing the Bundle Size

This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size)

### Making a Progressive Web App

This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app)

### Advanced Configuration

This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration)

### Deployment

This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment)

### `npm run build` fails to minify

This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)
6 changes: 6 additions & 0 deletions client/jsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"compilerOptions": {
"baseUrl": "src"
},
"include": ["src"]
}
Loading