pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/jouwdan/hpapi

GitHub - jouwdan/hpapi: HPAPI is an Fastify API which queries a Supabase database, providing information about the Harry Potter universe: Characters, Movies, Books, Spells and Potions.
Skip to content
/ hpapi Public

HPAPI is an Fastify API which queries a Supabase database, providing information about the Harry Potter universe: Characters, Movies, Books, Spells and Potions.

License

Notifications You must be signed in to change notification settings

jouwdan/hpapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

103 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HPAPI - Harry Potter API

Welcome to the Monorepo of the Harry Potter API. This repo houses the API itself, the data used and an example Frontend.

The API itself uses Fastify and queries a Supabase database. It provides information about the Harry Potter universe: Characters, Movies, Books, Spells and Potions.

The data is taken from the danielschuster-muc/potter-db repo, converted to csv using this python script and imported to Supabase.

The frontend is a React app that uses Vite, react-router for routing, React Query to fetch data from the API and display it, and Chakra UI for the interface.

Usage

The API is deployed on Render and can be publically accessed and used at https://hpapi.onrender.com/. RLS has been enabled on Supabase to allow anyone to read the data.

The frontend is also deployed on Render and can be accessed at https://hpapi-web.onrender.com/.

Development

If you would like to work on this, you will need to set up the data on your own Supabase instance. You can do this by following these steps:

  1. Clone this repo
  2. Create a new Supabase project
  3. Create a new table for each csv file in the data folder
  4. Import the csv files into the tables
  5. Create a new .env file in the packages/api folder of the project and add the following variables:
    • SUPABASE_URL - The URL of your Supabase project
    • SUPABASE_KEY - The public key of your Supabase project
  6. Run npm install to install the dependencies
  7. Run cd packages/api && npm run dev to start the API development server
  8. The development server should now be running on localhost:3000

To work on the frontend, simply run cd packages/web && npm run dev to start the development server. The frontend should now be running on localhost:5173.

Support

If you need any support feel free to open a GitHub issue or ask your question on GitHub Discussions.

Authors & Contributors

This repository was set up by Jordan Harrison.

For a full list of all authors and contributors, see the contributors page.

License

This project is licensed under the MIT license.

See LICENSE for more information.

About

HPAPI is an Fastify API which queries a Supabase database, providing information about the Harry Potter universe: Characters, Movies, Books, Spells and Potions.

Topics

Resources

License

Stars

Watchers

Forks

Languages

pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy