Code Monkey home page Code Monkey logo

waitlist's Introduction

The Ditanian Fleet Waitlist

The official incursion waitlist for The Ditanian Fleet, Eve Online's premier armour HQ incursion community. Features include ESI fleet invites, skill checking, fit checking, a doctrine page, and community guides.

Contributing

Report bugs by opening a GitHub issue, or send a message to a TDF HQ FC. Security issues should be reported to an FC directly.

If you have a change you would like to implement, have a talk with the FC team first. After we've had a chat, if you choose to go ahead, please develop your code on your own fork.

Once your feature is ready, check that everything still works. Ensure that the UI and server still compile and interact with the components of the website that you've changed, to make sure they work as expected, then you can open a pull request.

Pull requests should include:

  • A short title that describes the change (e.g., Added readme /w installation instructions)
  • An optional description that provides more context (if applicable), including any mandatory actions that other developers will need to undertake (e.g., Drop and recreate the Announcments table. The sql/sqllite.sql file has been updated to include the new schema).

We will review your pull request and let you know what happens.

๐Ÿ‘๐ŸŽ‰ Thanks for taking the time to contribute! ๐ŸŽ‰๐Ÿ‘

Development Setup

We recommend you use WSL for development as it simplifies working with the backend code. This readme is written using Ubuntu but it should cover the basics for most Linux distros, if you haven't got WSL setup see Installing WSL | Microsoft Docs.

Visual Studio Code users can use the plugin Remote - WSL to edit code inside of WSL from their native windows VS Code install.

1. Required Software:

Check that nodejs, npm, sqlite3, and cargo are installed on your system:

sudo apt install nodejs npm sqlite3 cargo
2. Register an ESI Application

Register an Eve Swagger API application at https://developers.eveonline.com with an eligible player account.

Setting Value
Callback URL https://<domain>.<tld>/auth/cb
Scopes esi-skills.read_skills.v1 esi-fleets.read_fleet.v1 esi-fleets.write_fleet.v1 esi-ui.open_window.v1 esi-clones.read_implants.v1

* Valid account: You will need to agree to the Developer License Agreement. Your account must have a valid credit card that has been used to pay for at least one month of Omega.

** Never share your secret key, commit it to a repo, or make it public!

3. Setup Waitlist Services

The Waitlist has three services (see below). Before starting the front end, both the back end and SSE server should be running.

Service Name Language Purpose
backend/ Rust Handles business logic, ESI and database calls, and provides an API for the front end.
frontend/ JavaScript (React) Provides a UI that consumes the API provided by the backend.
the-ditanian-fleet/sse-server Rust A service that broadcasts server driven events to UI clients
Setup and run the SSE Server
  1. Clone the repo the-ditanian-fleet/sse-server
  2. Build a Docker image
  3. Generate a secret key using openssl rand -hex 32 and copy it somewhere safe. This key is needed to start the SSE server and the backend process
  4. Start the docker image. You must pass the secret key from step three as an environment variable called SSE_SECRET
CLI Prompts
git clone https://github.com/the-ditanian-fleet/sse-server
docker build . -t tdf/sse
openssl rand -hex 32
docker run --env SSE_SECRET=<secret> tdf/sse
Setup and run the Backend
  1. Navigate to the backend/ directory
  2. Create a config.toml file and populate the environment variables:
    • Use openssl rand -hex 32 to generate a new app token_secret
    • ESI client_id and client_secret values come from step 2
    • SSE secret should be the same as the SSE_SECRET used when launching the SSE server
  3. Run the shrink-sde.sh script
  4. Create a sqlite database called waitlist.sqlite
  5. Copy the SQL queries from sql/sqlite.sql into the sqlite3 terminal and execute them
  6. Set environment variables using export: DATABASE_ENGINE=sqlite and DATABASE_URL=${DATABASE_ENGINE}:./waitlist.sqlite
  7. Compile the code using cargo build --release --no-default-features --features=${DATABASE_ENGINE}
  8. Run the server
  9. Click on login and complete the SSO workflow with at least one character
  10. Insert a record in the Admins table to give yourself council permissions
  11. Navigate to the Fleet page and "ESI re-auth as FC"
CLI Prompts
# Setup app (steps 1-3)
cd backend/
cp config.example.toml config.toml & nano config.toml
sh shrink-sde.sh

# Setup Database (step 4-5)
sqlite3 waitlist.sqlite
.database
## Copy the SQL queries from `sql/sqlite.sql` here and press Enter
## Quit the shell using Ctrl+D

# Start backend (step 6-8)
export DATABASE_ENGINE=sqlite
export DATABASE_URL=sqlite:./waitlist.sqlite
cargo build --release --no-default-features --features=sqlite
cargo run

# Final things (step 9-11)
sqlite3 waitlist.sqlite
INSERT INTO Admins (<character_id>, 'council');
## Quit the shell using Ctrl+D
npm run start
Setup and run front end
  1. Navigate to the frontend/ directory
  2. Install NPM dependencies
  3. Build the React Code
  4. Start the server
CLI Prompts
cd frontend/
npm install
npm run build
npm run start

waitlist's People

Contributors

tvdw avatar testkil avatar fc-austar avatar luna-duclos avatar kimnnmadsen avatar mahriel avatar adoeditor avatar akenny03 avatar lyari-elatha avatar samuelgrant avatar gregslomin avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.