This page is used to manage your magic decks and find new decks and cards
Uses Handlebards, CSS, Bootstrap, JS, JQuery, responsive design, express, mongoDB, cloudinary
https://mtg-organizer-deck-builder.herokuapp.com/
Write in the console:
- npm i
- npm start
- Runs in the localhost 3000
Home page Decks search page Cards search page Personal page Deck info page Card info page
Cards market, Events (tournaments...), Basic version of the game
https://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]}
}\