Coder Social home page Coder Social logo

lloydthinks / clash_tool Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 13.6 MB

This tool will begin as a attack strategy tool, but hopefully expand to more as I learn to use the full MEAN stack.

License: MIT License

HTML 3.32% JavaScript 90.17% CSS 6.50% Shell 0.01% PowerShell 0.01%

clash_tool's Introduction

clash_tool

This application began as a passionate side project that would force me to learn the MEAN stack. It was successful in teaching me the MEAN stack, however I lost interest in the underlying game this application was meant to support, and subsequently lost interest in developing it. I thought I could finish it up so anyone could pick up where I left off -- and add features -- but due to the learning curve of web-dev this application is half beginner-style and half intermediate-style. The code is a mess largely due to the fact that I started knowing nothing, and worked my way to a pretty good understanding of the MEAN stack. Also, it is around this time that ES6 came out, and so I started using ES6 constructs and other places I was not.

So to conclude: this application is a mess of bad programming and half-built features. I should have picked a smaller project as my first "learning experience." At this point I would rather 1) start a new MEAN stack application with good programming habits throughout, or 2) learn a new technology such as React.js to expand my knowledge and understanding of Web-Dev. The only way to save this project would be if I received external interest in this project, and help from someone willing to dedicate time to such a cause. And in all honesty, I would likely start over. It's a sad reality to what is >8 months of my free time, but as the logical fallacy goes: If you walk halfway to the store and then realize you forgot your wallet, it does not make sense to walk the rest of the way because you have already dedicated time in to walking the first half. Some times you have to know when to walk away, and this is that time.

Also, here are some photos of the application while it was still up. It was even live for a short time and had some users, but I overcommitted and now the application is no longer.

clash_tool's People

Contributors

lloydmontgomery avatar bluej avatar

Watchers

James Cloos avatar Lloyd Montgomery avatar

clash_tool's Issues

"Are you Sure" Pop-Up

When an admin tries to delete someone from the database, ask for confirmation before it happens.

Hero Countdown Reset

If a user is currently looking at the profile page: When the hero countdown reaches 0 (the end time == current time), the countdown should be set back to 'null' or something else that doesn't show the countdown, and write to the database immediately.

If a user visits a profile page with an already expired countdown, simply set it to 'null' and write back to the database immediately.

Adding Wars

Make the war number sequential based on the number of wars currently in the database. This leaves less room for error

Profile Enhancement

The profile looks broken if the user has not registered any way attacks. Hide all the stats features until there is at least one war attack to show stats.

API Data

Look into moving the War creation from the API to the Controller. Not sure if this is a good idea or not, but it would save a process of changing code in two places every time a change is made to the schema

Tab to Modals

On the admin "wars" page, clicking a photo brings up a new tab with the war in it, change this to bring up a modal.

Mobile View Issue

When viewing the site on Mobile, it comes up strangely small. It loads like a desktop site but on a tiny screen..? Not sure why this is. I am using Bootstrap columns to define everything, so those should handle sizing issues. It's almost like the whole viewport is tricked into thinking it is displaying on a Desktop.

Admin Panel User Sorting

Add filter options on the Admin's "view all users" panel. Filters on the boolean values such as "inClan" would be easy to ng-if and display a filtered list.

Favicon

Need to generate favicons

Fluidity Bug

App appears to have a jarring jump when switching between login and register on mobile, look into this. Maybe ng-show problem?

S3 Duplicates

Currently, if a duplicate image is added to the S3 bucket, I believe it simply does not add a new one.. Need to check for existing names..? Or something..? Look into it

Register Error Reporting

When a user is registering, all errors from the database are displayed to users 'as is' without changing them to be user friendly. Example: Trying to register with a username that already exists reports an error of: "Failed conditional check". Need to run custom queries against the database before trying to register to catch errors and help the user.

Separating Data-Binding from Database

Currently, the HTML page of a single war using Angular binding to display and update the variable that contains all the war information. When writing to the database, the server has to strip some information off of the warriors before writing. This loop that runs every post and put do delete the fields seems like a poor design decision that has to be cleaned up in the server. Look into fixing this by separating the data0binding variable from the variable sent to the database, while still doing proper server-sided validation that the variable is correct. Not sure this is possible, but needs some attention after MVP

Check all server responses

When client-sided code catches server responses, I have not thoroughly checked that I am handling the responses properly. Both in actual server errors and proper server responses that I have set data.success to "false" for some reason, I need to handle those properly.

Go through, check each response carefully. Consider possible places for error, and handle them appropriately.

Add Feedback Across Admin Panels

When a user/war is created/modified, the site switches back to the list of all users/wars, but there is no feedback as to what happened. There should be a message window in the main page for this that displays the message that came back.

Make server-sided code more rubust

This may be extreme, but perhaps I should check things such as:

if (req.params && req.body)
    db.updateUser(req.params.username, req.body);

Is it safe to assume that params and body will always exist? They are native to standard HTTP calls, but can they be maliciously stripped from the request subsequently causing my server to crash?

Needs further investigation.

Tracking Changes in Pages

To reduce Database load, only write the values that change. This requires either a "initialValue" variable for the object in question, followed by a diff against this variable before writing to the database, or tracking changes on variables using Angular $watch. I have yet to successfully use $watch, but it is certainly the best option, perhaps. It doesn't need to be real time, just at update time, so maybe an "initialValue" variable would be best.

Allow Username Changes (Table Key)

Currently, the user's "Username" is the key in the Users Table in DynamoDB, this means changing that changing that attribute is not technically possible. However, It is possible to do a Get on that user, create a new user with all the same information and the new Username, and delete the old user. This functionality should be implemented once I have the time.

Update: Changing that field actually creates a new person, but doesn't update the old one. Need to think this through before I implement it..

User Schema Jerry-Rig

Currently using the old user schema from Mongoose to hash and decrypt passwords. I am no longer using Mongoose so I need to transition those calls into a service/factory/provider..? It works for now, but it is jerry-rigged together and it needs to be changed.

Greyed Out Fields

It is not obvious that fields grey out because the war is in progress. This needs to be made more apparent some how

User "In-Clan" Status

When a user's In-Clan status is set to "false", they should not be able to log in. This is true of people who have just signed up, as well as people who have been deactivated because they left the clan

Decrease Database Load

Currently, when an update is made to a war, the entire war is re-written to the database. This is bad code. I need to change it so Angular tracks what has actually changed on the page, and then submits that information to the server so it only writes the new information. I imagine this can be done through a $watch Angular application

View Page automatic db pushing

when user makes changes to their own attack dropdown in the view war page (only option for changes on this page), should push changes automatically to database (eliminating 'Update War' button at bottom). Also need to add a text field that states that changes were saved.

Admin Routing

I recently made the get(users) and get(wars) api public because I want those to be loaded on the public main page. However, this has broken my routing, and now public people can access the users page. I don't believe they ca, actually do anything as the update(users) and update(wars) api is private to admins, but I still need to fix this routing.

Duplicate Code in warCtrl.js

There is a separation of concerns with the two controllers warCreateController and warEditController: one is meant to be loaded when creating and the other for editing. This made sense until the S3 upload code, which has since become a duplicate mess across the two controllers. Look into either merging the code, or creating some kind of factory/service that can be called to handle the duplicate (99% identical) code.

Low priority, no security risks, just looks messy and requires code changes in two places for the same change across both files

Add 'WarEntry' Schema

Need a Schema for war entries. This Schema should include:

  • Score
  • Exp Gained
  • Photo(s)
  • List of members who fought

Preview Upload

When adding a war picture, it would be nice if a preview was available. In fact, when uploading from a tablet (or phone) it would be essential to filling out the rest of the stats.

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.