Skip to content

Self-hosted issues tracker and performance stats collector about Compose Multiplatform applications

Notifications You must be signed in to change notification settings

N7ghtm4r3/Ametista

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

62 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Ametista

v1.0.0

This project, based on Java and the Spring Boot framework, is an open source self-hosted issues tracker and performance stats collector about Compose Multiplatform applications

Improve the quality and stability of your apps with Ametista!

Customize the application

To customize and create your own version of this application you need to have the core library implemented in your project and published into maven local system

Clone the core library and publish to maven local

  • Clone the repository or download the zip file of the current version available

  • Open the folder file in your development environment and publish to maven local with the publishMavenPublicationToMavenLocal gradle task, take a look here for a help

Implement the core library to your application

  • Gradle (Short)

repositories {
  ...
  mavenLocal()
}

dependencies {
  implementation 'com.tecknobit.ametistacore:ametistacore:1.0.0'
}

Gradle (Kotlin)

repositories {
  ...
  mavenLocal()
}

dependencies {
  implementation("com.tecknobit.ametistacore:ametistacore:1.0.0")
}

πŸ›  Skills

  • Java
  • Kotlin

Architecture

Engine

The engine is the core component of Ametista. It collects performance data and tracks issues to send to your backend instance for analysis.

Clients

Backend

Usages

Backend configuration

Warning

Note: the service will run using the HTTP protocol as default, it is recommended to implement an SSL or TLS certificate to secure communication on your infrastructure.

Wikis

To create a self-signed certificate you can look here

To implement a certificate in Spring you can look here

If you encounter any problems with the creation of the keystore you can look here to get more information, or use the following command to add the private key to the keystore:

openssl pkcs12 -export -in your_certificate_file.crt -inkey your_private_key.key -out your_out_pkcs12_file.p12 -name your_alias_name -CAfile your_certificate_file.crt -caname root

Default configuration

The default properties to launch the backend service as designed are the following:

# The properties considered critical could alter the flow of how the backend service was designed, so we do not recommend
# to change them

spring.datasource.url=jdbc:mysql://localhost:3306/ametista?createDatabaseIfNotExist=true
server.port=1408
spring.datasource.username=root
spring.jpa.generate-ddl=true
spring.jpa.hibernate.ddl.auto=update
spring.jpa.show-sql=true
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL8Dialect
spring.mvc.dispatch-options-request=true
Property Default value Not-Critical Recommended to change
spring.datasource.url jdbc:mysql://localhost:3306/ametista βœ… ❌
server.port 1408 βœ… /
spring.datasource.username root βœ… βœ…
spring.jpa.generate-ddl update ❌ ❌
spring.jpa.hibernate.ddl.auto auto ❌ ❌
spring.jpa.properties.hibernate.dialect org.hibernate.dialect.MySQL8Dialect ❌ ❌
spring.mvc.dispatch-options-request true ❌ ❌

The spring.datasource.username if is not set is used the default password of the MySQL environment

Custom configuration

To customize the properties to launch the backend service you must create a file in the same folder where you placed the server file (.jar) and call it "custom.properties" as below:

  folderOfWhereYouPlacedTheServerFile
   |-- custom.properties
   |-- ametista.jar

If your custom properties do not contain the properties of the default configuration will be used these default properties instead, so if you need to change some default properties you have to overwrite them.

Take a look to the official page of Spring for a high customization here

Run the service

To start the Ametista service on your own infrastructure you have to follow these steps

Requirements

  • At least Java 18 JDK installed on your machine
  • An SQL environment installed, it is recommended to use MySQL
  • Before run the backend service, for the first time only, you need to store in the profiles subfolder ( created automatically by the server) the default profile pic as below:
    folderOfWhereYouPlacedTheServerFile
     |-- resources
     |   |-- profiles
     |       |-- defProfilePic.png
     |-- ametista.jar
    This action is required to provide the defProfilePic as logo or profile for the users. You can take a look directly here to get more information and to get the defProfilePic file to store in the resources folder
  • The SQL service running on "localhost:3306/ametista" by default, or if has been customized, with the custom data to format correctly the connection URL

Launch the service

When you have to start the service you will have different scenarios:

  • At the first launch the server will be interrupted and will be thrown the SaveData exception to store the server secret to manage the viewers accesses to the server and the admin code to authenticate as an admin, share it only to the users that you retains allowed to access to your server
    Exception in thread "main" java.lang.RuntimeException: com.tecknobit.apimanager.exceptions.SaveData: Note: is not an error, but is an alert!
    Please you should safely save: "the_server_secret_generated" to correctly register a new user in the Ametista system.
    The admin code: "the_admin_code_generated" to authenticate as an admin, keep them safe!
  • If is not the first launch the service will start directly
  • If you need to recreate the server secret you need to launch the service with the rss command like this:
    java -jar Ametista.jar rss // this will generate a new server secret overwriting the current server secret
  • If you need to delete the server secret, just note that when the service will be launched again will be generated a new server secret to work correctly, you need to launch the service with the dss or dssi command like this:
    // dss command
    java -jar Ametista.jar dss // this will delete the current server secret
    
     // dssi command
    java -jar Ametista.jar dssi // this will delete the current server secret and interrupts the server workflow right next

Authors

Support

If you need help using the library or encounter any problems or bugs, please contact us via the following links:

Thank you for your help!

Badges

Twitter

Donations

If you want support project and developer

Crypto Address Network
3H3jyCzcRmnxroHthuXh22GXXSmizin2yp Bitcoin
0x1b45bc41efeb3ed655b078f95086f25fc83345c4 Ethereum
AtPjUnxYFHw3a6Si9HinQtyPTqsdbfdKX3dJ1xiDjbrL Solana

If you want support project and developer with PayPal

Copyright Β© 2024 Tecknobit