A webui for artemis
This repository has been archived on 2024-03-30. You can view files and clone it, but cannot push or open issues or pull requests.
Go to file
PolarisPyra 183f7a6ea9 Merge pull request 'feat: add requirements file for python scripts' (#44) from HiiroSakaki/cozynet:main into main
Reviewed-on: #44
2024-03-06 01:12:19 +00:00
pythonscripts removed and renamed 2023-12-28 18:33:45 -05:00
src added logout button to navigation bar file... not sure why it was in it's own.. 2024-01-21 07:01:44 -05:00
.eslintrc.json first commit 2023-12-08 13:25:54 -05:00
.gitignore first commit 2023-12-08 13:25:54 -05:00
.prettierrc updated formatting 2024-01-13 00:10:28 -05:00
README.md feat: add requirements file for python scripts 2024-02-24 04:37:31 +09:00
README.zh_tw.md feat: add requirements file for python scripts 2024-02-24 04:37:31 +09:00
components.json added themes 2024-01-08 16:43:27 -05:00
next.config.js first commit 2023-12-08 13:25:54 -05:00
package-lock.json remove non needed packages 2024-01-21 06:23:55 -05:00
package.json remove non needed packages 2024-01-21 06:23:55 -05:00
postcss.config.js first commit 2023-12-08 13:25:54 -05:00
requirements.txt feat: add requirements file for python scripts 2024-02-24 04:37:31 +09:00
tailwind.config.ts fixed themes i think 2024-01-08 20:27:43 -05:00
tsconfig.json test 2024-01-13 14:27:19 -05:00

README.md

CozyNet Setup:

REQUIRES NODE 21 OR HIGHER

  1. Download CozyNet from here.

  2. Navigate to the CozyNet directory: cd CozyNet

  3. Install Python prerequisites:

    pip install -r requirements.txt
    
  4. Run Python scripts in CozyNet/pythonscripts:

    • For image grabbing:

      python imagegrabber.py "C:\Users\polaris\Documents\Chunithm SUN (SDHD 2.10.01)\App\data" "C:\Users\<name>\Documents\Chunithm SUN (SDHD 2.10.01)\App\bin\option" "C:\Users\<name>\Desktop\output"
      
  5. Move the files from output/ into CozyNet/public.

  6. Create a .env file in the CozyNet directory with the following content:

    NEXT_PUBLIC_ARTEMIS_API_URL=http://localhost:4000
    NEXT_PUBLIC_CDN=/
    NEXT_PUBLIC_COOKIE_SECURE_HTTPS= true || false (set to true if your running on a production env with https and set to false if youre running on localhost)
    
  7. Install dependencies and start CozyNet:

    npm install
    npm run dev
    
  8. CozyNet should be accessible at localhost:3000.

Artemis API Setup:

  1. Download the Artemis API from here.
  2. Navigate to the Artemis API directory: cd ArtemisApi
  3. Install Node.js dependencies: npm install
  4. Create a new table in the database for CozyNet Rivals WebUI:
python .\database_builder.py --base_path "C:\Users\polaris\Documents\CHUNITHM SUN PLUS" --mysql_host --mysql_port 3306 --mysql_user --mysql_password --mysql_db

the above script will make the new following new tables

cozy_static_accessory, cozy_static_mapicon, cozy_static_nameplate, cozy_static_systemvoice, and cozy_static_trophy

4a. Create the rivals table use sql script in dbeaver or cmd

 CREATE TABLE IF NOT EXISTS cozynet_rival_codes(
     id INTEGER PRIMARY KEY,
     rival_code INTEGER NOT NULL,
     FOREIGN KEY (id) REFERENCES aime_user(id) ON DELETE CASCADE
 );
  1. Configure the Artemis API env .env.development or .env.production the env belong in the root directory:

    JWT_SECRET=mystrongsecret
    host=aime
    user=aime
    password=dbpassword
    database=aime
    port=3306
    

prerequisites:

nodemon

npm install -g nodemon
  1. Start Artemis API:

    npm run start:dev   # For development
    npm run start:prod  # For production
    
  2. Credits:

    SQL tables - Beerpsi README.zh-TW.md - Raymonf

BUG:

Update: I have found the problem it is with NEXT_PUBLIC_COOKIE_SECURE_HTTPS=true being set on localhost machine i will try to fix it. Just know you should be using false if you're on localhost.

Initial Bug: If you're hosting on a local machine the first time you login you will encounter a bug where the username and password get sent to the url bar as queries in plain text and you will then find yourself unable to login. If you clear the url bar and refresh the page you should be able to enter your information and login correctly. I do not currently know what causes this bug and if someone could help me find the cause I would be very greatful.