Hello folks! This is a fully ready-to-go C.A.D./M.D.T. system for anyone who wants to use it. it's meant to be used by RP Communities of FiveM, but anyone can use it ;)
|-- app \\ core directory of the file, contains the routes and the authentication.
| |-- authentication \\ authentication strategy (using mongodb by default)
| | |-- index.js
| | |-- init.js
| | `-- middleware.js \\ middleware that prevents the user from entering forbidden pages
| |-- index.js
| |-- layout.hbs
| |-- note \\ do not care about this
| | |-- index.js
| | |-- init.js
| | `-- overview.hbs
| `-- user \\ the actual core of the cad. contains the router and all the server side logic of the cad
| |-- index.js
| |-- init.js
| |-- profile.hbs
| `-- welcome.hbs
|-- config
| `-- index.js \\ main config file
|-- css \\ bootstrap css files
| |-- bootstrap-grid.css
| |-- bootstrap-grid.css.map
| |-- bootstrap-grid.min.css
| |-- bootstrap-grid.min.css.map
| |-- bootstrap-reboot.css
| |-- bootstrap-reboot.css.map
| |-- bootstrap-reboot.min.css
| |-- bootstrap-reboot.min.css.map
| |-- bootstrap.css
| |-- bootstrap.css.map
| |-- bootstrap.min.css
| `-- bootstrap.min.css.map
|-- index.js
|-- js \\ bootstrap js files
| |-- bootstrap.js
| `-- bootstrap.min.js
|-- package-lock.json
|-- package.json
`-- views \\ all of the web pages that will be rendered
|-- admin.hbs
|-- civilians.hbs
|-- criminals.hbs
|-- dispatcher.hbs
|-- getuserinfo.hbs
|-- index.hbs
|-- login.hbs
|-- police.hbs
|-- searchid.hbs
`-- signup.hbs
Well, it was pretty difficult to restyle it, wasn't it? with v0.0.4, no more headaches trying to restyle it, everything can be set in the config files!!!
complete setup tutorial
- Node.js(Download) version 8.9.1 or older
- MongoDB Server (Free hosting or Download Server)
- Open up the CMD
- CD to the folder where you downloaded the CAD
- enter "
npm install
" - wait for it to install all the dependencies
once you've installed and started your mongodb, create the following collections:
- "user" collection
- "sessions" collection
Remeber to set your mongodb auth url in the config file, located here: configuration/index.js
- on he same CMD where you've just installed the dependecies, type
node index.js
- on the console should appear a message stating the server is listening on port 3000(default port)
- To test it out, Open a Web Browser and browse to: http://localhost:3000
- Node.js(Download or use
sudo apt-get install nodejs
) version 8.9.1 or older - MongoDB Server (Free hosting or Download Server or use
sudo apt-get install mongodb
)
- Open up the Terminal
- CD to the folder where you downloaded the CAD
- enter "
npm install
" - wait for it to install all the dependecies
once you've installed and started your mongod, create the following collections:
- "user" collection
- "sessions" collection
Remeber to set your mongodb auth url in the config file, located here: configuration/index.js
- on he same terminal window where you've just installed the dependecies, type
node index.js
- on the console should appear a message stating the server is listening on port 3000(default port)
- To test it out, Open a Web Browser and browse to: http://localhost:3000 if the server is a vps, browse to http://theipofyourserver:3000
This, Is The main page of the C.A.D. Let's now take a look at the features and everything that is on this page:
The Background, Has a slideshow! pretty nice Huh? :)
These Two buttons link to my community's discord and to my github profile
This Button is a WORK IN PROGRESS, It doesnt work yet.
this is what you wanna look at to browse in the CAD
The menu is composed by the following sections:
Home Criminal Database Dispatcher Menu Police Officers Run Plate and ID Civilians Menu Admin Login
Home the home page
Criminal Database Only officers have access to this, basically the place you go when you want to search up a civilian.
Dispatcher Menu Only dispatch has access to this, it lets you see online cops and their status
Police Officers Only officers have access to this, There they can set everything regarding their profile, for military rp servers, i've also included a "Append Heavy to CallSign" feature
Run Plate And ID It redirects to the same page as Criminal Database
Civilians Menu Everyone has access to this, you can set your id number, plate vehicle and much more.
Admin Login WIP, SEE BELOW ON HOW TO APPROVE POLICE OFFICERS, EDIT USERS ETC...
Let's answer this question:
- all the users are stored in the MongoDB Database
To edit them, do the following:
- connect to your mongodb using a client Recommended
- go in the user Collection
- right click on a user and edit the document
- to set the user as a police officer, set his "department" field as: pd for Police Dept or sheriff For Sheriff's office or hwy For Highway Patrol or disp for Dispatcher or ems for Fire Rescue.
- To set anything else, i've made all the other fields pretty self explanatory, but ask me on Fivem's Forum if you have any doubts.
The registration page exists, put it's not listed anywhere in the cad.
this is because it's meant to be given to the users by you. the link will be: