This project is geared towards building a social-media like experience for programmers!
Clearly, this is a work in progress app but here's a sneak peak on current progress!
- OAuth login via Google or Discord (will add more)
- Ability to view code jams
- Ability to register/withdraw from code jams
If you're interested in contributing here's Environment setup instructions/suggestions.
Of course, no app is complete without a Database!
Before starting the database via docker-compose we need to setup some environment variables.
There are a few parameters you can specify if you want... running it with no parameters will use default values for our connection string! Which is fine...
Please note this will override previously set values if you don't respecify them! Additionally, this script will automatically update your connection string.
./create-env.ps1
./create-env.ps1 -databasePath Path\To\Where\You\Want\To\Store\Db
Start database from docker-compose
./start-db.ps1
Create https-certs. Depending on your environment your IDE might have already set this up for you. Otherwise, this script will do the trick... hopefully
./create-https-certs.ps1
After some research we have determined that we needed something a bit better than standard REST endpoints between our client and server.
Though we're noobs to implement GraphQL, it looks like an excellent long-term solution for loading an entire pages worth of data in one go... compared to
calling N
amount of endpoints for N
components on screen.
graph TD
Client[Client] --- GraphQL[GraphQL]
GraphQL --- Server
Server --- Postgres[Postgres DB]
There are no default credentials. Must utilize OAuth.
Will require adding a appsettings.development.json
to your Server project SocialCoder.Web
{
"Authentication": {
"ProviderName": {
"ClientId": "",
"ClientSecret": ""
}
}
}
Right now we have Discord and Google setup for our application. A requirement to set this up will be to register with the following services:
- Create an application (if you don't have one already)
- Go to OAuth2 panel
- Grab both the
Client ID
andClient Secret
and put them into the appropriate place in yourappsettings.development.json
. The ProviderName for this will beDiscord
... because....it's... discord. - Update the redirect to be
https://localhost:7159/signin-discord
- Grab both the
- Create a project to use for testing
- Go to API & Services --> Credentials
- Create Credentials
- Add Authorized
JavaScript origins
:https://localhost:7159
- Authorized Redirect URIs:
https://localhost:7159/signin-google
- Save and grab the
Client ID
andClient Secret
. Shove this intoGoogle
. Should be self explanatory that the pattern here isProviderName
equals the Service name we're using for OAuth.
- Add Authorized
- Create Credentials
- Application name can be whatever you want for testing purposes.
- Homepage URL
- Authorization callback URL
- Grab the ClientID, and ClientSecret and put them in the
appsettings.development.json
file underGithub