Skip to content

IFRC Alert Hub provides global emergency alerts, empowering communities to protect lives and livelihoods.

Notifications You must be signed in to change notification settings

IFRCGo/alert-hub-web-app

Repository files navigation

IFRC ALERT HUB

Web client for the Alert Hub platform

Getting started

Prerequisites

You can either use docker or yarn to locally run or build this application.

Local setup

1. Clone the repo

git clone [email protected]:IFRCGo/alert-hub-web-app.git
cd alert-hub-web-app

2. Install the dependencies

# Skip if running through docker
yarn install

3. Setup environment variables:

Create a .env file with following variables

APP_TITLE=
APP_MAPBOX_ACCESS_TOKEN=
APP_GRAPHQL_API_ENDPOINT=
APP_GRAPHQL_CODEGEN_ENDPOINT=

You can contact IFRC team to get appropriate values for these variables

4. Run dev instance

yarn start
# or
docker-compose up

Directory Structure

.
├── patches/ (Patches to any of the external dependencies)
├── public/ (Content that needs to be copied during build)
├── generated/ (Generated files: eg. Typescript Definitions)
├── index.html (Base html file)
└── src/
    ├── App/
    │   ├── index.tsx (Defines providers: eg. Auth, Route, Request, Alert)
    │   └── routes.tsx
            ├── index.tsx (Defines routes for the pages)    
    ├── assets/ (images, icons)
    ├── components/ (Commonly used components)
    │   ├── domain/ (Components that are specific to a domain)
    ├── config.ts (Defines configurations read from environment variables)
    ├── declarations/ (Type declarations for external libraries)
    ├── hooks (React Hooks)
    ├── index.tsx (Initializes React)
    ├── utils (Utility functions)
    └── views/ (Pages that we can navigate on the platform)
        └── RootLayout/
            └── index.tsx (Defines root layout and requests fetched for DomainContext)

External facing API

Here is the documentation for Alert Hub GraphQL Client Usage Guide

About

IFRC Alert Hub provides global emergency alerts, empowering communities to protect lives and livelihoods.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published