6ef52c88b1 | ||
---|---|---|
pythonscripts | ||
src | ||
.eslintrc.json | ||
.gitignore | ||
.prettierrc | ||
README.md | ||
README.zh_tw.md | ||
components.json | ||
next.config.js | ||
package-lock.json | ||
package.json | ||
postcss.config.js | ||
tailwind.config.ts | ||
tsconfig.json |
README.md
CozyNet Setup:
REQUIRES NODE 21 OR HIGHER
-
Download CozyNet from here.
-
Navigate to the CozyNet directory:
cd CozyNet
-
Install Python prerequisites:
pip install tqdm pillow
-
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"
-
-
Move the files from
output/
intoCozyNet/public
. -
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)
-
Install dependencies and start CozyNet:
npm install npm run dev
-
CozyNet should be accessible at
localhost:3000
.
Artemis API Setup:
- Download the Artemis API from here.
- Navigate to the Artemis API directory:
cd ArtemisApi
- Install Node.js dependencies:
npm install
- 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
);
-
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
-
Start Artemis API:
npm run start:dev # For development npm run start:prod # For production
-
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.