Skip to content

DraconMarius/chaos-tarot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

84 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chaos-Tarot

logo

License: MIT

Known bugs/todo:
  • Ability to edit/make notes on the resulting reading log

  • Apollo Server 429 if too many request / occasional cors error

  • added frame switch

  • OpenAI API returning non-valid JSON / Parsing Error

    4/19/23: JSON error should mostly be fixed. please create an issue if error persist

  • API returning upright meaning even though card is inverted

  • loading screen won't stop until reload if error in generation

    4/24/23: improved loading screen and error message added ability to chage upright preference under profile

    • still need positive feednack when sucessfully saved, currently null response
  • add ability to ask question for more specific reading

    4/25/23: added ability to ask questions

  • working on updating to newer gpt model, previous model deprecated

Description

Always interested in Tarot, but never able to brute force memorize what they all mean? Wanting some general advice that the card means for you? Since Tarot is all about symbolism as well, what about some AI generated Cards to compliment the reading?!

As always, TAKE WHAT RESONATES ;)


Chaos-Tarot / GPT Tarot is here for your entertainment. Started from an ios shortcut that I had built by chucking tarot data in a dictionary and ask it to choose one so I can save it someplace using note taking app (I was using Bear, an ios markdown app).


This MERN Application utilizes the OpenAI API endpoints along with MaterialUI, Apollo graphQL Server, and MongoDB to create an AI generated reading and image and store it in a database.

Click here for a link to the deployed app!

please note that this is hosted on a heroku eco server, it goes idle often. Appreciate your patience when loading up the demo

if you are interested in a more efficient workflow and do not need a generated card image, feel free to check out my ios shortcut ObsidianTarot that saves a reading (including a 3card spread option) as markdown to a file in your obsidian vault. This includes a 3 card spread option

demo.gif

Sample Readings and Cards:

sampleReadingsampleReading1

sampleReading2sampleReading4

sampleCardsampleCard1

sampleCard2sampleCard3

sampleCard4sampleCard5

Usage

Head over to the deployed demo to try it out!

Or if you want to host it locally:

To run a developmental server of this application, please clone this repo to your local Machine.

make sure you create a .env file at the root of the directory with OPENAI_API_KEY and REACT_APP_API_KEY set up with your OPEN API key!

First, download the dependencies by running

npm install

which will install all the packages and dependencies for both the Server and Client folder.

Next to initiate a fresh instance of our MongoDB database, run

npm run seed

Finally, run

npm run develop

to initiate our development back and front end!

Features

Reading Generation

Logged in user can generate a reading with a press of a button, as well as a drop down menu to customize what kind of reading you would like. If a user select an option other than daily a text box will be available for you to ask a question too. Update you can now choose a color for the frames as well.

loading-demo.gif

Create new art

Once the button is pressed, a loading screen pops up. Keep in mind that since we are making multiple api calls, it might take a little bit! (The loading text will now change slightly depends on progess)

card-demo.gif

Once the whole process is finished, a card image and a reading log will display right on the page.

you can also hover over the card's name to get a description of the prompt that was used to generate the card!

License

Licensed under the MIT license. License details here

Built With

JavaScript React MongoDB React Router Apollo-GraphQL Express.js NodeJS Heroku HTML5 MUI OpenAI Animated Icon by Lordicon

Highlight

Code snippet for deciding which tarot card is chosen:

codeSnippetSample

Snippet4

Snippet2

Snippet3 Snipet4

Code snippet for back end text completion:

completionSnippet

Code snippet for front end image edit end point using b64 input/mask. after that the resulting b64 is uploaded directly to cloudinary:

imageeditSnippet

Author

Mari Ma

github linkedin

Icon credit @ Anton Kalashnyk

Contributing Guidlines

If you would like to contribute to this app, please get in touch and would love to discuss further.

Questions

For any questions, please reach out directly or by creating an issue.