This is a combined project for both my DWDD 3770 final and my OOP CS 1410 Final. I used Sveltekit to design my frontend UI
and Python to create a custom CRUD API to store my characters. Im using KindeAuth for authenticating users and OPENAI API
for my chatbot functionality.
Frontend Vercel Link
BackendVercel Link
Character Class
– This is the base class for the rest of the character_role classes to inherit.
Character Role Class
– This is the class that defines the users character role.
Style Class
– This is the class that defines the characters style.
Armor Class
– This is the class that defines the armor the character wears.
Weapon Class
– This is the class that defines the characters weapon.
Inheritance
– My character_role Classes inherit from my Character Class
Ignore Generate PDF Button, latest python code for the server isn't building with Vercel. This is only for my Python Final. Only works when the project is run locally.
These are examples of the concepts taught in class that I have implemented in my project
<img class="w-full px-4" src={imageURL} alt={altText}>
<div class="flex my-4">
<Avatar class="h-12 shrink-0" src="/images/chat-bot.png" alt="Tutor" width="" />
<div in:fly={{y:50, duration:1000}} class="assistant-chat mx-4">{@html chat.content}</div>
</div>
$: selectedGender = $characterStore.style?.gender as number;
$: imageUrl = displayImage(selectedGender, $characterStore.style?.style, $characterStore.style?.color);
let classSelect = ''
function showClassSelect() {
console.log("clicked")
showOverlay = false
classSelect = `You've selected ${classArray[id]}`;
}
Characters Example
{#each characters as character (character)}
<div animate:flip={{duration:600}}>
<CharacterCard {character} on:delete={removeCharacter}/>
</div>
{/each}
async function getWoWClasses() {
const classesResponse = await fetch('/api/wow/classes');
return await classesResponse.json();
}
(In addition to the events listed below for final requirements)
<div class="m-2 h-20 w-20" role="button" tabindex="0" on:mouseenter={() => displayArmorStats(armor.id)}
on:mouseleave={hideArmorStats}>
<img class="h-20 w-20 object-contain" src={`/images/armor/armor-${armor.id}.jpg` alt="armor">
</div>
<ProgressBar height="h-2" bind:value={$progress} max={100} meter="bg-buttonText" track="bg-white"/>
AuthButton Component
BackButton Component
ContinueButton Component
CharacterCard Component
ChatBotComponent
ClassIcon Component
Gender Component
HairSelection Component
SubmitCharacterBtn Component
NameCharacter Component
ProgressBar Component
SelectedArmor Component
AuthButton Component
BackButton Component
ContinueButton Component
After cloning this repository, to run it locally you will need to run the following commands in the terminal.
\.venv\Scripts\activate
source .venv/bin/activate
pip install -r requirements.txt
pip list
fastapi dev main.py
npm install
npm run dev