Codidact is community-driven Q&A software: created, maintained, used, and run by the community, for the community. There's no money-making company behind this.
We're currently in the early stages of development, but once we have a working MVP, we'll be hosting a public Codidact instance for everyone to use. The software will also be available to download and run yourself to host your instance under your own rules.
These instructions are for setting up and running a local development instance of Codidact.
A list of the current tech stack is here. These items will be installed in the steps below, but if all of these are already installed on your system you can skip straight to running the project.
We'll be using Visual Studio for this setup.
- Download Visual Studio 2019 Community and start up the installer. If you already have VS2019 installed, run the Visual Studio Installer instead.
- When prompted to select workloads, select the "ASP.NET and Web Development" workload, and then install it.
- Once the installation is complete, clone/download this repository and extract it somewhere.
- In the root of the repository, open the
Codidact.sln
file with visual studio to get started. - Visual Studio will attempt to install any missing packages. This usually requires no additional action, but if it fails to do so, perform a package restore.
- Once Visual Studio has finished loading, you can run Codidact by setting the WebUI project as the startup project. You'll know you're ready to run the project when a Start IIS Express button appears.
- See the Database Setup instructions below
Alternatively, if you don't want to run Visual Studio just to start the project, you can navigate to the src/WebUI folder
(so that WebUI.csproj
is in your working directory) and issue the command dotnet run
.
- Download .NET Core SDK. Specifically, from this page, follow the sections labeled "Register Microsoft Key and feed" and "Install the .NET Core SDK"
- Once the installation is complete, clone/download the repository and extract it somewhere.
- You can run Codidact by navigating to the src/WebUI folder (so that
WebUI.csproj
is in your working directory) and issuing the commanddotnet run
.
These instructions assume that you don't have a PostgreSQL DB server installed at the moment and would like to run one locally. These instructions may change heavily depending on your circumstances.
- Install PostgreSQL:
- Windows. This will also install pgAdmin.
- Linux users will most likely want to use the PostgreSQL version provided by their package manager.
- Create a new database and name it whatever you like. Windows users can do this using pgAdmin.
- Open
appsettings.Development.json
in the WebUI project and add a new connection string for your database. It will look something like this, along with any relevant connection information:
"ConnectionStrings": {
"DefaultConnection": "Server=localhost;Database=YOUR_DATABASE;"
}
- Open a terminal at the Codidact solution folder. Run the command
dotnet tool restore
. - Navigate to the WebUI project folder and run
dotnet ef database update
to apply the project migrations to the database. - Verify that your database is now populated with new tables.
Very welcome! Please read our contributing guidelines before you start writing code.