ibrahimuludag / DevBetterWeb

A simple web application for devBetter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Actions Status Last Publish Attempt

DevBetterWeb

A simple web application for devBetter.com.

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

Development Links

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
  • Modify Program.cs so that it seeds the database the first time you run (uncomment this line)

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.

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

Update AppDbContext model:

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

Generate Idempotent Update Script (for production):

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

About

A simple web application for devBetter


Languages

Language:C# 63.2%Language:HTML 29.7%Language:JavaScript 2.7%Language:CSS 1.8%Language:TSQL 1.7%Language:SCSS 0.6%Language:Dockerfile 0.1%Language:Batchfile 0.1%