Skip to content

alexandlazaris/FFVII-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

151 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FFVII-API

Release Unit tests unit_tests_coverage tests_number

Ever wanted to play FF7 ... one of the greatest games of all time ... as a REST API?!

Warning

This API is still in development. You have been warned.

current game features

GET /saves
[
  {
    "id": "1400602a-516f-449c-84f6-b22c9a0d28e3",
    "location": "mideel",
    "party": [
      "Cloud",
      "Cid",
      "Cait Sith"
    ],
    "party_lead": {
      "level": 77,
      "name": "Cloud"
    }
  }
]
  • create & manage your party of up to 3 characters
  • create & manage your save files, storing key info on your party & location
  • read tips and info on bosses
  • assign materia to party members > unfortunately this is WIP, as it was impacted by recent changes
  • read all in-game materia, filtering by type (e.g magic), element (e.g fire) and sort (asc/desc)

coming soon

  • full in-game enemy details
  • improved db relationships between Party members, Materia & Save States
  • wild encounters to fight enemies and gain XP/AP/Gil
  • link party members with materia, equipment
  • display party member stats

Note

If you have any ideas or feedback, please create an Issue or start a Discussion. Cheers!

launch API in container

  1. run sh docker-local-container.sh to build and run a container (port 80)
  2. target 0.0.0.0:80 for any local tests and debugging
  3. open {url}:{port}/swagger-ui for api docs

launch API locally

Tip

Use a virtual python env to isolate your workspace.

  1. python3 -m venv .venv (or rename .venv to whatever you like)
  2. source .venv/bin/activate
  3. pip install -r requirements
  4. run sh migrations-run-local.sh to prep your db
  5. start server using gunicorn --bind 0.0.0.0:7777 "app:create_app()"
  6. jump to localhost:80/swagger-ui for api docs

tests

unit

From ./:

  1. run coverage run -m pytest
  2. run coverage html
  3. open htmlcov/index.html to view report

Tip

To print logs within unit tests, append -s to the coverage command in step 1 above. Useful when debugging unit tests.

tech stack

About

Recreate the FF7 experience using a REST API

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages