3.3 KiB
FFXI Trust Characters Web App
A web application for browsing and managing Final Fantasy XI Trust characters.
Features
- Browse characters by role
- Search characters by name, role, job, abilities, or spells
- View detailed character information
- Track which characters you have acquired
- Explore synergy sets between characters
Deployment with Docker
This application can be easily deployed using Docker and Docker Compose.
Prerequisites
Quick Start
-
Clone the repository:
git clone <repository-url> cd TRUSTS -
Install dependencies:
npm install -
Start the application:
docker-compose up -d -
Test the Docker setup:
./test-docker.sh -
Access the application:
- Web app: http://localhost:3000
- API: http://localhost:3000/api/trusts
Building and Pushing the Docker Image
If you want to build and push the Docker image to a registry:
-
Build the image:
docker build -t your-username/ffxi-trusts:latest . -
Push the image to a registry:
docker push your-username/ffxi-trusts:latest -
Pull and run the image on your server:
docker pull your-username/ffxi-trusts:latest docker run -d -p 3000:3000 \ -e PSQL_HOST=your-db-host \ -e PSQL_PORT=5432 \ -e PSQL_USER=postgres \ -e PSQL_PASSWORD=your-password \ -e PSQL_DBNAME=ffxi_items \ your-username/ffxi-trusts:latest
Configuration
The application connects to an existing PostgreSQL database for storing character data. The default configuration in the docker-compose.yml file is:
- Database host:
10.0.0.199 - Database port:
5432 - Database name:
ffxi_items - Database user:
postgres - Database password:
DP3Wv*QM#t8bY*N
You can modify these settings in the docker-compose.yml file if your database connection details are different.
Database Requirements
The application expects a PostgreSQL database with a trusts table that has the following schema:
CREATE TABLE trusts (
id SERIAL PRIMARY KEY,
name VARCHAR(255) NOT NULL,
alt_name VARCHAR(255),
role VARCHAR(100),
job TEXT,
spells TEXT,
abilities TEXT,
weapon_skills TEXT,
invincible BOOLEAN DEFAULT FALSE,
acquisition TEXT,
special_features TEXT,
trust_synergy TEXT,
trust_synergy_names TEXT[],
acquired BOOLEAN DEFAULT FALSE
);
If your database doesn't have this schema, you can use the provided init.sql script to create it.
Development
For development purposes, you can run the application without Docker:
-
Install dependencies:
npm install -
Configure the database connection in
db.conf -
Start the server:
node server.js
API Endpoints
GET /api/trusts- Get all charactersGET /api/trusts/:id- Get a specific character by IDGET /api/trusts/role/:role- Get characters by roleGET /api/trusts/search/:query- Search charactersPUT /api/trusts/:id/toggle-acquired- Toggle the acquired status of a characterGET /health- Health check endpoint for monitoring the application status
License
This project is licensed under the MIT License - see the LICENSE file for details.