This page is used to manage your magic decks and find new decks and cards
Home page, Decks search page, Cards search page, Personal page, Deck info page, Card info page, Call to Magic's API for the cards info User and Deck Model CRUD + authentication and authorization Resposive page
Cards market, Events (tournaments...), Basic version of the game
https://wireframepro.mockflow.com/view/Ma9f049c5e2ef4f1452e77725e0e4fb091602166447826https://api.magicthegathering.io
project2/
|── bin
| |── seeds.js
| └── www
|── models
| |── Card.js
| |── Deck.js
| └── User.js
|── public
| |── images
| | |── favicon.ico
| | └── wireframe.png
| └── stylesheets
| └── style.css
|── routes
| |── auth.js
| |── deck.js
| |── index.js
| |── search.js
| └── user.js
|── views
| |── auth
| | |── login.hbs
| | └── signup.hbs
| |── search
| | |── card.hbs
| | └── deck.hbs
| |── cardInfo.hbs
| |── deckInfo.hbs
| |── error.hbs
| |── index.hbs
| |── layout.hbs
| └── profile.hbs
|── .gitignore
|── app.js
|── package-lock.json
|── package.json
README.md
\
MethodRouteDescriptionRequest - BodyGET/Main page route. Renders home index view.GET/loginRenders login form view.POST/loginSends Login form data to the server.{ username, password }GET/signupRenders signup form view.POST/signupSends SignUp info to the server and creates user in the DB.{ name, email, password }GET/randomRenders to the random card pageGET/userPriv route. Renders user view and list projects and cardsGET/project/create/Priv route. Renders create projects form.POST/project/create/:_idPriv route. Sends new projects info to server, updates DB.{ projectname, description}GET/project/edit/Priv route. Renders edit projects form.PUT/project/edit/:_idPriv route. Sends edit projects info to server, updates DB.{ projectname, description }POST/card/create/Priv route. Sends new cards info to server, updates DB.{ description }GET/card/create/Priv route. Renders create cards form.DELETE/projectsPriv route. Deletes user project from DB.DELETE/cardsPriv route. Deletes user card from DB.GET/logoutPriv route. Destroy current session. Renders home index view.
User model
{
username: {type: String, require: true},
email: {type: String, require: true},
password: {type: String, require: true},
decksId: { type: [String]},
userCards: {type: [{cardId: String, count: Number}]},
profileImg: {type: String, default: 'images/defaultAvatar.png'}
}
Deck model
{
name: {type: String, require: true},
authorId: {type: String, require: true},
mainCards: {type: [{cardId: String, count: Number}], require: true},
sideboard: {type: [{cardId: String, count: Number}], require: true},
likes: {type: [String]}
}\
GitHub https://github.com/xcaparros89/Project2
Heroku ...
Trello https://trello.com/invite/b/QA7dhTFu/48c335959060ca3fd50a64b7a025937d/m2-proyecto