Giter Club home page Giter Club logo

devhive's Introduction

DevHive

DevHive is the social network solution for programmers. In it you can make posts to share with your friends, comment and more.

This is the back-end portion of the project, built with ASP.NET Core. For the front-end, refer to DevHive-Angular.

In the docs folder you can find relevenat information and documentation about this project. You can also find our Privacy Policy.

Contents:

Setting up locally

There currently aren't any demo instances, so the only way to try it out for yourself it to set it up locally, on a computer or server. In this section are explained the steps to do so.

The steps are oriented around Linux-based systems.

Prerequisites

There are some tools you need to setup before even downloading the app:

Getting started with the database

After installing all of the tools and setting up the database, you should have a user with a password with which to access postgres and you should have created a database for the API. If so, follow these steps:

  1. Clone the repository: git clone https://github.com/Team-Kaleidoscope/DevHive.git
  2. Navigate to the folder, in which you cloned it, and then go to src/Data/DevHive.Data
  3. Edit the file ConnectionString.json and replace the default values with what you've setup
  4. In the same directory, run dotnet ef database update

Starting up

  1. Navigate to the src/Web/DevHive.Web folder
  2. Edit the appsettings.json file, under "ConnectionStrings", type in the values, you setup in ConnectionString.json
    • On the third row there is a "signingKey" field, it's used for encryption of User passwords. It must be made up of 64 letters and number! On the next two rows you also need to set a "validationIssuer" and "audience", you can set these values to whatever you want.
    • There are also some cloud values that you can change. Currently, the project uses Cloudinary as a place for uploading files. If you wish, you can setup your own account there, otherwise file uploading won't work.
  3. Run dotnet run

If everything went well, you can now access the API on http://localhost:5000/api with something like Postman or the FOSS alternative Insomnia Designer. On where to send requests, refer to the "API-Endpoints" page in docs.

Important notes

You can change on what port the API is ran, by changing the HTTP_PORT constant in src/Web/DevHive.Web/Program.cs. If you do so, you must also update the front-end, because by default it will try to send requests to http://localhost:5000.

devhive's People

Contributors

danail-dimitrov avatar syndamia avatar viko-stamoff avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

devhive's Issues

Implement Roles class

Implement Roles class and link them to the User
Research how

Authentication needs to be done first

When you create the Role class, inherit IdentityRole and in Startup.cs -> CcnfigureServices() -> Change
services.AddIdentity<User, IdentityRole>(); ->
services.AddIdentity<User, Role>();

Implement account delete functionality

[HttpDelete]
[Route("deleteaccount")]
public async Task<IActionResult> DeleteAccount(LoginDTO loginDTO)
{ ... }

[HttpDelete]
[Authorize(Roles = "Admin")]
[Route("deleteuser")]
public async Task<IActionResult> DeleteUser(int id)
{ ... }

Implement User class

Issue is being worked on in branch user-class

  • Username
  • FirstName
  • LastName
  • Profile Picture(string)
  • List<Friends>

Id is of type T, and user is class User<T>

Task organization is moved to Trello

We've decided to move our task organization over to a private Trello. The remaining GitHub issues will be dealt with in due time.

Of course, if you find any problem with it, make sure to post an issue here!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.