<prompt> Unda programu kamili ya JavaScript inayoonyesha data kutoka kwa API ya umma k.m., hali ya hewa, hifadhi, n.k. kwa kutumia D3.js kwa mandhari ya mbele na Express.js kwa mandhari ya nyuma. Programu inapaswa kujumuisha uthibitishaji wa mtumiaji na uwezo wa kuhifadhi taswira maalum kwenye hifadhidata ya MongoDB.PLINFORMAT  <response>: app.jsconst express needexpress;const bodyParser needbody-parser;const session needexpress-session;const flash hitajiunganisha-flash;const passport hitajipasipoti;const app express; Mpangilio wa pasipotineed.configpassportpasipoti; Usanidi wa EJSapp.setangalia injini, ejs; Vyombo vya kati vya kuchanganua mwiliapp.usebodyParser.urlencoded extended: false ;app.usebodyParser.json; Vyombo vya kati vya kikaoapp.usekipindi siri: siri, kuokoa: kweli, saveUninitialized: kweli; Pasipoti ya katiapp.usepassport.initialize;app.usepassport.session; Unganisha vifaa vya kati vya flashapp.useflash; Vigezo vya kimataifa kwa ujumbe wa flashapp.usereq, res, next res.locals.success_msg req.flashsuccess_msg; res.locals.error_msg req.flasherror_msg; res.locals.error req.flashkosa; ijayo ;; Njiaapp.use, hitaji.routesindex;app.useusers, need.routesusers;const PORT process.env.PORT 3000;app.listenPORT, console.logSeva inayoendesha kwenye bandari PORT; db.jsconst mongoose needmongoose;const connectDB async jaribu await mongoose.connectmongodb:localhostd3-visualization-app, useNewUrlParser: kweli, useUnifiedTopology: kweli ; console.logMongoDB imeunganishwa...; kukamata kukosea console.errorerr.message; mchakato.toka1; ;module.exports connectDB; Mtumiaji.jsconst mongoose needmongoose;const UserSchema new mongoose.Schema jina la mtumiaji: aina: kamba, inahitajika: kweli , barua pepe: aina: kamba, inahitajika: kweli , nenosiri: aina: kamba, inahitajika: kweli , tarehe: aina: Tarehe, chaguo-msingi: Date.now ;const User mongoose.modelMtumiaji, UserSchema;module.exports Mtumiaji; Visualization.jsconst mongoose needmongoose;const VisualizationSchema mongoose.Schema mpya mtumiaji: aina: mongoose.Schema.Types.ObjectId, ref: Mtumiaji , kichwa: aina: kamba, inahitajika: kweli , dataUrl: aina: kamba, inahitajika: kweli , Aina ya chati: aina: kamba, inahitajika: kweli , tarehe: aina: Tarehe, chaguo-msingi: Date.now ;const Visualization mongoose.modelVisualization, VisualizationSchema;module.exports Taswira; index.js njiaconst express needexpress;const router express.Router ;const guaranteeAuthenticated need..configauth;router.get, req, res res.renderwelcome;router.getdashibodi, hakikishaImethibitishwa, req, res res.renderdashibodi, mtumiaji: req.user ;module.exports kipanga njia; users.js njia ... ingiza vifurushi muhimu na mifano ...const router express.Router ; Ukurasa wa usajilirouter.getregister, req, res res.renderregister; Ukurasa wa kuingiarouter.getlogin, req, res res.renderingia; Ushughulikiaji wa usajilirouter.postregister, req, res ... kushughulikia usajili wa mtumiaji ...; Inchi ya kuingiarouter.postlogin, req, res, next pasipoti.idhinishalocal, mafanikioElekeza: dashibodi, kushindwaKuelekeza: userslogin, kushindwaFlash: kweli req, res, next;; Ncha ya kuondokarouter.gettoka, req, res req.logout; req.flashsuccess_msg, Umetoka; redirect.redirectuserslogin;;module.exports kipanga njia; main.js mwonekano wa D3d3.json .kishadata Unda taswira kwa kutumia D3.js .kamatakosa console.errorkosa; 