Skip to content
Snippets Groups Projects
To learn more about this project, read the wiki.
README.md 7.34 KiB

Emergency Alert Application

Documentation

Table of Contents

  1. Introduction
  2. Features
  3. Running the application
  4. Contribution
  5. License
  6. Documentation

Introduction

This is an application for Estonian Wildlife Center to manage alerts made by member of the public about injured animals. The applications main purpose is to provide a platform for the public to report injured animals and for the center's volunteers to manage these alerts. Additionally, the application provides the following features:

  • A ticketing system for managing alerts
  • A knowledge base for common injuries and how to handle them
  • A user management system for managing users and roles
  • A statistics page for viewing the number of alerts and their status
  • An applications management system for managing the new applications
  • A settings page for managing the application settings like tags and functions

Features

  • Ticketing system
  • Knowledge base
  • User management
  • Statistics
  • Applications management
  • Settings
  • Profile

Running the application

Backend

  1. Clone the repository
  2. Create a database named 'EAA' to your database server (e.g. PgAdmin)
  3. Open the project in your IDE
  4. Set database variables to your environment variables (see application.properties)
  5. Set jwt secret to your environment variables (see SecurityConfig.java)

The following code can be used to generate a jwt secret for your variable.

import java.security.SecureRandom;
import java.util.Base64;

public class GenerateJWTSecret {
    public static void main(String[] args) {
        SecureRandom random = new SecureRandom();
        byte[] key = new byte[64]; // 512 bits
        random.nextBytes(key);
        String jwtSecret = Base64.getEncoder().encodeToString(key);
        System.out.println("Generated JWT Secret: " + jwtSecret);
    }
}
  1. Run the application
  2. The application will run on port 8080

Frontend

  1. Move to the frontend directory
  2. Run npm install
  3. Run npm run serve
  4. The frontend will run on port 8081

In order to test different roles and see the permitted views of each user role you can test with the following users (log in with the following credentials):

  1. alice.johnson@example.com
  2. jane.doe@example.com
  3. john.smith@example.com
  4. test@test.com

NB! Password for all is "password123"