Welcome to Elite Craft TCG, your ultimate Trading Card Game hub dedicated to Pokemon enthusiasts! Dive into the exciting world of trading cards, where you can explore card lists from both current and past booster packs. But there's more to it than just exploring.
Take your TCG skills to the next level by crafting your very own decks, by combining cards that synergize to perfection. Share your creative decks with the community and discover decks curated by other users!
Exciting Upcoming Features: Version 2.0: Engage with your favorite decks through comments and likes. Get better by hearing feedback from the community, and crafting decks to defeat the meta.
Here's a live link to Elite Craft TCG: Live Link - NO LONGER LIVE
Want to see how it works by deploying it locally? Here's what you'll need to do:
Fork or Clone the repository: Start by copying the project's GitHub repository link and run the following command:
git clone https://github.com/andrewsegovia00/EliteCraftTCG.git
Install Dependencies: Navigate to the project directory and install the required dependencies by running the following command:
npm install
Set up Environment Variables: Create a .env file in the root directory of the project and set the following environment variables:
SECRET=your_secret_key
MONGODB_URI=your_mongodb_uri
Start the Server: Once the dependencies and environment variables are set up, start the server with the following command:
npm run dev
Access the Application: Elite Craft TCG should now be running on http://localhost:5173/. Open your web browser and visit this URL to access the application.
Sign up and Get Started!
(async function () {
try {
const sets = await pokemon.set.all({ q: 'id:dp' });
for (const set of sets) {
const createdSet = await Set.create({
name: set.name,
set_id: set.id,
imageUrl: set.images.logo,
totalCards: set.total,
legality: {
standard: set.legalities.standard ? 'Legal' : '',
expanded: set.legalities.expanded ? 'Legal' : '',
unlimited: set.legalities.unlimited ? 'Legal' : '',
},
cards: [],
});
for (let j = 0; j < set.total; j++) {
const cardData = await pokemon.card.find(`${set.id}-${j + 1}`);
const createdCard = await Card.create({
name: cardData.name ? cardData.name : 'unknown',
imageUrl: cardData.images.large ? cardData.images.large : 'unknown',
number: cardData.number ? cardData.number : 'unknown',
set: set.name ? set.name : 'unknown',
typeImg: cardData.types ? cardData.types : 'unknown',
legality: {
standard: cardData.standard ? 'Legal' : '',
expanded: cardData.expanded ? 'Legal' : '',
unlimited: cardData.unlimited ? 'Legal' : '',
},
set_id: set._id,
});
This code snippet displays a seeding document used to fill our db with pokemon cards from the quered set. Thanks to this IIFE we're able to call the Pokemon API and await for the booster sets that match our query. Since there are multiple sets with the same 'generation' in this case 'dp' being 'Diamond and Pearl' We're able to also create cards with the same function. Although it's a loop within a loop, we're able to create sets and cards at the same time. Shortening the seeding time.
- User is able to see what percentage of their deck is Trainer, Energy, or Pokemon cards.
- Users are able to leave comments and like none-user-owned decks
- Add the older Sets before Sword and Shield
- Add search bar and filters to search for cards without the need of a set