Skip to content

Commit

Permalink
updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
andrenormanlang committed Aug 28, 2024
1 parent b4b497e commit 7feecdb
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 11 deletions.
88 changes: 77 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ This project is a RESTful API for managing a Thot Tarot card database. It's buil
- Fetch a single tarot card by ID 🃏
- Add a new tarot card ➕
- Bulk insert multiple tarot cards 📥
- Update tarot card details ✏️
- Delete a tarot card 🗑️

## Prerequisites 📋

Expand Down Expand Up @@ -57,15 +59,26 @@ The server should now be running on `http://localhost:3000`. 🎉
The `thot_tarot` table has the following structure:

- `id`: Serial (Primary Key)
- `image_url`: VARCHAR(500)
- `name`: VARCHAR(255)
- `description`: VARCHAR(1000)
- `long_description`: VARCHAR(1000)
- `astrology`: JSONB
- `element`: VARCHAR(50)
- `number`: Serial
- `meanings`: JSONB
- `advice`: VARCHAR(500)
- `question`: VARCHAR(500)
- `confirmation`: VARCHAR(500)
- `drive`: JSONB
- `keywords`: JSONB
- `revelation`: VARCHAR(500)
- `ruling_planet`: VARCHAR(50)
- `transitional_phase`: VARCHAR(50)
- `attributes`: JSONB
- `light_meanings`: JSONB
- `shadow_meanings`: JSONB
- `reversed_meaning`: VARCHAR(500)

## API Endpoints 🛣️

Expand All @@ -81,19 +94,72 @@ Fetches a single tarot card by ID.

Adds a new tarot card.

Request body example:

```json
{
"name": "The Fool",
"description": "The Fool represents new beginnings, faith in the future, innocence, spontaneity, and a free spirit.",
"number_meaning": "0 as nothing and begin of it all",
"short_description": "The Fool is usually depicted as a beggar or a vagabond, wearing ragged clothes & stockings without shoes, and carries a stick on his back. He symbolizes true innocence, a perfect state of joy and freedom, the sure feeling to be one with the spirit of life at any time.",
"long_description": "The Fool is the symbol of true innocence, a perfect state of joy and freedom, the sure feeling to be one with the spirit of life, at any time.The Fool has the number 0, for someone ready to go in any direction, open to all possibilities. He belongs nowhere, has no past, but an infinite future. Every moment is a new beginning. In Arabic letters the 0 has the shape of an egg, the symbol for the origin of life. The Fool is change, motion and the readiness to jump into life, with no cares ever. The Fool knows no difference between possibility and reality, the zero means a total lack of hope and fear, the Fool suspects and plans nothing. He reacts directly to the current situation, nothing is calculated, nothing is hidden.In most decks the Fool is shown with an animal, as a symbol of nature, the animal soul in perfect harmony with the spirit that just follows its instincts. The Fool is courage, optimism and the belief in life and himself. When times are hard, and we suffer the pressure of ‘being reasonable’ or denying our instincts, the Fool reminds us that our inner person knows best what to do.In its negative aspect, the card can say that its qualities are blocked or reversed. Irresponsibility, mad projects, recklessness – the careless human who covers himself with some artificial madness, for distrusting his instincts and fearing standstill and silence.Always trust your instincts",
"image_url": "https://res.cloudinary.com/dytiufsuu/image/upload/v1724869722/thot_tarot/00-The_Fool_fkip0b.jpg",
"ruling_planet": "Uranus",
"transitional_phase": "Pisces to Aries",
"attributes": ["curiosity", "spontaneity", "adventure"]
"attributes": [
"curiosity",
"spontaneity",
"madness"
],
"element": "Air",
"light_meanings": [
"the positive break up of structures and limitations",
"selfless idealism",
"endless fantasy",
"optimism",
"trust to instincts",
"beginnings",
"innocence"
],
"shadow_meanings": [
"the negative loss of structures",
"useless daydreaming",
"infantility"
],
"reversed_meaning": "The Fool Reversed can show that you are taking too many risks and acting recklessly. In your attempt to live ‘in the moment’ and be spontaneous and adventurous, you may do so in total disregard of the consequences of your actions and engaging in activities that put both yourself and others at risk. Look at the bigger picture and consider how you can keep the free spirit of The Fool without harming others.",
"advice": "You are ready for a new start, perhaps for a quality change. Let yourself go, take a break even if fear tries to hold you back again and again. Trust the voice of your heart.",
"question": "What do you have to do to get rid of it? What is the role of the 'tiger of fear' in your life? How do you imagine the bold jump into something new? Where’s your heart calling?",
"confirmation": "Now I’m following my heart’s suggestions. I’m open and I’m going wherever you may lead me.",
"drive": [
"changes",
"movement",
"the innocence of a child",
"spontaneity",
"free spirit",
"]"
],
"keywords": [
"openess",
"trust",
"risk-taking",
"loyalty to ourselves",
"freedom",
"independence",
"creativity",
"performance",
"leapfrogging",
"follow-up of the heart"
],
"revelation": ""
}
```

### POST /cards/bulk
## PUT /cards/

Updates an existing tarot card.

## DELETE /cards/

Deletes a tarot card.

## POST /cards/bulk

Bulk inserts multiple tarot cards.

Expand All @@ -106,18 +172,22 @@ Request body example:
"description": "...",
"ruling_planet": "Uranus",
"transitional_phase": "Pisces to Aries",
"attributes": ["curiosity", "spontaneity", "adventure"]
"attributes": ["curiosity", "spontaneity", "adventure"],
"...."
},
{
"name": "The Magician",
"description": "...",
"ruling_planet": "Mercury",
"transitional_phase": "Aries to Taurus",
"attributes": ["manifestation", "resourcefulness", "power"]
"attributes": ["manifestation", "resourcefulness", "power"],
"...."
}
]
```

Request body example:

## Error Handling ⚠️

The API uses standard HTTP status codes for error responses:
Expand All @@ -131,7 +201,3 @@ Error responses will include a JSON body with a `message` field describing the e
## Contributing 🤝

Contributions are welcome! Please feel free to submit a Pull Request.

## License 📄

This project is licensed under the MIT License.
Empty file added correction.txt
Empty file.
4 changes: 4 additions & 0 deletions src/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,7 @@ export const tarotCards = pgTable('thot_tarot', {
keywords: text('keywords').array(),
revelation: text('revelation'),
});




0 comments on commit 7feecdb

Please sign in to comment.