{"id":21497858,"url":"https://github.com/saiyamdubey/beaman_app","last_synced_at":"2025-07-15T20:30:46.309Z","repository":{"id":217538746,"uuid":"741948565","full_name":"saiyamdubey/BeAMan_App","owner":"saiyamdubey","description":"In this app i learned JWT_Authentication , Frontend , Server Side rendering , MVC File Pattern and more , this will show you how to work with the authurization of the permissions and Authentication , token creation in production App .","archived":false,"fork":false,"pushed_at":"2024-08-04T18:27:51.000Z","size":291,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-08-04T20:30:07.860Z","etag":null,"topics":["es5","expressjs","front-end-development","html-css-javascript","mongodb","moongose","nodejs","nodejs-server","routing","server-side-rendering","ssr"],"latest_commit_sha":null,"homepage":"https://be-a-man-app.vercel.app","language":"HTML","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/saiyamdubey.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-11T12:53:13.000Z","updated_at":"2024-08-04T18:27:55.000Z","dependencies_parsed_at":"2024-01-18T19:51:11.081Z","dependency_job_id":null,"html_url":"https://github.com/saiyamdubey/BeAMan_App","commit_stats":null,"previous_names":["saiyamdubey/beaman_app"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saiyamdubey%2FBeAMan_App","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saiyamdubey%2FBeAMan_App/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saiyamdubey%2FBeAMan_App/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saiyamdubey%2FBeAMan_App/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/saiyamdubey","download_url":"https://codeload.github.com/saiyamdubey/BeAMan_App/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226066549,"owners_count":17568419,"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":["es5","expressjs","front-end-development","html-css-javascript","mongodb","moongose","nodejs","nodejs-server","routing","server-side-rendering","ssr"],"created_at":"2024-11-23T16:27:06.106Z","updated_at":"2024-11-23T16:27:06.726Z","avatar_url":"https://github.com/saiyamdubey.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BeAMan_Application\n\nIn this app i learned JWT_Authentication , Frontend , Server Side rendering , MVC File Pattern and more , this will show you how to work with the authurization of the permissions and Authentication , token creation in production App .\n\n## Overview\n\nThis repository contains a sample implementation of JSON Web Token (JWT) authentication. JWT is a compact, URL-safe means of representing claims to be transferred between two parties. It is commonly used for authentication and authorization purposes in web applications.\n\n## Features\n\n- **User Registration**: Register new users with unique credentials.\n- **User Login**: Authenticate users and generate JWT tokens for subsequent requests.\n- **Token Refresh**: Allow users to refresh their JWT tokens to extend their session.\n- **Middleware**: Implement middleware to protect routes that require authentication.\n\n## Technologies Used\n\n- **Node.js**: JavaScript runtime for server-side development.\n- **Express.js**: Web application framework for Node.js.\n- **jsonwebtoken**: Library for generating and verifying JSON Web Tokens.\n- **MongoDB**: NoSQL database for storing user information.\n- **dotenv**: Module to load environment variables from a .env file.\n\n## Setup\n\n1. Clone the repository:\n\n```bash\ngit clone https://github.com/your-username/BeAMan_App.git\ncd JWT_authentication\nInstall dependencies:\n```\n\n```bash\nCopy code\nnpm install\n```\n\nCreate a .env file in the project root and configure environment variables:\n\n# env\n\nCopy code\nPORT=8000 // give your port here\nMONGODB_URI=mongodb://localhost:27017/userlist\nJWT_SECRET=your-secret-key // BeAMan\nStart the server:\n\n# bash\n\nCopy code\n\n```bash\n\nnpm start dev\n\n```\n\nThe server should now be running at http://localhost:8000.\n\n### API Endpoints\n\nPOST /api/register: Register a new user.\nPOST /api/login: Log in and receive a JWT token.\nPOST /api/refresh-token: Refresh the JWT token.\nGET /api/protected-route: Example protected route requiring authentication.\nUsage\nRegister a new user using the /api/register endpoint.\nLog in with the registered credentials using the /api/login endpoint to receive a JWT token.\nUse the token to access protected routes like /api/protected-route.\nTo extend the session, use the /api/refresh-token endpoint with the refresh token.\nContributors\nYour Name saiyamdubey@gmail.com\nLicense\nThis project is licensed under the ISC License.\n\ncreated By --- `Saiyam_Dubey`,\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaiyamdubey%2Fbeaman_app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsaiyamdubey%2Fbeaman_app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaiyamdubey%2Fbeaman_app/lists"}