2018-06-09 23:34:06 +00:00
|
|
|
//
|
2020-11-17 02:08:24 +00:00
|
|
|
// Shinobi - Open Source Video Management System
|
2020-08-27 05:18:42 +00:00
|
|
|
// Copyright (C) 2020 Moe Alam, moeiscool
|
2018-06-09 23:34:06 +00:00
|
|
|
//
|
2020-11-17 02:08:24 +00:00
|
|
|
// # Supporting Shinobi Development
|
2018-06-09 23:34:06 +00:00
|
|
|
//
|
2020-11-17 02:08:24 +00:00
|
|
|
// If you would like to support Shinobi please consider subscribing to a Mobile License :)
|
|
|
|
// Subscribe : https://licenses.shinobi.video/subscribe?planSubscribe=plan_G31AZ9mknNCa6z
|
2018-06-09 23:34:06 +00:00
|
|
|
// PayPal : paypal@m03.ca
|
|
|
|
//
|
2022-03-30 23:20:53 +00:00
|
|
|
const io = new (require('socket.io').Server)()
|
2018-09-29 04:04:50 +00:00
|
|
|
//process handlers
|
2020-11-17 02:08:24 +00:00
|
|
|
const s = require('./libs/process.js')(process,__dirname)
|
2018-12-17 00:54:06 +00:00
|
|
|
//load extender functions
|
2020-05-10 00:27:44 +00:00
|
|
|
require('./libs/extenders.js')(s)
|
2018-09-29 04:04:50 +00:00
|
|
|
//configuration loader
|
2020-05-10 00:27:44 +00:00
|
|
|
var config = require('./libs/config.js')(s)
|
2019-03-15 07:32:18 +00:00
|
|
|
//basic functions
|
2020-05-10 00:27:44 +00:00
|
|
|
require('./libs/basic.js')(s,config)
|
2018-09-29 04:04:50 +00:00
|
|
|
//language loader
|
2020-05-10 00:27:44 +00:00
|
|
|
var lang = require('./libs/language.js')(s,config)
|
2019-08-13 08:07:28 +00:00
|
|
|
//working directories : videos, streams, fileBin..
|
2020-05-10 00:27:44 +00:00
|
|
|
require('./libs/folders.js')(s,config,lang)
|
2018-12-17 00:54:06 +00:00
|
|
|
//code test module
|
2020-11-17 02:08:24 +00:00
|
|
|
// require('./libs/codeTester.js')(s,config,lang)
|
2019-07-29 20:07:24 +00:00
|
|
|
//get version
|
2020-05-10 00:27:44 +00:00
|
|
|
require('./libs/version.js')(s,config,lang)
|
2018-09-29 04:04:50 +00:00
|
|
|
//video processing engine
|
2020-11-17 02:08:24 +00:00
|
|
|
require('./libs/ffmpeg.js')(s,config,lang, async () => {
|
2018-09-29 20:09:24 +00:00
|
|
|
//database connection : mysql, sqlite3..
|
2020-05-10 00:27:44 +00:00
|
|
|
require('./libs/sql.js')(s,config)
|
2018-09-29 20:09:24 +00:00
|
|
|
//authenticator functions : API, dashboard login..
|
2020-05-10 00:27:44 +00:00
|
|
|
require('./libs/auth.js')(s,config,lang)
|
2018-09-29 20:09:24 +00:00
|
|
|
//express web server with ejs
|
2020-11-17 02:08:24 +00:00
|
|
|
const app = require('./libs/webServer.js')(s,config,lang,io)
|
2021-11-17 20:10:25 +00:00
|
|
|
//data port
|
|
|
|
require('./libs/dataPort.js')(s,config,lang,app,io)
|
2021-11-14 16:38:22 +00:00
|
|
|
//page layout load
|
|
|
|
require('./libs/definitions.js')(s,config,lang,app,io)
|
2018-10-08 06:01:27 +00:00
|
|
|
//web server routes : page handling..
|
2020-05-10 00:27:44 +00:00
|
|
|
require('./libs/webServerPaths.js')(s,config,lang,app,io)
|
2018-10-08 06:01:27 +00:00
|
|
|
//web server routes for streams : streams..
|
2020-05-10 00:27:44 +00:00
|
|
|
require('./libs/webServerStreamPaths.js')(s,config,lang,app,io)
|
2018-10-05 21:19:29 +00:00
|
|
|
//web server admin routes : create sub accounts, share monitors, share videos
|
2020-05-10 00:27:44 +00:00
|
|
|
require('./libs/webServerAdminPaths.js')(s,config,lang,app,io)
|
2018-10-05 21:19:29 +00:00
|
|
|
//web server superuser routes : create admin accounts and manage system functions
|
2020-05-10 00:27:44 +00:00
|
|
|
require('./libs/webServerSuperPaths.js')(s,config,lang,app,io)
|
2018-09-29 20:09:24 +00:00
|
|
|
//websocket connection handlers : login and streams..
|
2020-05-10 00:27:44 +00:00
|
|
|
require('./libs/socketio.js')(s,config,lang,io)
|
2018-09-29 20:09:24 +00:00
|
|
|
//user and group functions
|
2020-05-10 00:27:44 +00:00
|
|
|
require('./libs/user.js')(s,config,lang)
|
2019-06-07 16:52:07 +00:00
|
|
|
//timelapse functions
|
2020-05-10 00:27:44 +00:00
|
|
|
require('./libs/timelapse.js')(s,config,lang,app,io)
|
2019-07-29 20:07:24 +00:00
|
|
|
//fileBin functions
|
2020-05-10 00:27:44 +00:00
|
|
|
require('./libs/fileBin.js')(s,config,lang,app,io)
|
2018-09-29 20:09:24 +00:00
|
|
|
//monitor/camera handlers
|
2020-05-10 00:27:44 +00:00
|
|
|
require('./libs/monitor.js')(s,config,lang)
|
2018-10-01 05:44:35 +00:00
|
|
|
//event functions : motion, object matrix handler
|
2020-05-10 00:27:44 +00:00
|
|
|
require('./libs/events.js')(s,config,lang)
|
2018-09-29 20:09:24 +00:00
|
|
|
//recording functions
|
2020-05-10 00:27:44 +00:00
|
|
|
require('./libs/videos.js')(s,config,lang)
|
2018-09-29 20:09:24 +00:00
|
|
|
//plugins : websocket connected services..
|
2021-01-19 17:04:07 +00:00
|
|
|
require('./libs/plugins.js')(s,config,lang,app,io)
|
2018-09-29 20:09:24 +00:00
|
|
|
//health : cpu and ram trackers..
|
2020-05-10 00:27:44 +00:00
|
|
|
require('./libs/health.js')(s,config,lang,io)
|
2018-09-29 20:09:24 +00:00
|
|
|
//cluster module
|
2020-05-10 00:27:44 +00:00
|
|
|
require('./libs/childNode.js')(s,config,lang,app,io)
|
2018-10-01 05:44:35 +00:00
|
|
|
//cloud uploaders : amazon s3, webdav, backblaze b2..
|
2020-06-15 07:54:52 +00:00
|
|
|
require('./libs/uploaders.js')(s,config,lang,app,io)
|
2018-10-02 00:21:48 +00:00
|
|
|
//notifiers : discord..
|
2020-05-10 00:27:44 +00:00
|
|
|
require('./libs/rtmpserver.js')(s,config,lang)
|
2019-02-23 07:04:52 +00:00
|
|
|
//dropInEvents server (file manipulation to create event trigger)
|
2020-05-10 00:27:44 +00:00
|
|
|
require('./libs/dropInEvents.js')(s,config,lang,app,io)
|
2021-04-27 06:02:26 +00:00
|
|
|
//notifiers : discord..
|
|
|
|
require('./libs/notification.js')(s,config,lang)
|
2019-04-03 03:47:03 +00:00
|
|
|
//branding functions and config defaults
|
2020-05-10 00:27:44 +00:00
|
|
|
require('./libs/branding.js')(s,config,lang,app,io)
|
2018-12-12 23:02:24 +00:00
|
|
|
//custom module loader
|
2020-05-10 00:27:44 +00:00
|
|
|
require('./libs/customAutoLoad.js')(s,config,lang,app,io)
|
2018-12-29 19:32:12 +00:00
|
|
|
//scheduling engine
|
2020-05-19 23:56:21 +00:00
|
|
|
require('./libs/shinobiHub.js')(s,config,lang,app,io)
|
2020-06-13 07:28:50 +00:00
|
|
|
//onvif, ptz engine
|
|
|
|
require('./libs/control.js')(s,config,lang,app,io)
|
|
|
|
//ffprobe, onvif engine
|
2020-06-07 01:55:01 +00:00
|
|
|
require('./libs/scanners.js')(s,config,lang,app,io)
|
2020-05-19 23:56:21 +00:00
|
|
|
//scheduling engine
|
2020-05-10 00:27:44 +00:00
|
|
|
require('./libs/scheduler.js')(s,config,lang,app,io)
|
2020-12-04 04:38:37 +00:00
|
|
|
//onvif device manager
|
|
|
|
require('./libs/onvifDeviceManager.js')(s,config,lang,app,io)
|
2021-04-04 06:53:38 +00:00
|
|
|
//alternate logins
|
|
|
|
require('./libs/auth/logins.js')(s,config,lang,app)
|
2024-10-06 00:15:22 +00:00
|
|
|
//rally other Shinobi
|
|
|
|
require('./libs/rally.js')(s,config,lang,app,io)
|
2018-10-23 18:36:02 +00:00
|
|
|
//on-start actions, daemon(s) starter
|
2020-09-14 06:49:52 +00:00
|
|
|
await require('./libs/startup.js')(s,config,lang)
|
|
|
|
//p2p, commander
|
2020-09-27 05:52:52 +00:00
|
|
|
require('./libs/commander.js')(s,config,lang,app)
|
2022-08-21 18:16:16 +00:00
|
|
|
//cron
|
|
|
|
require('./libs/cron.js')(s,config,lang)
|
2022-11-24 15:59:14 +00:00
|
|
|
//video browser functions
|
2022-11-24 18:40:43 +00:00
|
|
|
require('./libs/videoBrowser.js')(s,config,lang,app,io)
|
2018-09-29 20:09:24 +00:00
|
|
|
})
|