Giter Site home page Giter Site logo

waqas-syed / todo-list Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 1.37 MB

ToDo List Manager. Built using .NET, ASP.NET Web Api & AngularJS. Uses Domain Driven Design(DDD) as the design pattern and layered architecture, plus repository pattern, CQRS & Single Responsibility Principle also being used.

C# 100.00%

todo-list's Introduction

todo-list

ToDo List manager allows users to register using email and then login to add ToDos with Description, Due date and Priority, and the ability to edit, delete and mark a ToDo as completed.

Design Patterns
Domain Driven Design pattern is used to implement the backend which can be seen in the implementation of different layers, the use of Single Responsiblity Principle, the Repository pattern even when we are using EF and CQRS for Domain Model's abstraction from the outside world. Domain Driven Design helps immensely in case of maintaining large and evolutionary projects.

Architecture
Backend is developed in C# using the .NET Framework and utilizes:
- ASP.NET Web Api for providing RESTful architecture
- Entity Framework as ORM
- Ninject as the dependency resolver
- Microsoft Identity for handling users and account
- OWIN(Katana) pipeline as the interface between the web application and web server.

Frontend is created as a .NET Core project, and uses AngularJS to create a Single-Page-Application. Grunt copy tasks are used to copy the javascript files to the wwwroot folder as soon as they are added or updated.

Prerequisites
Visual Studio 2017
MySql Community Server 5.7 (Having MySql Workbench installed too is a plus)

How to Run
Database:
Even though EF Code first is being used, the database structure is dumped as a .sql file which needs to be imported. The reason for this is that having the database created with every run is risky in production environments which can result in data loss. Thus, having a backup file and loading it manually is the right approach in my opinion. To do that:

  • Create a new database using WorkBench or the command line
  • Open MySql WorkBench
  • Log in with the root account. Create one if this is the first time you are logging in.
  • Click Server --> Data Import. Choose the database to import to. Locate the sql dump in the solution: Backend/Data/MySql/create.sql.
  • Click Import. The sql dump will be imported, and the database is all set to be used.
  • The connection string for the application is located inside Backend/Common/ToDoApp.Common.WebHost project, inside web.config file with the name "MySql". The username and password can be changed. The account credentials that the application is using are testuser:Wired987#, so either change the credentials in the web.config or create a user with these credentials in MySql. This can be done in Myql WorkBench by going to Server -> Users & Privileges and creating a new user.
  • Allow 'MaintenanceAdmin' Priviliges to this user. This can be done in MySql WorkBench by going to Server -> Users & Privileges, click on the desired user and then select the Administrative Roles tab.

Backend:

  • Right click on the Solution and choose 'Restore Nuget Packages'
  • Once the packages are restored, right click the project Backend/Common/ToDoApp.Common.WebHost -> Debug -> Start New Instance.

Frontend:

  • Click Views --> Other Windows --> Task Runner Explorer.
  • Once the task runner explorer window appears, you should be able to see GruntFile.js -> Alias Tasks -> Default. Right click on Default and select Run.
  • Right click the project Frontend/ToDoApp.Frontend, Debug -> Start New Instance.

A new window will appear with the login screen and is ready to register new users, log them in and have new ToDos created.

todo-list's People

Contributors

waqas-syed avatar

Watchers

James Cloos 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.