EVE Metro
Configure your cron job to call this endpoint every 30 minutes.
Automated endpoint that handles cleanup of expired triglavian connections in the system. This endpoint:
- Removes stale/expired connections from the database
- Should be called periodically to maintain data freshness
- Helps maintain accurate pathfinding by removing outdated connection data
Automated endpoint that manages the creation of allowed entities in the system. This endpoint:
- Creates new entity allowlist entries
- Should be called periodically to maintain access control
- Helps manage which entities have access to specific features
Automated endpoint that handles cleanup of allowed entities. This endpoint:
- Removes outdated or invalid entity allowlist entries
- Should be called periodically to maintain clean access control lists
- Helps ensure only currently valid entities maintain access
The application requires the EVE Online Static Data Export to function. This contains essential information about EVE Online's universe structure.
- Download the latest SDE from Fuzzwork sqlite conversion
- Extract the SDE to your configured
SDE_PATH
- Ensure the application has read access to this directory
The SDE should be updated when CCP releases new versions, typically after major game updates that change universe structure.
NEXT_PUBLIC_DOMAIN
- Your application domain (e.g., evemetro.com)NEXT_PUBLIC_EVE_SSO_AUTH_HOST
- EVE SSO authentication host (default: https://login.eveonline.com)NEXT_PUBLIC_EVE_IMAGES_API_HOST
- EVE images API host (default: https://images.evetech.net)NEXT_PUBLIC_EVE_ESI_HOST
- EVE ESI API host (default: https://esi.evetech.net/latest)NEXT_PUBLIC_EVE_SSO_ID
- Your EVE Online SSO client ID from the developer portalEVE_SSO_SECRET
- Your EVE Online SSO secret key from the developer portal
ENVIRONMENT
- Set to 'development' to block EVEMail spam during developmentSDE_PATH
- Path to EVE Static Data Export Fuzzwork sqlite conversion on host system
POSTGRES_USER
- PostgreSQL usernamePOSTGRES_PASSWORD
- PostgreSQL passwordPOSTGRES_DB
- PostgreSQL database namePOSTGRES_HOST
- PostgreSQL host address (postgres when running with docker compose)EVE_METRO_DATABASE
- Application database name (default: evemetro)
COOKIE_CRYPT_KEY
- Random string used to encrypt EVE SSO session in cookiesADMIN_CHARACTER_IDS
- JSON array of character IDs that can access admin tools
EVE_SCOUT_API_URL
- EVE Scout API endpoint (default: https://api.eve-scout.com/v2/public/signatures)
Before you start, ensure you have the following installed:
- Node.js (version 14 or higher)
- Docker and Docker Compose
- Git
-
Clone the Repository
git clone https://github.com/your-username/eve-metro.git cd eve-metro
-
Set Up Environment Variables Copy the example environment file and configure it:
cp env.example .env
Edit the
.env
file to fill in the required values. Set POSTGRES_HOST to localhost. Remember to set your character IDs in ADMIN_CHARACTER_IDS. -
Download and Set Up the EVE SDE Create a directory for the EVE Static Data Export (SDE) and download the latest version:
mkdir sde wget https://www.fuzzwork.co.uk/dump/sqlite-latest.sqlite.bz2 bzip2 -d sqlite-latest.sqlite.bz2 mv sqlite-latest.sqlite sde/
-
Start the Development Database Use Docker Compose to start the necessary services:
docker-compose -f docker-compose-dev.yml up -d
This will start the PostgreSQL database and any other services defined in
docker-compose.yml
. -
Install Dependencies Install the required Node.js packages:
npm install
-
Run the knex migrations
npm run knex-migrate
This will start the PostgreSQL database and any other services defined in
docker-compose.yml
. -
Run the Development Server Start the application in development mode:
npm run dev
The application should now be accessible at
http://localhost:3000
. -
Login to the Admin Panel and setup wallet watcher and email bot After EVEMetro is running you need to login to the admin panel and setup the wallet watcher and email bot characters. Wallet watcher character should be a character that has access to corporation wallet. Email bot character should be a character that you want to be the one sending out emails in game.
-
CRON JOBS The application has 3 cron jobs that need to be setup.
- Wallet watcher cron job
- Email bot cron job
- Allowed entities cron job
During development you can also simulate the cron jobs by calling the endpoints directly:
curl http://localhost:3000/api/cron/create-allowed-entities
curl http://localhost:3000/api/cron/purge-allowed-entities
curl http://localhost:3000/api/cron/purge-connections
- Start Development Server:
npm run dev
- Build Production Version:
npm run build
- Start Production Server:
npm run start
- Run Linting:
npm run lint
- Run Tests:
npm run test
If you want to contribute to the project:
- Create a new branch for your feature or bug fix:
git checkout -b feature/my-feature
- Make your changes and commit them:
git commit -m "Add my feature"
- Push your changes to your fork:
git push origin feature/my-feature
- Create a Pull Request to the main repository.