Giter VIP home page Giter VIP logo

92534's Introduction

92534

Prerequisites

This project has been tested on macOS 12.6 and node 16.14.1.

Environment

These are the contents of the packages/api/.env file. Use the Postgres credentials to inspect the database in pgadmin.

POSTGRES_DB=92534
POSTGRES_USER=92534
POSTGRES_PASSWORD=92534
POSTGRES_HOST=0.0.0.0
POSTGRES_PORT=5432
DATABASE_URL="postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}?schema=public"

Usage

To run the project, run the following commands in your terminal

# Install Dependencies
npm install && \
    # Start postgres
    docker compose -f ./packages/api/docker-compose.yml up -d && \
    # Install migrations
    npx -w @92534/api prisma migrate dev && \
    # Start API & Client
    npm start

You can now access the projects which are running on the following ports:

User Stories

  • As a user, I want to navigate a web-based application, so that I can find events of interest

    User can navigate a list and detail view of the the events at http://localhost:3000

  • As a user, I want to save the data retrieved from the REST APIs to a database for further processing

    Data is downloaded from api.open511.gov.bc.ca when the server starts, and fetches changes every minute (REMOTE updated_at > LOCAL last_updated_at)

  • As a user, I want to filter out events by

    • Area
    • Severity
    • Event Type
    • Start Date

    Filters on the list view provide this functionality

  • As a user, I want to provide two REST API endpoints to give data access to other applications. The rest endpoints include:

    • Creating new events

    • Getting highest severity events by Areas

      Please import the attached 92534.postman_collection.json and see the 92534/V0/Events/Create and 92534/V0/Events/Views/Major Events endpoints. Entries for the other endpoints are included.

  • As a user, I want to monitor API usage data based on the API calls from other applications

    The .../Create and .../Major Events endpoints require an API Key to use. Usage data is stored in the TokenLog table in the database, accessible by PGAdmin

92534's People

Contributors

sidmclaughlin avatar

Watchers

 avatar  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.