{"id":26934501,"url":"https://github.com/8-bit-souvik/securit","last_synced_at":"2025-04-02T10:39:17.524Z","repository":{"id":46622354,"uuid":"405122115","full_name":"8-bit-souvik/Securit","owner":"8-bit-souvik","description":"Full stack application of a demo logging system","archived":false,"fork":false,"pushed_at":"2021-10-08T16:13:16.000Z","size":5695,"stargazers_count":8,"open_issues_count":1,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2023-03-10T02:23:03.777Z","etag":null,"topics":["expressjs","handlebars-js","jwt-authentication","logging","mysql","mysql-database","nodemailer-smtp-transport"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/8-bit-souvik.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-09-10T15:12:06.000Z","updated_at":"2021-11-08T12:50:51.000Z","dependencies_parsed_at":"2022-09-10T18:32:02.016Z","dependency_job_id":null,"html_url":"https://github.com/8-bit-souvik/Securit","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/8-bit-souvik%2FSecurit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/8-bit-souvik%2FSecurit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/8-bit-souvik%2FSecurit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/8-bit-souvik%2FSecurit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/8-bit-souvik","download_url":"https://codeload.github.com/8-bit-souvik/Securit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246801403,"owners_count":20836354,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["expressjs","handlebars-js","jwt-authentication","logging","mysql","mysql-database","nodemailer-smtp-transport"],"created_at":"2025-04-02T10:39:16.978Z","updated_at":"2025-04-02T10:39:17.483Z","avatar_url":"https://github.com/8-bit-souvik.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://i.ibb.co/BjHgMt9/image.png\" alt=\"image\" border=\"0\"\u003e\n\u003c/p\u003e\n\n-------------------------------------------------------------------------------------------------------------------------------------------------------\n\n\n\u003cp align=\"center\"\u003e\n  \u003cem\u003e\n    JavaScript\n    · Node JS\n    · Express\n  \u003c/em\u003e\n  \u003cbr /\u003e\n  \u003cem\u003e\n    API\n    · JSON\n    · mysql2\n  \u003c/em\u003e\n  \u003cbr /\u003e\n  \u003cem\u003e\n    HTML\n    · CSS\n    · Handlebars\n  \u003c/em\u003e\n  \u003cbr /\u003e\n  \u003cem\u003e\n    Cookies\n    · JsonWebToken\n  \u003c/em\u003e\n  \u003cbr /\u003e\n  \u003cem\u003e\n    \u003ca href=\"https://github.com/8-bit-souvik/Securit-secure-logging-system\"\u003e\n      Your favorite tool?\n    \u003c/a\u003e\n  \u003c/em\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n \u003cimg src=\"https://img.shields.io/badge/file%20count-58-yellow\" /\u003e \n \u003cimg src=\"https://img.shields.io/badge/lines%20count-4362-brightgreen\" /\u003e \n \u003cimg src=\"https://img.shields.io/badge/repo%20size-5.4MB-blue\" /\u003e\n \u003cimg src=\"https://img.shields.io/github/last-commit/8-bit-souvik/Securit-secure-logging-system\" /\u003e \n \u003c/p\u003e\n \n \u003cbr/\u003e\n \n## [click here to watch demo of this project](https://youtu.be/iaNd_Mw3dUs)\n\n\n## Intro\n\n[SecurIt](https://github.com/8-bit-souvik/Securit-secure-logging-system) is a Node JS application\nto build a demo of secure logging system as an essential backend part of any user interactable web application.\n\n## Summary\n\n- Users can sign up by providing their user ID, name, and email address along with a password.\n- An OTP will be sent to their email address which will be valid for 2 hours.\n- After submitting OTP (for verification) users can enter into the home page and get access to their account.\n- user can Logout / Login their account.\n- In case of password forgotten user can recover their account by the forget password option.\n- A JSON Web Token will be saved to keep a user logged in for a limited time period.\n- Users can change their data/credentials in the settings option.\n\n\u003cbr/\u003e\n\n## 💻 Tech Stack\n\n#### Front-End:\n\u003cimg alt=\"handlebars\" src=\"https://img.shields.io/badge/handlebars%20-%23ffac2f.svg?\u0026style=for-the-badge\"/\u003e  \u003cimg alt=\"CSS3\" src=\"https://img.shields.io/badge/css3%20-%231572B6.svg?\u0026style=for-the-badge\u0026logo=css3\u0026logoColor=white\"/\u003e \u003cimg alt=\"JavaScript\" src=\"https://img.shields.io/badge/javascript%20-%23323330.svg?\u0026style=for-the-badge\u0026logo=javascript\u0026logoColor=%23F7DF1E\"/\u003e \n\u003cimg alt=\"BootStrap\" src=\"https://img.shields.io/badge/Bootstrap-563D7C?style=for-the-badge\u0026logo=bootstrap\u0026logoColor=white\"/\u003e \n\n#### Back-End:\n\u003cimg alt=\"Javascript\" src=\"https://img.shields.io/badge/javascript-%23323330.svg?style=for-the-badge\u0026logo=javascript\u0026logoColor=%23F7DF1E\"/\u003e \u003cimg alt=\"nodeJS\" src=\"https://img.shields.io/badge/node.js-6DA55F?style=for-the-badge\u0026logo=node.js\u0026logoColor=white\"/\u003e    \u003cimg alt=\"expressJS\" src=\"https://img.shields.io/badge/express.js-%23404d59.svg?style=for-the-badge\u0026logo=express\u0026logoColor=%2361DAFB\"/\u003e    \n\n#### DataBase:\n\u003cimg alt=\"mtSQL\" src =\"https://img.shields.io/badge/mysql-%2300f.svg?style=for-the-badge\u0026logo=mysql\u0026logoColor=white\"/\u003e \n\n#### Other:\n\u003cimg alt=\"JWT\" src=\"https://img.shields.io/badge/JWT-black?style=for-the-badge\u0026logo=JSON%20web%20tokens\"/\u003e \u003cimg alt=\"GIT\" src=\"https://img.shields.io/badge/git-%23F05033.svg?style=for-the-badge\u0026logo=git\u0026logoColor=white\"/\u003e  \u003cimg alt=\"NPM\" src=\"https://img.shields.io/badge/NPM-%23000000.svg?style=for-the-badge\u0026logo=npm\u0026logoColor=white\"/\u003e\n\n\n\u003cbr/\u003e\n\n## File Structure\n  \n```\nSecureIt\n├───.vscode\n├───node_modules                             # all node/NPM modules are here\n├───public                                   # styles, fonts, images are statically served from here\n│   ├───account                              # Styles for account section (after login)\n│   │   ├───1dashboard\n│   │   ├───1home\n│   │   │   ├───css\n│   │   │   └───images\n│   │   ├───1setting\n│   │   │   ├───css\n│   │   │   ├───icons\n│   │   │   └───javascript       \n│   │   ├───css\n│   │   ├───icons\n│   │   └───javascript\n│   ├───api                                   # API client in front-end\n│   ├───assets                                # Styles for landing page and docs\n│   │   ├───css\n│   │   ├───icons\n│   │   ├───images\n│   │   └───javascript\n│   └───form                                  # Styles for credentials submission form\n│       ├───css\n│       ├───images\n│       └───js\n├───src                                       # Total backend processing is performed here\n│\n├───views                                     # frontend templates are here\n│    └───layouts\n│\n├───.env                                      # All keys, passwords and other secrets will be here\n│\n├───.gitignore\n│\n├───packege-lock.json \n│\n├───packege.json\n│\n└───readme.md\n\n```  \n\n\u003cbr/\u003e\n\u003cbr/\u003e\n\n## snapshots\n\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"90%\" src=\"https://i.ibb.co/VLWL1gj/image.png\" /\u003e\n\n\u003cbr/\u003e\n\u0026nbsp;  \u003cimg width=\"45%\" src=\"https://i.ibb.co/WGGMkQ6/image.png\" /\u003e\n  \u003cimg width=\"45%\" src=\"https://i.ibb.co/YcvRTPd/image.png\" /\u003e\n\u0026nbsp; \u0026nbsp; \u003cimg width=\"20%\" src=\"https://i.ibb.co/2qmm0Ng/image.png\" alt=\"dashboard\"/\u003e \u0026nbsp;\n\u003cimg width=\"20%\" src=\"https://i.ibb.co/426wLr1/image.png\" alt=\"navigation bar\"/\u003e \u0026nbsp;\n\u003cimg width=\"20%\" src=\"https://i.ibb.co/4dWzHCF/image.png\" alt=\"settings\"/\u003e \u0026nbsp;\n\u003cimg width=\"20%\" src=\"https://i.ibb.co/vdXsXKq/image.png\" alt=\"options\"/\u003e\n\u003c/p\u003e\n\n\u003cbr/\u003e\n\u003cbr/\u003e\n\n# Environment setup\n\n## Database Building\n\nas mySql is used as database therefore install mySQL for your system (if not installed) and \u003cb\u003e create a password to access your database.\u003c/b\u003e\u003cbr/\u003e\ndecide a name for your database and a name for table that will contain inside it. \u003cbr/\u003e\ni.e: database will be `securit` and table `users`.\u003cbr/\u003e\nto build the database, run this query in mysql CLI-\n```\nCREATE DATABASE securit;\nUSE securit;\nCREATE TABLE users (\nusername VARCHAR(45) NOT NULL PRIMARY KEY,\npassword VARCHAR(45) NOT NULL,\nID VARCHAR(45) NOT NULL,\nemail VARCHAR(45) NOT NULL,\nactive TINYINT(1) NOT NULL DEFAULT 0,\nname VARCHAR(45) NOT NULL,\nOTP VARCHAR(45) NULL,\nOTP_timestamp INT NULL,\nOTP_attempt TINYINT NULL,\npassword_attempt TINYINT NULL);\n```\n\n## dotenv file creation\n\nIn this dotenv file all keys and credentials for this web app will be stored.\u003cbr/\u003e\nfirst things first, create a file named `.env` at the root of the directory, then fill these data\n```\nPORT='5510'\nJWT_token='\u003ccreate a token\u003e'*\nDB_HOST='\u003chostname\u003e'**\nDB_USER='root'\nDB_PASS='\u003center mysql password\u003e'\nDB_NAME='securit'***\nMAIL_HOST='\u003csmtp.example.com\u003e'****\nMAIL_USER='\u003cno-reply@example.com\u003e'*****\nMAIL_PASS='\u003center email app password\u003e'******\n```\n\n *create a strong key for \u003cb\u003eJSON Web Token\u003c/b\u003e. e.g \"se8r5g4t5GB5DF4BgdHd8g7er56wA5D65W6465SA4F654\" \u003cbr/\u003e\n **type hostname, for local host type 127.0.0.1 \u003cbr/\u003e\n ***enter database's name which has been created. as we decided our database name is securit \u003cbr/\u003e\n ****enter email host name of which service you're using to send email to users. e.g if you're using your gmail account for this then type 'smtp.gmail.com' \u003cbr/\u003e\n *****enter email ID from where email will be sent \u003cbr/\u003e\n ******enter app password for email server. \u003cbr/\u003e\n\u003ci\u003e\u003cb\u003e\u003cb\u003eTip:\u003c/b\u003e to use gmail as sender generate app password.\u003cbr/\u003e\ngo to the link account.google.com, then go to the security section.\u003cbr/\u003e\nenable 2-step verification feature. an 'App password' feature will be visible just behind 2-step verification option.\u003cbr/\u003e\ngenerate a key by selecting app: mail and your device \u003c/b\u003e\u003c/i\u003e \u003cbr/\u003e\n\n## NPM package installation\n\nInstall \u003cb\u003eNode JS\u003c/b\u003e to run this program in server side.\nopen a terminal and go to it's root directory. \u003cbr/\u003e\ntype `npm install` to install all NPM libraries mentioned in package.json as dependencies\n\n## Run this app\n\nenvironment setup is completed.\u003cbr/\u003e\nnow start the server by running `npm start`\u003cbr/\u003e\ngo to the browser and type URL `localhost:5510`\u003cbr/\u003e\n\n\u003cbr/\u003e\n\u003cbr/\u003e\n\u003cbr/\u003e\n\n\u003cb\u003efor any kind of problem or queries contact me on [Linkedin](https://www.linkedin.com/in/souvikmandal20/)\u003c/b\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F8-bit-souvik%2Fsecurit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F8-bit-souvik%2Fsecurit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F8-bit-souvik%2Fsecurit/lists"}