/gray-campero-app

The great campero is on tha house

Primary LanguageC#

Gray Campero!

GC Landing Page

version owner linkedin twitter

A web application to celebrate the joy of eating!

Questions

First of all, the name!

How long has it took to build the app?

4 days, pretty much. Most of it done during weekend.

Compile and run solution:

For front in angular:

  1. Install dependencies
npm install
  1. Run server with ng serve - http://localhost:4200 - Automatic redirection to home
ng serve

For back in .NET 3.1:

dotnet run

Migrations:

dotnet ef database update

Assumptions

A few of them, actually:

  • Default users for testing purposes. Login implementation out of scope for this task.

To make use of them, two initial users have been provided. Ids 1001 and 1002. To manage which one you use in the application, add 'user' parameter in query with value 1001 or 1002. This way, it will fetch one or another.

  • Implementation and design of database structured in three tables: Users, Products, Cart. Relations among them like:

  • Cart - User: many to one - one to many

  • Cart - Product: many to one - one to many

Design

I like sober, elegant user interfaces. White backgrounds with not many details and a light-smart choice for colors. Pretty inspired by platforms like Pinterest

Tooling

  • Angular 12

  • .NET Core 3.1

  • SQL Server 2017

Packages

For net:

  <ItemGroup>
    <PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="8.1.1" />
    <PackageReference Include="Microsoft.AspNetCore.JsonPatch" Version="5.0.11" />
    <PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.11" />
    <PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="3.1.20" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="5.0.11">
      <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
      <PrivateAssets>all</PrivateAssets>
    </PackageReference>
    <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="5.0.11" />
  </ItemGroup>

For angular:

  • Axios

Extra tooling

  • Unsplash (photographs)

  • Font awesome

  • Google fonts

Performance tests

Performance load test results

Locust tool has been used to perform load test against gc app. Results showed a 100% of success and 0 failures, which is good!

Parameters:

  • Concurrent users: 150

  • User insertion rate: 0.5 s

  • Domain: http://localhost:4200 (angular server)

lc-1

Results:

  • 0 failures, 100% success

lc-2

  • Users graph

lc-3

Versions

  • 1.0

Status for acceptance criteria

  • App fully working - All user stories completed

  • Performance not tested yet - In progress

Extra jobs

I'd like to deploy app with docker, but couldn't because of time

Branches

  • Master