Skip to content

robk99/DrzaveApp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DrzaveApp

Application with CRUD functions on lists of countries and cities

Table of contents

  1. Prerequisties
  2. Technology
  3. Installation
  4. Setting up
  5. Basic usage
  6. Additions

Prerequisties

Postgres SQL + SQL Shell (psql)
Visual Studio (or similar IDE)
Visual Studio Code (or similar IDE)

Technology

ASP .Net Web API Core 3.0  
PostgreSQL 12.1
Angular 8.0  

Installation

Setting up

Visual Studio:

  1. Open appsettings.json inside "DrzaveWebAPI" and make sure connection string has the right data according to your postgres credentials, so as right port:
    Image of setting up postgres credentials
  2. Build your solution:
    Right click on solution and press: Build Solution
    Image of building solution
  3. Create database with VS Package Manager Console:
    Make sure the "Default Project" is set to: DAL
    Image of creating database
    If built correctly you should see your tables in pgAdmin or psql.
  4. Start Project with IIS Express:
    Image of starting WebAPI project

SQL Shell (psql):

  1. Open psql and log in with your credentials:
    Image logging in to psql
  2. Inside project folder find folder "SQL", copy its path and paste it to psql with "database_creator.sql" file and press ENTER:
    (psql should start creating database tables and functions)
    (If you are using Linux be sure to change forwardslashes with backslashes and if you have path that contains spaces be sure to put whole path in backticks)
    Image of creating tables
    If everything went well now you have populated you database with data.

Visual Studio Code:

  1. Open VS Code and drag&drop "Angular" folder from project:
    Image of drag&dropping
  2. Inside VS Code go to Terminal -> New Terinal, write: "npm install" and hit ENTER:
    Image of installing npm (Node Package Manager should now install all of the dependent packages)
  3. When done, open "environment.ts" inside environment folder and make sure to match localhost url of your API application:
    Image of environment.ts file
    Right click on "DrzaveWebAPI" inside Visual Studio and select Properties:
    Image of DrzaveWebAPI properties
  4. Open terminal inside VS Code and type "ng serve -oo"
    Image of starting Angular app

Voilla! Now you can use application!

Basic usage

  • Login or Registration
    Image of Homepage
  • Register new user on Registration page and then Login
    Image of RegistrationPage
  • Clicking on any country you expand it and see if it contains cities:
    Image of expanding
  • Clicking on blue "edit" button you go to edit-route:
    Image of edit-route
  • Clicking on "Cities" text you go to cities-route where you can edit cities likewise:
    Image of cities-route
  • Error Page
    Image of ErrorPage

Additions

  • Exception logging
    Inside "..\DrzaveWebAPI\GlobalErrorHandlingLogs\logs" you can find txt file logs for some basic exceptions:
    Image of exception logging
  • HTTP request logging
    Inside "..\DrzaveWebAPI\HttpRequestHandlingLogs\logs" you can find JSON file logs for every HTTP request and response:
    JSON http logs
  • JWT Authorization
    Inside browsers local storage you can find Json Web Token:
    Image of jwt
  • Password Hashing
    User passwords are hashed with PBKDF2 and SHA512 Encryption:
    Image of hashed password

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published