Git Product home page Git Product logo

devbetterweb's Introduction

CI/CD Pipeline UptimeRobot Status UptimeRobot 30-day Uptime

DevBetterWeb

A web application for devBetter.com, a developer coaching program web site and application.

What is devBetter?

Head over to devBetter.com to see the live site. Scroll through the home page and read the testimonials. Essentially devBetter is a group dedicated to improving professional software developers of all stripes. We have a virtual community (currently using Discord) and we meet for live group Q&A sessions about once a week (currently using Zoom). We challenge and promote one another, answer tough code and software design questions, work through exercises, and more. This site is used as a playground by some members and its owner, Steve, to provide a real, working example of some of the coding techniques and practices we discuss. This is in contrast to labs, katas, and exercises that, while also valuable, are not the same as solving real world problems with real software in a production environment.

Features

  • Register
  • Login
  • View Public Questions/Topics
  • Validate Accounts via Email (SendGrid)

Members Only

  • Update Profile
  • View Member List
  • View Recorded Coaching Sessions (backlog)
  • View Book Leaderboard (who has read more of the books the group agrees are worth reading)

Administrators Only

  • View Users
  • View Roles
  • Add/Remove Users to Role
  • Add/Remove Roles to User
  • Add/Remove Books
  • Update Member Subscription Dates
  • Update User email confirmation

Development Links

Prerequisite

Building and Running the App Locally

  • Clone (or Fork and Clone) the repository locally
  • Run migrations for both AppDbContext and IdentityDbContext
# RUN THIS FROM THE WEB PROJECT FOLDER
dotnet ef database update -c appdbcontext -p ../DevBetterWeb.Infrastructure/DevBetterWeb.Infrastructure.csproj -s DevBetterWeb.Web.csproj

# RUN THIS FROM THE INFRASTRUCTURE PROJECT FOLDER
dotnet ef database update -c IdentityDbContext -s ..\devbetterweb.web\DevBetterWeb.Web.csproj

You should be able to run the application at this point. The default password for seeded accounts is here. The default users created are here. Members are created the first time they visit their edit profile page.

Some actions, such as registering a member, send email notifications. You should run a local email emulator like SMTP4Dev or Papercut to capture these, or configure your local environment to use a fake email sender class.

You should create an appsettings.development.json file to hold your other connection strings such as for Azure Storage. You can use Azurite as a local emulator for this.

For the Discord web hook integration, you can use the dev-test channel in devBetter's Discord server. The web hook url is in the channel description on Discord. You can use that in you appsettings.development.json. Alternatively, you can set up your own Discord server - see here for a walkthrough - and add the url to appsettings.development.json in the Discord Webhooks section that you can copy from appsettings.json. You could also create a mock server which will provide you with a url to use - an example is mocky.io

EF Migrations Commands

Add a new migration (from the DevBetter.Web folder):

dotnet ef migrations add MIGRATIONNAME -c appdbcontext -p ../DevBetterWeb.Infrastructure/DevBetterWeb.Infrastructure.csproj -s DevBetterWeb.Web.csproj -o Data/Migrations

If changes on the Identity then you need to Add a new migration (from the DevBetter.Web folder):

 dotnet ef migrations add MIGRATIONNAME -c IdentityDbContext -p ../DevBetterWeb.Infrastructure/DevBetterWeb.Infrastructure.csproj -s DevBetterWeb.Web.csproj -o Identity/Data/Migrations

Update AppDbContext model (from the DevBetter.Web folder):

dotnet ef database update -c appdbcontext -p ../DevBetterWeb.Infrastructure/DevBetterWeb.Infrastructure.csproj -s DevBetterWeb.Web.csproj

Generate Idempotent Update Script (for production)(from the DevBetter.Web folder):

dotnet ef migrations script -c AppDbContext -i -o migrate.sql -p ../DevBetterWeb.Infrastructure/DevBetterWeb.Infrastructure.csproj -s DevBetterWeb.Web.csproj

Video Upload Instructions (admin only)

Put the video files and their associated markdown files in a folder you wish to upload from. Specify the Vimeo token and devBetter API key.

For the API link, the production link should be the root web site, https://devbetter.com/

.\DevBetterWeb.UploaderApp.exe -d [folder] -t [Vimeo token] -a [api link] -akey [api key]

Stripe WebHook Development

Install ngrok for more information here

	npm install ngrok -g 

If there is any security issue while you using it then run this command on pwoershell

Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope CurrentUser

Active the forword by running this command

ngrok http 5010

Save the link https://xxx-xxx-xxx-xxx.ngrok.io and create WebHook on your stripe account with this link. You need to check which version is supported by Stripe .NET and choose it while you creating the WebHook on your account.
Copy the WebHook Secret from edit WebHook and insert it on appsettings.json -> StripeOptions -> StripeCustomerSubscriptionDeletedWebHookSecretKey, StripeCustomerSubscriptionUpdatedWebHookSecretKey, StripeInvoicePaidWebHookSecretKey.
Make DevBetter application using http without redirect by comment this line app.UseHttpsRedirection(); from startup.cs.
Open the application on http://localhost:5010/.
You can check PaymentIntentWebHook endpoint for more information.
stripe-WebHook-1 stripe-WebHook-2 stripe-WebHook-3 stripe-WebHook-4 stripe-WebHook-5

devbetterweb's People

Contributors

ardalis avatar shadynagy avatar dependabot[bot] avatar ilyanadev avatar snowfrogdev avatar joe-larue avatar kylemcmaster avatar efleming18 avatar sadukie avatar samuelwine avatar coop56 avatar rickhodder avatar osotogari avatar szlatkow avatar brimmingdev avatar franksbrain avatar matthiasjost avatar patrykr5 avatar pgadea avatar rostech avatar sdepouw avatar shadynagye avatar azure-pipelines[bot] avatar juststeve avatar sucrose0413 avatar

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.