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...
- Install PostgreSQL
- Open Terminal to create database and execute
& 'C:\Program Files\PostgreSQL\12\bin\psql.exe' -U postgres -c "create database stackoverflow"
- Go to WSSOVA/DatabaseService/DataModels
- Load database and data you downloaded by running
& 'C:\Program Files\PostgreSQL\12\bin\psql.exe' -U postgres -d stackoverflow -f stackoverflow_universal.backup
- Scaffold normalized schema. Go to project location DatabaseService > DatabaseModels and run in the Terminal
& 'C:\Program Files\PostgreSQL\12\bin\psql.exe' -U postgres -d stackoverflow -a -f stackoverflow-normalized.sql
- Scaffold functions, indexes, weights etc.(this will take around 1 minute) by running
& 'C:\Program Files\PostgreSQL\12\bin\psql.exe' -U postgres -d stackoverflow -a -f functions-indexes-weights.sql
- go to /WebApi/wwwroot
- install libman
dotnet tool install -g Microsoft.Web.LibraryManager.Cli
- execute command
libman restore
(installs required dependencies)
- go to the WebApi folder in your Terminal
- run
dotnet run
- or
dotnet watch run --no-build
(development)
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"}