-
Elisabethein authoredElisabethein authored
To learn more about this project, read the wiki.
README.md 7.34 KiB
Emergency Alert Application
Documentation
Table of Contents
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
- Clone the repository
- Create a database named 'EAA' to your database server (e.g. PgAdmin)
- Open the project in your IDE
- Set database variables to your environment variables (see application.properties)
- 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);
}
}
- Run the application
- The application will run on port 8080
Frontend
- Move to the frontend directory
- Run
npm install
- Run
npm run serve
- 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):
NB! Password for all is "password123"