Recently I decided to build a lightweight shopping cart web app in ASP.NET MVC 5 so that it can be used by local businesses to take orders online.

The app takes orders online and sends out an email to the shops owner. The email contains all of the order information and the business owner can charge it using their in store credit card management system.

It is very light weight, responsive, secure, and open source and it is built on top of some really great technologies, all of which are open source as well.

The source code can be found on GitHub here.

The problem.

I have a lot of family and friends in the restaurant industry and others that own small businesses and they are all facing the same type of dilemma:

How to take advantage of the internet and the explosive growth of mobile apps to expand their business.

They want to allow their customers to place an order online. They want to charge it themselves and ship or deliver the items themselves. They don’t want any fancy system, a CMS, or anything with too much complexity and to be frank they can’t afford to maintain any of that.

They want simplicity. Once the app is deployed and running they can maintain it with ease. I set out to build an extremely lightweight framework that I could reuse across all of these different small businesses and then I decided to give it away and open source it.

Most of these small businesses have static websites that show exactly what they are selling but have no way of actually selling anything online without adding complexity or cost.

Don’t get me wrong apps like seamless and grub hub are great. They allow restaurants to sell online and have wide reach but they also charge restaurants anywhere between 10% to 20% of the order price. Not to mention other types of shops don’t even have services like these available to them.

By providing a fully finished secure web app, that just requires some configuration and deployment to your favorite hosting site, this framework aims to give the power back to the local shop owners.

Why build another shopping cart?

While there are many great shopping carts out there, done in any programming language used to build web applications, very few of them solve this problem in a simple easy to maintain secure manner.

Most of these existing carts are bloated with lots of features which can really mean lots of complexity. Take for example nopCommerce, it took me longer to setup items and configure a shop in there then it took me to write my own framework that I could reuse.

Don’t get me wrong features are nice but for the local shops and small business owner I think just a clean way to take orders on their website is more than enough.

Now for my favorite part.

The app uses a lot of exciting technologies that make development extremely easy and fast. (I build this on the side after work and in less than two weeks from start to its current state.)

The Technology Stack.

ASP.NET MVC 5 and .NET 4.5 at its core written in C#. I took advantage of some of the asynchronous programming features of .NET 4.5, I would like to stress some because I have more work to do on this one. The app is extremely fast and very responsive and in all honesty was a dream to write because these technologies are so nice to work with.

HTML 5 – Front end development is extremely easy with a framework like bootstrap. I simply took a free open source theme from http://bootswatch.com and had a beautiful responsive UI that works great on mobile and desktop within a few minutes.

Entity Framework 6 code first migration for all of the database work. This makes it extremely fast and easy to deploy and working with Entity 6 is so much fun. Allows for easy asynchronous write backs and saves to the database without having to worry about writing any SQL. (On a side note I once told a colleague of mine back at SunGard that I hated writing SQL because it was so 1960-ish, I didn’t mean that I dont really thik SQL is that bad.)

SQL Server Express database, although entity makes it easy to use any database behind this.

Identity 2.0 for the security aspects, Microsoft has some really great template to get you up and running with a super secure site within an hour. This allows for a great authentication and authorization system that supports external logins from Google and Facebook and easily allows for roles.

Mailgun for the emailing system and they have a great free 1000 email program that these small businesses will generally never go over.

Windows Azure for hosting but in reality any ASP.NET hosting provider will do.

D3.js for some analytics and charting so shop owners can track how their online business is doing. I should note that this isn’t fully implemented as I was simply learning D3 while doing this. More will be done on this one in the future for sure as D3 is one of the best UI technologies I have come across.

There are also lots of other technologies such as

  • Visual Studio
  • TFS Online
  • Github
  • jQuery

Oh and I would really like to shout out AppVeyor they are extremely easy to use all in one continuous integration system that automatically builds and tests your app right off of github. It is truly a joy to work with and don’t just take my word for it go see what one of my favoret developers has to say about it, Hanselman's Blog.

Finally the app is loosely based off the ASP.NET MVC 3 Music Store from Microsoft, MVC Music Store, but unlike that app this is much more full featured and suitable for the real world. That app is a great way to learn how to build a shopping cart though and my thanks’ goes to the developer, Jon Galloway.