xHabbo - Node Administration Panel

Status
Not open for further replies.

KylePr0zZ

Member
Jul 22, 2016
51
14
Looks great, please continue and release this. I know the other version was finished for PlusEMU but don't have the slightest clue on how to set it up as an external hk for RevCMS. Maybe when you're done you can put up a quick 5 minutes text or even video tutorial.
 

Menkz

Member
Jul 9, 2010
374
167
You should add the ability to add room bundles and stuff like a room_ad uploader
 

LeChris

John 15:18
Sep 30, 2013
2,786
1,395
Due to a lack of which direction to go, I may lean towards private embedded hosting to start off with.

Why?
  • Setup will not be easy
  • I am going to complicate things to require a multi-nginx approach so that static files are handled by a fast C server, and actual calls are proxied to Node.
  • This panel is getting more complicated daily, and with the lack of use or regard for the 4+ Node releases made by myself, I learn towards the difficulties of setting it up is why.
Effects on you?
  • Eh, who knows.
  • I could be like The General and start at $1 for generous hosting as I rise my payment system slowly
  • Or I could be like leon and demand $300 monthly
  • I'll probably be calm and do a hosting service with an open-source release with NGINX tutorial
 

KylePr0zZ

Member
Jul 22, 2016
51
14
Any progress? @Rommel
I'd love to use this! Not many Administration Panels that are unique to Habbo, I don't have my currently, unless you code your own.
 

LeChris

John 15:18
Sep 30, 2013
2,786
1,395
Updates
  • Going to rewrite my entire system to use proper coding techniques to ensure stability in the future versus ensuring rapid-development time
  • Going to reduce the amount of libraries I use, and take out heavy ones. Examples including Passport, etc in return - I will develop my own ways to handle this.
Progress
My beautiful ES6 Server Wrapper is an example
PHP:
'use strict';

class HTTP
{

    constructor ()
    {
        // Dependencies
        const Website   = require('express')();
       
        // Configure
        Website.set('views', '../../public/views');
        Website.set('view engine', 'ejs');

        Website.use(require('body-parser').json());
        Website.use(require('body-parser').urlencoded( { extended : false }));
        Website.use(require('cookie-parser')());

        // Load Middleware
        require('glob').sync('./middleware/**/*.js').forEach (function (file) {
            const Class = require(file);
            new Class(Website);      
        });

        // Load Routes
        require('glob').sync(__dirname + '/controllers/**/*.js').forEach (function (file) {
            const Class = require(file);
            new Class(Website);
        });


        Website.listen(80, '0.0.0.0');

    }

}

module.exports = HTTP;
 
 

LeChris

John 15:18
Sep 30, 2013
2,786
1,395
Updates
  • ES6 rewrite is complete
  • Amazing speed increases by redoing my middle-ware and cleaning up classes
  • Sessions are now ip_based and can be deleted by superior staff
    • Useful if an account is hijacked, you can just end that session and lock the account :)
  • Github merge coming after hotel_user features are finished
 

MayoMayn

BestDev
Oct 18, 2016
1,423
683
Updates
  • ES6 rewrite is complete
  • Amazing speed increases by redoing my middle-ware and cleaning up classes
  • Sessions are now ip_based and can be deleted by superior staff
    • Useful if an account is hijacked, you can just end that session and lock the account :)
  • Github merge coming after hotel_user features are finished
Looking good :)
 

Jaden

not so active
Aug 24, 2014
886
263
Updates
  • ES6 rewrite is complete
  • Amazing speed increases by redoing my middle-ware and cleaning up classes
  • Sessions are now ip_based and can be deleted by superior staff
    • Useful if an account is hijacked, you can just end that session and lock the account :)
  • Github merge coming after hotel_user features are finished
IP based? If that means what I think it means then it's a bad idea... especially for a admin panel, anybody on your network can use it if you're logged on. But I probably just misunderstood what you meant by that.

You should put more thought into this spaghetti code. They're bad practices in promises too ya'know.


They way you use promises, you might as well just have stayed with callbacks. I think the most noticeable error in your code (due to the fact that it's so frequent) is the nested promises.


It also seems that calling the done() function just to return an error message is unnecessary (not thought out as well) as well. If there's no functionality within the statement blocks then I consider it duplicate code.

Take a look at how I pass multiple error messages using Promises. This is to give you a basic idea but no way am I suggesting extending the Error object for an error message that insignificant (especially since it has 0 functionality to it).

 
Last edited:

MayoMayn

BestDev
Oct 18, 2016
1,423
683
IP based? If that means what I think it means then it's a bad idea... especially for a admin panel, anybody on your network can use it if you're logged on. But I probably just misunderstood what you meant by that.

You should put more thought into this spaghetti code. They're bad practices in promises too ya'know.


They way you use promises, you might as well just have stayed with callbacks. I think the most noticeable error in your code (due to the fact that it's so frequent) is the nested promises.


It also seems that calling the done() function just to return an error message is unnecessary (not thought out as well) as well. If there's no functionality within the statement blocks then I consider it duplicate code.

Take a look at how I pass multiple error messages using Promises. This is to give you a basic idea but no way am I suggesting extending the Error object for an error message that insignificant (especially since it has 0 functionality to it).

I'm just asking out of curiosity, but is it bad practice to do something like this instead of requiring the same modules on every single file:
PHP:
const express = require('express')
const app = express()
const mongoose = require('mongoose')

mongoose.connect("mongodb://127.0.0.1:27017/test-app")

var globals = {
     // Require dependencies
    "express": express,
    "app": app,
    "server": require('http').Server(app),
    "path": require('path'),
    "mongoose": mongoose,
    "session": require('express-session'),
    "passport": require('passport'),
    "local": require('passport-local').Strategy,
    "bodyParser": require('body-parser'),
    "validator": require('express-validator'),
    "flash": require('connect-flash'),
    "bcrypt": require('bcryptjs'),
    "User": require(__dirname + '/models/user')
}

module.exports = globals
And then using modules like so:
PHP:
// Require $
var $ = require(__dirname + '/app/globals')

//Set our static file directory to public
$.app.use($.express.static(__dirname + '/public'))

Didn't bother to send a PM.
 

LeChris

John 15:18
Sep 30, 2013
2,786
1,395
I'm just asking out of curiosity, but is it bad practice to do something like this instead of requiring the same modules on every single file:
PHP:
const express = require('express')
const app = express()
const mongoose = require('mongoose')

mongoose.connect("mongodb://127.0.0.1:27017/test-app")

var globals = {
     // Require dependencies
    "express": express,
    "app": app,
    "server": require('http').Server(app),
    "path": require('path'),
    "mongoose": mongoose,
    "session": require('express-session'),
    "passport": require('passport'),
    "local": require('passport-local').Strategy,
    "bodyParser": require('body-parser'),
    "validator": require('express-validator'),
    "flash": require('connect-flash'),
    "bcrypt": require('bcryptjs'),
    "User": require(__dirname + '/models/user')
}

module.exports = globals
And then using modules like so:
PHP:
// Require $
var $ = require(__dirname + '/app/globals')

//Set our static file directory to public
$.app.use($.express.static(__dirname + '/public'))

Didn't bother to send a PM.
Yes, that is what I was doing. You require the modules once and it's cached - but it's bad to use global variables. or to do that.

@Jaden
If you knew more about Passport - you would understand I am using the intended behavior. I cannot change the design they set for it. As for IP based, it's a loose term. Your session is managed in the database, and if a superior rank is to remove it - you would lose that session. It's still via cookies but the whole "ip" thing is the main identifier
 

MayoMayn

BestDev
Oct 18, 2016
1,423
683
Yes, that is what I was doing. You require the modules once and it's cached - but it's bad to use global variables. or to do that.

@Jaden
If you knew more about Passport - you would understand I am using the intended behavior. I cannot change the design they set for it. As for IP based, it's a loose term. Your session is managed in the database, and if a superior rank is to remove it - you would lose that session. It's still via cookies but the whole "ip" thing is the main identifier
Yeah, I was just wondering.
Doesn't seem to work for mongoose or bcryptjs that way either.
 

LeChris

John 15:18
Sep 30, 2013
2,786
1,395
@Jaden
I need to catch up on ES6 before going after my promise abuse :p
 
Hey,

Development is moving on slowly as it's during my free time.

Updates

  • New error handling class
  • New action logging class
  • Working on a mock-up for my future routing to keep a cleaner code source
  • Fixed heaps of issues regarding the merge to ES6
  • Start-up time was cut massively, resulting in a 200-300ms average start
  • Features ?
    • Working on the core functionality now
      • Permissions system including managing individual permission keys (manage_hotel_user), etc
      • Administrative user system including individual user management tasks such as password resets, locking, session management, etc
  • Release will be with a source code, and with an executable that has an auto-installer
 

LeChris

John 15:18
Sep 30, 2013
2,786
1,395
yF7zLPg.png


I was working on a remote admin panel idea using Electron. Seems kinda like a cool idea :p
 

Virgin

i am a virgin
Apr 6, 2016
141
28
Not going to lie, this looks fucking beautiful. I mean I can't see why showing the specs of the server would matter, but this is dank. I would also suggest adding support tickets etc, and maybe some sort of transaction viewer? Just a little tip so people can see who's bought what etc, a little like WHMCS do.
 

LeChris

John 15:18
Sep 30, 2013
2,786
1,395
0gt6pfP.png

Definitely not throwing shade at our favorite Dane <3 @Sentinel

Updates
  1. Bookshelf mode fix-ups
  2. Added panel customization features again
  3. Users and groups (panel) are about a quarter of the way finished.

@Jaden should I continue storing CRUD features in controllers, or put them in their respective database model?
 

MayoMayn

BestDev
Oct 18, 2016
1,423
683
0gt6pfP.png

Definitely not throwing shade at our favorite Dane <3 @Sentinel

Updates
  1. Bookshelf mode fix-ups
  2. Added panel customization features again
  3. Users and groups (panel) are about a quarter of the way finished.

@Jaden should I continue storing CRUD features in controllers, or put them in their respective database model?

An example of this guy being a hypocrite.
Telling me I'm new to node and es6, yet the guy doesn't even know jack of how es6 should be used.
Half of the time, he's using ordinary functions, and the rest of the time he's using arrow functions.
Uses strict mode on pages where it's not even required.
gg wp m8
 

LeChris

John 15:18
Sep 30, 2013
2,786
1,395
An example of this guy being a hypocrite.
Telling me I'm new to node and es6, yet the guy doesn't even know jack of how es6 should be used.
Half of the time, he's using ordinary functions, and the rest of the time he's using arrow functions.
Uses strict mode on pages where it's not even required.
gg wp m8
When the beginner looks up a stack overflow article, and believes you should wrap everything in an arrow function or that you shouldn't always use the strict compiler.
zjxrie5ljfnmbvznhdqh.jpg


Stay in Demark with PHP. You're not prepared to tell people doing it for a while what to do, while you can barely grasp whether to use Electron or not. (PS: You cannot wrap Electron around Express, nor is streaming torrents legal).


For those curious of mixing arrow and regular functions, he is talking down on using classes - An ES6 standard. Great way to sound idiotic man
 

MayoMayn

BestDev
Oct 18, 2016
1,423
683
When the beginner looks up a stack overflow article, and believes you should wrap everything in an arrow function or that you shouldn't always use the strict compiler.

Stay in Demark with PHP. You're not prepared to tell people doing it for a while what to do, while you can barely grasp whether to use Electron or not. (PS: You cannot wrap Electron around Express, nor is streaming torrents legal).


For those curious of mixing arrow and regular functions, he is talking down on using classes - An ES6 standard. Great way to sound idiotic man
If you're not too much of a moron, you can easily wrap Electron around Express, it's just stupid. So first, before you're trying to sound smart, get your facts straight first kiddo. Second of all, everybody knows streaming torrents is illegal, but yet again who the hell cares?
You're just mad that many users on here, is capable of actually coding something that is not Habbo related.

> Tries to insult danes, yet he uses an engine made by a dane.
 

MayoMayn

BestDev
Oct 18, 2016
1,423
683
Nobody is mad. I have a huge amount of non-habbo related projects as well as freelance work.

You just think that because you make one illegal (horribly done) Electron application - you are a well-experienced Node developer. I'll go through your source and point out a few hundred issues if need be, but I can already say your code was done horribly wrong if you still are not using Angular or a frontend routing controller.

@Sledmore can you take Sentinel back to Denmark.
How can you even say that it's horribly done, when I haven't posted any code snippets of the application itself? You really lack of intellect mate. Never said I was an experienced JavaScript developer compared to how you mention yourself as some OP full stack developer. An app is not done horribly wrong, just because you don't use React or Angular, you stupid moron.

> uses strict mode on every file, when it's not required with babel/es6 lol
 
Status
Not open for further replies.

Users who are viewing this thread

Top