A Next.js application that displays Harry Potter characters, spells, books, and houses data from the Potter API.
- Characters: Browse wizards, witches, and magical creatures
- Spells: Explore magical spells and their uses
- Books: View the complete Harry Potter book series
- Houses: Learn about the four Hogwarts houses
- Admin Panel: Fetch and update data from the Potter API
- Node.js 18+
- npm or yarn
- Supabase account (for database functionality)
- Clone the repository:
git clone https://github.com/toby044/relo.git
cd relo- Install dependencies:
npm install- Create environment file:
cp .env.example .env.local- Update
.env.localwith your Supabase credentials:
VITE_SUPABASE_URL=https://your-project.supabase.co
VITE_SUPABASE_PUBLISHABLE_KEY=your-anon-public-key- Run the development server:
npm run dev- Open http://localhost:3000 in your browser.
- Create a new project at supabase.com
- Get your project URL and anon public key from Settings > API
- The application will automatically create the required tables when you first use the admin panel
The application creates the following tables in Supabase:
- characters: fullName, nickname, hogwartsHouse, interpretedBy, children, image, birthdate
- spells: spell, use
- books: title, originalTitle, releaseDate, description, pages, cover
- houses: house, emoji, founder, colors, animal
- Admin Panel: Visit
/adminto fetch the latest data from the Potter API - Browse Data: Navigate through Characters, Spells, Books, and Houses pages
- Automatic Setup: Tables are created automatically on first data fetch
- Framework: Next.js 15.5.2
- Database: Supabase
- Styling: Tailwind CSS
- Language: TypeScript
- Linting: Biome
Data is fetched from the Potter API:
- Characters:
/en/characters - Spells:
/en/spells - Books:
/en/books - Houses:
/en/houses
The application can be deployed to any platform that supports Next.js:
Make sure to set your environment variables in your deployment platform.
- Fork the repository
- Create a feature branch
- Make your changes
- Run the linter:
npm run lint - Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
- Potter API for providing the Harry Potter data
- Supabase for the database platform
- Next.js for the React framework