DevHive
DevHive is the social network solution for programmers. In it you can make posts to share with your friends, comment and more.
It's built with ASP.NET Core as a back-end and Angular as a front-end. For more technical information, you can refer to the Wiki.
In the Wiki you can also find our Privacy Policy.
Contents:
- Setting up locally
- Prerequisites
- Getting started with the database
- Starting up the API
- Starting up the Front-end
- Important notes
- Screenshots
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 things you need to setup before even downloading the app.
Back-end (API) tools:
- dotnet 5.0 or later
- Entity Framework Core tool 5.0.2 or greater
- if you've already installed dotnet, you can just run this command dotnet tool install dotnet-ef -g
- postresql 13.1 or greater (older versions might work, but haven't been tested)
- Fedora users could also refer to this guide
- Arch users can refer to the ArchWiki
Front-end tools:
- Angular CLI 11.0.6 or greater (older versions might work, but haven't been tested)
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:
- Clone the repository:
git clone https://github.com/Team-Kaleidoscope/DevHive.git - Navigate to the folder, in which you cloned it, and then go to
src/DevHive.Data - Edit the file
ConnectionString.jsonand replace the default values with what you've setup - In the same directory, run
dotnet ef database update
Starting up the API
- Navigate to the
src/DevHive.Webfolder - Edit the
appsettings.jsonfile, under "ConnectionStrings", type in the values, you setup inConnectionString.jsoninDevHive.Data- On the third row there is a "Secret" field, it's used for encryption of User passwords, you can change it but it must be made up of 64 letters and number! - 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. - Run
dotnet runin theDevHive.Webfolder - feel free to run the command in background or create a systemd service
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 the Wiki.
Starting up the Front-end
- Navigate to
src/DevHive.Angular - Run
npm installto install all front-end packages - Run
ng serveto start up the front-end - as with the API, you can run the command in background or create a systemd service
If everything went smoothly, you will be able to access the front-end from http://localhost:4200. Also, don't forget that the API needs to be running at the same time, otherwise you won't get beyond the Login and Register pages!
Important notes
You can change on what port the API is ran, by changing the HTTP_PORT constant in src/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.
- Go to src/DevHive.Angular/src/app and edit the app-constants.module.ts file, on the second row you're gonna see the variable BASE_API_URL, change it accoring to your API modifications.
You can change on what port the front-end is ran, by issuing the serve command with the --port parameter: ng serve --port 5001. But, don't run it with the --ssl parameter! SSL isn't supported yet and you'll have issues trying to use it! If you really need ssl, using a reverse proxy might be a viable alternative.
Screenshots

