kimkong88 / ea-assignment

Assignment

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

EA Take Home Assignment

Take home assignment that does following:

  • User can read posts
  • Each post can have multiple comments
  • User can write posts
  • User can comment on a post
  • User can register

Live Demo

See Live Demo Deployed on Azure

Tech

EA Assignment was built with:

  • .NET Core - Cross platform framework for C#
  • Angular - Javascript framework for Gui
  • Postgresql - RDBMS

Libraries:

  • Entity Framework Core - ORM for api project to interact with postgresql.
  • Autofac - IoC container for .NET Core
  • Moq - C# testing framework
  • Devextreme - Angular UI framework
  • Swagger - API documentation

Installation

To run locally, the app requires:

  • Node - v8+
  • NPM - v6+
  • .NET Core SDK - 2.2
  • Postgresql - v10+, with role name: admin, password: admin with create privilege

To start Gui, install the dependencies and start the server.

$ cd ea-assignment/web/gui
$ npm install
$ npm run-script build-prod

To start backend, restore packages, build the solution then migrate the database.

$ cd ea-assignment/src/api
$ dotnet restore
$ dotnet build
$ cd ../data
$ dotnet ef database update
$ cd ../api
$ dotnet run

To run on another host built with docker, the app requires:

  • Docker - Recommended v18.02.0+
  • Docker Compose - v1.20+

To run:

$ cd ea-assignment
$ docker-compose build
$ docker-compose up

Or alternatively you can pull from Docker Hub

$ docker pull damiankim/ea-assignment:gui-latest
$ docker pull damiankim/ea-assignment:api-latest
$ docker pull damiankim/ea-assignment:db-latest

Testing

To run backend tests:

$ cd ea-assignment/tests/blogtest
$ dotnet test

To run frontend tests:

$ cd ea-assignment/web/gui
$ npm test

API Documentation

Assuming running on docker, API Documentation can be found at:

http://localhost:5000/swagger/index.html

Todos

  • Write GUI Test
  • Add Authentication
  • More Features to utilize APIs

About

Assignment


Languages

Language:C# 63.6%Language:TypeScript 22.9%Language:CSS 4.7%Language:HTML 4.5%Language:Dockerfile 2.2%Language:JavaScript 2.1%