Skip to content

Latest commit

 

History

History
81 lines (48 loc) · 2.17 KB

README.md

File metadata and controls

81 lines (48 loc) · 2.17 KB

StackOverflow Service

This project is a full-stack application as a service with data built on top of - StackOverflow. This includes functionality like searching through Posts & Marking specific posts to save for later retrieval. After sucessfull authentication, the search history will also be stored in the app.

  • The app is a Single Page App, built using pure js, jquery and knockout js framework, with Bootstrap.

  • All the data is served from our C# .Net backend. With custom fast search built on pure SQL queries and with inverted indexes...

Setup the client

  1. install libman
  2. go to /WebApi/wwwroot
  3. execute command libman restore (installs required dependencies)

Setup the Data service

  1. Scaffold schema from here.
  2. Scaffold functions, indexes, etc from here.(this might take up to 10 minutes)

WebApi

  1. dotnet restore
  2. dotnet watch run --no-build (development)

API USAGE

Questions endpoints

GET /api/questions GET /api/questions/{questionId}

Answers endpoints

GET /api/answers/{answerId} GET /api/answers/question/{answerId}

Markings endpoints

GET /api/markings/{userId} POST /api/markings HEADERS userId BODY {"postid": 16637748} DELETE /api/markings/{markingId}

Annotations endpoints

GET /api/annotations/{markingid} GET /api/annotations HEADERS userId GET /api/annotations BODY {"markingid": 1} POST /api/annotations BODY {"markingid": 1, "body": "api"} PUT /api/annotations/{annotationId} BODY {"markingid": 1, "body": "api2"} DELETE /api/annotations/{annotationId}

Comments endpoints

GET /api/comments/{postId}

Tags endpoints

GET /api/tags/{questionId}

Posts endpoints

GET /api/posts/{questionId}

Search endpoints

GET /api/search?q=term+term GET /api/search/history HEADERS userId

Auth endpoints

POST /api/auth/users BODY {"username", "password"} POST /api/auth/tokens BODY {"username", "password"}

Users endpoints

POST /api/users BODY {"username", "password"}