
Arcane Archive - Magic: The Gathering companion application
Introduction
Arcane Archive is a Magic: The Gathering (MTG) companion application designed to help players manage their card collections, build decks, and track game stats. The application provides a user-friendly interface for organizing cards, searching for specific cards or sets, and keeping track of mana and life points during gameplay. Arcane Archive aims to enhance the overall MTG experience by offering essential tools and features that cater to both casual and competitive players.
Installation
To install the Arcane Archive application, follow these steps:
- Clone the repository from GitHub:
- Install the required dependencies:
- Start the development server:
- Open http://localhost:3000 in your browser to view the application.
- To run tests, use the following command:
Storybook Installation
npx storybook@latest init
- To start Storybook, use the following command:
- Open http://localhost:6006 in your browser to view the Storybook interface.
- To build a production version of Storybook, use the following command:
Scope
This report will cover an in-depth analysis and documentation of the Arcane Archive application. It will define the purpose, features, tools & technologies, and development process of the application.
The report will include:
Objectives
Arcane Archive aims to simplify card management and enhance players overall game experience. Whether for casual play or competitive matches, the app serves as an indispensable tool for any MTG enthusiast. The main objectives of Arcane Archive are:
To provide MTG players and enthusiasts with a feature rich personal library for managing their card collection, including library organization and set management.
To offer a powerful user-friendly search feature that allows users to easily find specific cards or sets.
To include essential tools such as a mana counter and life counter for gameplay tracking.
To support multiple devices and platforms, ensuring an optimal experience across web and mobile.
Target Audience
The primary users of the Arcane Archive application include:
- Magic: The Gathering players: Both casual and competitive, who want to manage and organize their cards
- Age Range 8+: The application is designed to be accessible and enjoyable for users of all ages, from children to adults. It provides a safe and engaging environment where younger users can explore Magic: The Gathering concepts in a controlled and educational setting, while older users can dive deeper into collection management and competitive play.
Overview
Arcane Archive is feature rich application designed for Magic: The Gathering (MTG) enthusiasts. The app aims to enhance player experiences by providing tools and features that help players streamline their card management. Users can login, create detailed profiles, search scryfall API for cards and sets, and manage their personal card libraries, including the ability to add, delete, and categorize cards and sets.
Feature Roadmap
- Creating an Account: A user can create their own account
- Login / Logout Functionality: A user will be able to login and logout
- User Profiles: Each user has a personalized profile that showcases their collection, deck-building history, and game stats
- Personal Library Management: Users can easily add and delete cards, organize them into sets, and search their library efficiently. This feature allows users to keep track of their selection and plan their decks easily.
- Card Search: A robust card search, powered by Scryfall API, that enables users to quickly find specific cards by name or partial name.
- Mana & Life Counters: These counters help track mana available to spend and life points throughout the game.
- Community Features: The app fosters a sense of community among MTG players by enabling them to interact through discussion forums, share decks, and offer tips and strategies.
- IDEs/Editors/Debuggers
- IntelliJ IDEA
- PyCharm
- Postman
- Frameworks
- Languages
- Package Managers
- Npm
- Pip
- Poetry
- Virtualenv
- Version Control / Continuous Integration / Continuous Deployment
- Git / GitHub
- GitHub Actions
- Test Frameworks
- Frontend
- Jest
- Cypress
- End-to-end testing
- Component testing
- Babel
- For testing older browsers
- Backend
- Software Libraries
- Frontend
- React
- Form Handling
- Styling
- Backend
- Database Libraries
- SQLAlchemy
- Psycopg2 for PostgreSQL Database
- Authentication & Authorization
- Data Validation
- API Documentation
- Deployment
- Security
- Development Tools
- Database
Design Decisions
User Interface
The user interface design for Arcane Archive aims to provide an intuitive user-friendly experience for Magic: The Gathering players and enthusiasts.
Key Design Choices
Layout
- Main Page - The main page (first page the user sees) includes a header, background image, and access to the card search and mana & life counters without creating a profile.
- Dashboard - A player’s main dashboard displays a summary of the user’s profile, recent activity, and quick access to a card library, sets, search, mana counter, and life counter.
- Library Management - The card library section uses a grid layout to display cards, with sorting options available to help player’s find what they are looking for. This section also includes buttons to add or delete cards from the library
- Card Details: When viewing a card, users can see detailed information including name, card image, set name, prices, colors, rarity, mana cost, legalities, loyalty, collector_number, scryfall uri, and type, etc.
python
def as_dict(self):
return {
"id": self.id,
"name": self.name,
"image_uris": self.image_uris,
"set_name": self.set_name,
"rarity": self.rarity,
"mana_cost": self.mana_cost,
"prices": self.prices,
"colors": self.colors,
"artist": self.artist,
"flavor_text": self.flavor_text,
"legalities": self.legalities,
"loyalty": self.loyalty,
"collector_number": self.collector_number,
"scryfall_uri": self.scryfall_uri,
"type_line": self.type_line
}`
user_accounts
Stores user information including username, hashed password, email, age, and whether the user is active.
- user_id: Integer, Primary Key (PK), Not Null, Unique, Auto Increment
- username: VARCHAR(50), Not Null
- hashed_password: VARCHAR(50), Not Null
- email: VARCHAR(255), Nullable
- age: Integer, Nullable
- is_active: Boolean, Not Null (Indicates whether the user is currently active)
user_login_history
Stores user_id from user_accounts table, login_timestamp, ip_address, successful, failure_reason
- login_id: Integer, Primary Key (PK), Not Null, Unique, Auto Increment
- user_id: Integer, Foreign Key (FK), Not Null (Links to user_accounts)
- login_timestamp: TIMESTAMP, Not Null
- ip_address: VARCHAR(50), Nullable
- successful: Boolean, Not Null
- failure_reason: VARCHAR(255), Nullable
- Relationship: One-to-many (1:M) relationship between user_accounts and user_login_history. Each user can have multiple login attempts recorded.
user_library
Stores a library_id, user_id, card_id, set_id
- library_id: Integer, Primary Key, Not Null, Unique, Auto Increment
- user_id: Integer, Foreign Key (FK), Not Null (Links to User Accounts)
- card_id: Integer, Foreign Key (FK), Not Null (Links to Cards)
- set_id: Integer, Foreign Key (FK), Not Null (Links to Sets)
- Relationship: One-to-many (1:M) relationship between User Accounts and Library. Each user can have one library containing multiple cards and sets.
cards
Stores card_id, card_name, set_name, price, colors, rarity, legalities, loyalty, collector_number, scryfall_uri, card_type, mana_cost, set_id
- card_id: Integer, Primary Key (PK), Not Null, Unique, Auto Increment
- set_id: Integer, Foreign Key (FK), Not Null (Links to sets)
- card_name: VARCHAR(255), Not Null
- set_name: VARCHAR(255), Not Null
- price: INT, Nullable
- colors: VARCHAR(50), Nullable
- rarity: VARCHAR(50), Nullable
- legalities: VARCHAR(255), Nullable
- collector_number: INT, Nullable
- scryfall_uri: VARCHAR(255), Nullable
- mana_cost: VARCHAR(50), Not Null
- card_type: VARCHAR(50), Not Null
- Relationship: One-to-many (1:M) between cards and sets. Each card belongs to one set, and each set can have multiple cards.
sets
Stores set_id, set_name, release_date, set_code
- set_id: Integer, Primary Key (PK), Not Null, Unique, Auto Increment
- set_name: VARCHAR(255), Not Null
- release_date: DATE
- set_code: VARCHAR(50), Not Null
- Relationship: Many-to-many (M:M) relationship between library and sets. A library entry can belong to multiple sets.
event_history
Stores event_id, user_id, event_type, timestamp to show user history when adding and deleting cards and sets.
- event_id: Integer, Primary Key (PK), Not Null, Unique, Auto Increment
- user_id: Integer, Foreign Key (FK), Not Null (Links to user_accounts)
- event_type: VARCHAR(50), Not Null (example: won a game with a particular set, added a card, deleted a card, added a set, deleted a set)
- timestamp: TIMESTAMP, Not Null
- Relationship: A one-to-many (1:M) relationship between user_accounts and event_history. Each user can have multiple events recorded.
ER Diagrams/Schema Diagrams
Data Storage
- Data is stored in PostgreSQL, a robust and scalable relational database management system that provides powerful querying capabilities.
- The database stores user data, card details, set information, and library configurations. Access is controlled using user authentication and authorization.
Challenges
Future Enhancements
UI / UX Design
Evaluation and Feedback
## User Testing
## Feedback Analysis
## Improvements ## Conclusion ## References 1. https://scryfall.com/docs/api