You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 2.9KB

3 years ago
3 years ago
3 years ago
3 years ago
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. # DERO Benchmarks
  2. DERO Benchmarks allows you to list each user's benchmarks. Admins can manually confirm/delete each user's benchmarks from a dedicated page.
  3. The backend part uses the [Paladin Framework](https://github.com/paladin-framework/paladin) and is made in Java.
  4. The frontend part uses [VueJS Framework](https://vuejs.org/) and [Vuetify](https://vuetifyjs.com) and can be found in [dero-benchmark-vue](https://github.com/Slixe/dero-benchmarks/tree/master/dero-benchmark-vue) folder.
  5. # How to start
  6. To start, you will need to build the backend and frontend separately.
  7. ## Backend
  8. First, you must have a java version higher or equal to Java 8.
  9. To compile the backend, do the following command:
  10. ```
  11. gradlew fatJar
  12. ```
  13. The executable jar file will be found in `build/libs/` folder.
  14. To execute it, all you'll have to do is:
  15. ```
  16. java -jar dero-benchmarks.jar
  17. ```
  18. Edit the `config.json` file to put the port on which the server should listen.
  19. ### Create User
  20. Edit the file `admins.json`, an example is created in it.
  21. If you want the application to hash your password, replace `"hashedPassword"` with `"password"`.
  22. Example of `admins.json`:
  23. ```json
  24. [
  25. {
  26. "username": "Slixe",
  27. "password": "password123",
  28. "salt": "salt123"
  29. }
  30. ]
  31. ```
  32. ### Enable SSL
  33. There are two ways to enable SSL on DERO Benchmarks:
  34. - You can make a reverse proxy using NGINX (or another one) for example.
  35. - You can directly activate it in the config.json file
  36. For the second solution, you will need to generate a Java keystore file (.jks).
  37. To create a java keystore file from an already existing certificate, please refer [here](https://stackoverflow.com/questions/906402/how-to-import-an-existing-x-509-certificate-and-private-key-in-java-keystore-to)
  38. For more examples: [here](https://www.javacodegeeks.com/2014/07/java-keystore-tutorial.html)
  39. once this step is done, just configure the "config.json" file.
  40. ```json
  41. {
  42. "port": 8080,
  43. "enableSSL": true,
  44. "keystoreFile": "keystore.jks",
  45. "secret": ""
  46. }
  47. ```
  48. `keystoreFile` is the path to your file. If it is in the same folder as the application, you can simply specify the file name as above.
  49. `secret` is the password needed for the keystore file.
  50. ## Frontend
  51. First you will need to change the value of `Vue.prototype.$api` with your API address (so the IP address/domain name where your backend is running) in the `src/main.js` file.
  52. Then, to build the frontend:
  53. ```
  54. yarn run build
  55. ```
  56. The result will be available in the `dist` folder and all you have to do is move its content to a web server.
  57. # Screenshots
  58. Some screenshots of the current design.
  59. ### Index
  60. ![](https://i.imgur.com/r3T2p0J.png)
  61. ### Submit
  62. ![](https://i.imgur.com/JoLyor7.png)
  63. ### Login
  64. ![](https://i.imgur.com/jmUFFJw.png)
  65. ### Unconfirmed Benchmarks (admin page)
  66. ![](https://i.imgur.com/ZZe0Atv.png)
  67. ## DERO
  68. ```
  69. dERokevAZEZVJ2N7o39VH81BXBqX9ojtncnPTDMyiVbmYiTXQY93AUCLcor9xsWCKWhYy25ja89ikZWXWab9kXRB7LYfUmbQyS
  70. ```