Coder Social home page Coder Social logo

mkmobile's Introduction

MagicCardMarket Mobile Client

Code Climate

The MagicCardMarket Mobile Client is an AngularJS 1.5 based mobile app, developed with CoffeeScript and SASS and built with Grunt.

Setup

Requirements

To be able to compile everything and host a local copy of this app, you need:

Compiling

You need to install the dependencies with Bower and Node first:

bower install
npm install

Afterwards, you can simply run grunt in order to compile the necessary development files and grunt watch to monitor them for changes. You should point your local webserver to the /src directory and use the index.html file there for development. The index.dist.html represents the version that will be used in production.

If you want to generate a new build, use grunt build in order to generate the static files needed for a deployment. The generated files will be located in /dist.

In order to create a new release, use grunt release.

Development

In order to be able to run a local development version of the app, you should point your webserver to src/ and sign up for a dedicated app on your MCM profile page. Once you have the API credentials, fill in your app token, app secret, access token and access secret in the appropriate vars of the index.html. You'll then be able to use the live API on your local development version of the app.

Note: this will log you in on the app with your real MCM account!

Folder structure

The project is split into 2 main folders, dist and src. For production, the web root should be dist, while for development, it should be src.

dist/           # the web root for production, contains all the necesssary files for a deployment
  img/          # all image assets are copied over to this folder for production deployment
  fonts/        # all font assets are copied over to this folder for production deployment
  
  app.js        # the compiled, concatenated and minified app code
  index.html    # the main index HTML, built from the index.dist.html
  lib.js        # all JS libraries are concatenated into this file
  styles.css    # the compiled and compressed styles are here
  
src/            # the web root for development, contains all the sources, libraries and assets
  css/          # contains the SCSS stylesheets and partials
  fonts/        # icon fonts are stored here
  img/          # all images and spritemaps are here, with sprite source files in separate subfolders
  js/           # the main app logic
    controllers/# controllers are here
    directives/ # directives are here
    services/   # since there are several services built on top of the API, they are in their own folder
  lib/          # all JS dependencies are here, once you run Bower (not checked into GitHub)
  partials/     # the HTML templates are here
    directives/ # small directive templates are here, for footer, search fields, etc.
    pages/      # bigger page templates are here
  translations/ # the translations are here in form of a JSON file per language
  
  .htaccess     # example .htaccess file for an Apache server
  index.dist.html # the HTML file template that will be used in dist/
  index.html    # the development HTML index file, that contains all the necessary script tags

URL Rewrite

The MKMobile App uses HTML5 URL States to allow navigation between different states of the app via browser buttons. In order for this to work, you need to allow URL Rewriting on your server. Any requests that doesn't match an actual file / folder should be redirected to the index.html. Here are some example rules for the most popular webservers.

  • Apache:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^ index.html [L]
  • nginx
location / {
  try_files $uri $uri/ /index.html =404;
}
  • Lighttpd
$HTTP["host"] == "mkmobile.local" {
    url.rewrite-if-not-file = ( "^.+" => "index.html")
}

mkmobile's People

Contributors

bra1n avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

mkmobile's Issues

App doesn't work in Safari Private Mode

Error: The quota has been exceeded.
setItem@[native code]
https://m.magiccardmarket.eu/app.js:11:19228
$digest@https://m.magiccardmarket.eu/lib.js:129:208
$apply@https://m.magiccardmarket.eu/lib.js:132:243
https://m.magiccardmarket.eu/lib.js:19:65
d@https://m.magiccardmarket.eu/lib.js:18:488
Xd@https://m.magiccardmarket.eu/lib.js:18:84
https://m.magiccardmarket.eu/lib.js:291:240
a@https://m.magiccardmarket.eu/lib.js:173:238
c@https://m.magiccardmarket.eu/lib.js:34:221

Todo: remove sessionStorage usage if unsupported.

Feedback guideline screen is sometimes not usable on iPhone

I'm unable to leave feedback for a sale from my iPhone because the feedback guideline screen that pops up is too large. I try to click ok I understand how feedback works but the page slides up automatically so I can't get past the stupid guideline page.

Evaluation Guidelines do not disappear

In the mobile website when I confirm a received order evaluation guidelines appear and there is no button to make them disappear making it impossible to evaluate. I am on Internet Explorer for windows phone 8.1

Login form

Please increase the login fields and button to min-width and min-height of 48px and add proper spacing. Thanks.

can't get into the website

i made an account but i cant get into the website because the button to send the activation code dont work when i click it can you help me with this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.