I wrote this with the goal of helping my fiancée and I organize our wedding, though the scope eventually narrowed to a simple app to provide information about our wedding and allow our invitees to easily RSVP paperlessly. All the infrastructure is there to eventually make it more than a simple SPA, but I'll likely split it into separate .NET API and Node.js front-end projects before I get the juicier parts fully implemented and hooked up.
I knew plenty about .NET Core before starting this, but basically nothing about React, Redux, or Webpack. There are a number of crazy things I've figured out along the way. I chose to configure Webpack and Babel manually for React over the create-react-app starter app because I have a general disdain for magic black boxes, and I enjoy retaining control. Plus it helps me better understand what's going on with everything.
The backend is written in C# using .NET Core 2.2. The frontend is written in ES7 using React + Redux. I'm using reactstrap to style the UI because I generally suck at front-end design, though I've gotten a bit better over the life of this project.
There are no tests because of my initial resistance to TDD and due to time constraints. I've made a point to eventually put them into the code, as I imagine this app will continue to grow beyond our wedding date in the hopes that others may find it similarly useful. I also don't want to keep paying for RSVPify, which is currently being injected into the RSVP page via iframe.
This project references my C# toolbox, which is where I store all my handy abstractions, extensions, utility classes, etc., that I've picked up through my career. Much of the toolbox was born out of this project.
- Any Windows or Unix-like machine that can run the .NET Core binaries below.
- .NET Core 2.2 Runtime or SDK
- Node.js & npm
- Optional: Yarn*
*If you choose to use npm instead of Yarn in a non-development environment, you'll need to modify the pre-build targets in the WeddingPlanner.Web.csproj
file, which are currently set to yarn. It's just faster for me on Windows still, though I've read that npm is way faster now than it used to be.
- Clone this repo and
cd
into the directory. - Execute
dotnet run -p WeddingPlanner.Web/
- In another terminal, execute
yarn watch
ornpm run watch
fromWeddingPlanner.Web/
. - Navigate to http://localhost:5000/*
*I originally configured Kestrel to bind to SSL ports with a certificate file (or Windows store cert), but it was far too great a hassle. I ended up using nginx as a reverse proxy and configuring SSL there instead, which I found far more convenient. This is also the prescribed method of hosting .NET Core apps by Microsoft as of 2019-03-23.
Thanks to the following references for inspiration and code snippets in designing this:
- Jason Watmore's React + Redux - User Registration and Login Tutorial & Example
- Configuring HTTPS in ASP.NET Core across different platforms
- Token Authentication in ASP.NET Core 2.0 - A Complete Guide
- ReactJS + Redux Basics by Academind
- Ducks: Redux Reducer Bundles
- Visual Studio 2017 - Resolving SSL/TLS connections problems with IIS Express by A.J. Saulsberry