- clone this repository.
- open the
/server
folder of this repo on the terminal and then runnpm install
on the terminal to install all of the dependencies. npm run dev
ornpm run start
on the terminal.- open the
/client
folder of this repo onthe terminal and then runnpm run serve
to start this app on the web browser which can be accessed in localhost
If you want to try deployed version this is the link => http://noviirna-overflow.site/
- This app is following stack overflow function.
- Users can ask questions and answer questions.
- Also, users can upvote or downvote other users questions/answers. But can not upvote or down vote its own questions/answers.
- Every monday on 8 am (Jakarta time), all users will be receiving question of the week a.k.a question with the most upvotes on this site,(using scheduled time and background jobs using redis, kue, and cron package).
- User can have watched tags to get custom feeds that only had their interest based by tag that user have choosen.
- Method & Route
-
POST
/users/register - Request
- HEADERS
- BODY
{ username: String [required | unique] email: String [required | unique ] password: String [required | minlength 8 | maxlength 16] }
- PARAMS
- QUERY
- Response
- ON SUCCESS : HTTP RESPONSE
201
{ watchedTags: Array, _id: String, username: String, email: String, password: String, }
- ON ERROR : HTTP RESPONSE
400
or500
{ message : String }
- Method & Route
-
POST
/users/login - Request
- HEADERS
- BODY
{ name: String [required] password: String [required] }
- PARAMS
- QUERY
- Response
- ON SUCCESS : HTTP RESPONSE
200
{ token: String, user: { _id: String, email: String, username: String, watchedTags: Array } }
- ON ERROR : HTTP RESPONSE
400
500
{ message : String }
- Method & Route
-
PUT
/users/:id (is the user ID) - Request
- HEADERS
{ token : String [required] }
- BODY
{ watchedTags: Array }
- PARAMS =>
:id
- QUERY
- Response
- ON SUCCESS : HTTP RESPONSE
200
{ _id: String, email: String, username: String, watchedTags: Array }
- ON ERROR : HTTP RESPONSE
400
403
500
{ message : String }
- Method & Route
-
POST
/questions - Request
- HEADERS
{ token : String [required] }
- BODY
{ upvotes : Array, downvotes : Array, title : String, description : String, userId : String, tags : Array }
- PARAMS
- QUERY
- Response
- ON SUCCESS : HTTP RESPONSE
201
{ _id : String, upvotes : Array, downvotes : Array, title : String, description : String, createdAt: Timestamp, updatedAt: Timestamp, userId : ObjectId, tags : Array }
- ON ERROR : HTTP RESPONSE
400
403
500
{ message : String }
- Method & Route
-
POST
/answers - Request
- HEADERS
{ token : String [required] }
- BODY
{ questionId: String upvotes : Array, downvotes : Array, title : String, description : String, userId : String, }
- PARAMS
- QUERY
- Response
- ON SUCCESS : HTTP RESPONSE
201
{ questionId: String upvotes : Array, downvotes : Array, title : String, description : String, userId : String, createdAt: Timestamp, updatedAt: Timestamp, }
- ON ERROR : HTTP RESPONSE
400
403
500
{ message : String }
- Method & Route
-
GET
/questions - Request
- HEADERS
- BODY
- PARAMS
- QUERY
- Response
- ON SUCCESS : HTTP RESPONSE
200
[ { _id : String, upvotes : Array, downvotes : Array, title : String, description : String, createdAt: Timestamp, updatedAt: Timestamp, userId : ObjectId, tags : Array } ]
- ON ERROR : HTTP RESPONSE
400
403
500
{ message : String }
- Method & Route
-
GET
/answers/:id - Request
- HEADERS
- BODY
- PARAMS =>
:id
is the question ID - QUERY
- Response
- ON SUCCESS : HTTP RESPONSE
200
[ { questionId: String upvotes : Array, downvotes : Array, title : String, description : String, userId : String, createdAt: Timestamp, updatedAt: Timestamp, } ]
- ON ERROR : HTTP RESPONSE
400
403
500
{ message : String }
- Method & Route
-
DELETE
/questions/:id - Request
- HEADERS
- BODY
- PARAMS =>
:id
is the question ID - QUERY
- Response
- ON SUCCESS : HTTP RESPONSE
200
{ _id : String, upvotes : Array, downvotes : Array, title : String, description : String, createdAt: Timestamp, updatedAt: Timestamp, userId : ObjectId, tags : Array }
- ON ERROR : HTTP RESPONSE
400
403
500
{ message : String }
- Method & Route
-
PUT
/questions/:id - Request
- HEADERS
{ token : String [required] }
- BODY
{ upvotes : Array, downvotes : Array, title : String, description : String, userId : String, tags : Array }
- PARAMS =>
:id
is the question Id- QUERY
- Response
- ON SUCCESS : HTTP RESPONSE
200
{ _id : String, upvotes : Array, downvotes : Array, title : String, description : String, createdAt: Timestamp, updatedAt: Timestamp, userId : ObjectId, tags : Array }
- ON ERROR : HTTP RESPONSE
400
403
500
{ message : String }
- Method & Route
-
PUT
/answers/:id - Request
- HEADERS
{ token : String [required] }
- BODY
{ questionId: String upvotes : Array, downvotes : Array, title : String, description : String, userId : String, }
- PARAMS =>
:id
is the answer Id- QUERY
- Response
- ON SUCCESS : HTTP RESPONSE
200
{ questionId: String upvotes : Array, downvotes : Array, title : String, description : String, userId : String, createdAt: Timestamp, updatedAt: Timestamp, }
- ON ERROR : HTTP RESPONSE
400
403
500
{ message : String }
- Method & Route
-
PUT
/questions/ud/:id - Request
- HEADERS
{ token : String [required] }
- BODY
{ upvotes : Array, downvotes : Array, }
- PARAMS =>
:id
is the question Id- QUERY
- Response
- ON SUCCESS : HTTP RESPONSE
200
{ _id : String, upvotes : Array, downvotes : Array, title : String, description : String, createdAt: Timestamp, updatedAt: Timestamp, userId : ObjectId, tags : Array }
- ON ERROR : HTTP RESPONSE
400
403
500
{ message : String }
- Method & Route
-
PUT
/answers/ud/:id - Request
- HEADERS
{ token : String [required] }
- BODY
{ upvotes : Array, downvotes : Array, }
- PARAMS =>
:id
is the answer Id- QUERY
- Response
- ON SUCCESS : HTTP RESPONSE
200
{ questionId: String upvotes : Array, downvotes : Array, title : String, description : String, userId : String, createdAt: Timestamp, updatedAt: Timestamp, }
- ON ERROR : HTTP RESPONSE
400
403
500
{ message : String }
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
- ON ERROR : HTTP RESPONSE
- BODY
- HEADERS
- ON ERROR : HTTP RESPONSE
- BODY
- HEADERS
- ON ERROR : HTTP RESPONSE
- BODY
- HEADERS
- ON ERROR : HTTP RESPONSE
- BODY
- HEADERS
- ON ERROR : HTTP RESPONSE
- ON SUCCESS : HTTP RESPONSE
- ON ERROR : HTTP RESPONSE
- ON SUCCESS : HTTP RESPONSE
- ON ERROR : HTTP RESPONSE
- ON SUCCESS : HTTP RESPONSE
- ON ERROR : HTTP RESPONSE
- BODY
- HEADERS
- ON ERROR : HTTP RESPONSE
- BODY
- HEADERS
- ON ERROR : HTTP RESPONSE
- BODY
- HEADERS
- ON ERROR : HTTP RESPONSE
- ON ERROR : HTTP RESPONSE