{"id":23303564,"url":"https://github.com/mad-coders/jwt-serverless-authentication","last_synced_at":"2025-10-08T12:01:39.591Z","repository":{"id":37819125,"uuid":"200374705","full_name":"mad-coders/jwt-serverless-authentication","owner":"mad-coders","description":null,"archived":false,"fork":false,"pushed_at":"2023-03-03T04:59:07.000Z","size":2434,"stargazers_count":0,"open_issues_count":14,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-13T18:16:42.764Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mad-coders.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-08-03T12:46:14.000Z","updated_at":"2021-11-16T22:59:49.000Z","dependencies_parsed_at":"2023-02-17T22:31:06.960Z","dependency_job_id":null,"html_url":"https://github.com/mad-coders/jwt-serverless-authentication","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mad-coders%2Fjwt-serverless-authentication","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mad-coders%2Fjwt-serverless-authentication/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mad-coders%2Fjwt-serverless-authentication/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mad-coders%2Fjwt-serverless-authentication/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mad-coders","download_url":"https://codeload.github.com/mad-coders/jwt-serverless-authentication/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247564039,"owners_count":20958994,"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":[],"created_at":"2024-12-20T11:12:56.253Z","updated_at":"2025-10-08T12:01:39.497Z","avatar_url":"https://github.com/mad-coders.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# angular-auth-api\n\n## Run develop\n\nRequirements:\n\n```\n- node\n- docker-compose\n```\n\nSteps: \n\n```\n1. npm i\n2. npm run db:docker\n3. npm run start:dev\n```\n\nDynamoDB local: http://localhost:8000\n\nAPI endpoint: http://localhost:3000\n\nSwagger (http://localhost:3001/api):\n\n```\nnpm run swagger\n```\n\n## Production\nRequirements:\n\n- aws-cli (https://docs.aws.amazon.com/cli/latest/userguide/install-bundle.html)\n\n- serverless-cli (https://serverless.com/)\n\nStart production offline: `npm run sls:offline`\n\nDeploy: \n\n```\n1. npm i\n2. aws configuration\n3. edit config file (src/shared/config.index.ts)\n4. npm run sls:deploy\n```\n\n## Add more DB providers, for example MongoDB\n### 1. Import MongooseModule into db.module.ts\n```javascript\n@Module({\n  ...\n  imports: [\n    ...\n    MongooseModule.forRoot('mongodb://localhost/madocders'),\n    ...\n  ],\n  ...\n})\n```\n\n### 2. Create mongoose schema\n```javascript\nexport const userSchema = new mongoose.Schema({\n  username: String,\n  password: String,\n  firstName: String,\n  lastName: String,\n  organization: String,\n});\n```\n\n### 3. Import UserSchema into db module\n```javascript\n@Module({\n  ...\n  imports: [\n    ...\n    MongooseModule.forRoot('mongodb://localhost/madocders'),\n    MongooseModule.forFeature([{ name: 'User', schema: UserSchema }])\n    ...\n  ],\n  ...\n})\n```\n\n### 4. Inject UserModel into service\n```javascript\n@InjectModel('User') private readonly userModel: Model\u003cUserModel\u003e\n```\n\n\n## Docs\n- NestJS (https://nestjs.com/)\n\n- Serverless (https://serverless.com/)\n\n## Process env config\n```\nJWT_SECRET\nAWS_ACCESS_KEY\nAWS_ACCESS_SECRET\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmad-coders%2Fjwt-serverless-authentication","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmad-coders%2Fjwt-serverless-authentication","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmad-coders%2Fjwt-serverless-authentication/lists"}