{"id":20235771,"url":"https://github.com/mhaidarhanif/project-auth-express","last_synced_at":"2026-05-19T04:12:11.270Z","repository":{"id":151199944,"uuid":"253743482","full_name":"mhaidarhanif/project-auth-express","owner":"mhaidarhanif","description":"Project Example: Auth with Express","archived":false,"fork":false,"pushed_at":"2020-04-11T14:14:57.000Z","size":435,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-03T14:23:35.142Z","etag":null,"topics":["auth","example","express","project"],"latest_commit_sha":null,"homepage":"https://api.haidar.dev","language":"JavaScript","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/mhaidarhanif.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-04-07T09:13:10.000Z","updated_at":"2020-04-11T14:15:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"c5594d74-88c1-4d85-bb05-5d1ed409d26a","html_url":"https://github.com/mhaidarhanif/project-auth-express","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mhaidarhanif/project-auth-express","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhaidarhanif%2Fproject-auth-express","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhaidarhanif%2Fproject-auth-express/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhaidarhanif%2Fproject-auth-express/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhaidarhanif%2Fproject-auth-express/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mhaidarhanif","download_url":"https://codeload.github.com/mhaidarhanif/project-auth-express/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhaidarhanif%2Fproject-auth-express/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266602820,"owners_count":23954696,"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","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["auth","example","express","project"],"created_at":"2024-11-14T08:17:42.614Z","updated_at":"2026-05-19T04:12:06.241Z","avatar_url":"https://github.com/mhaidarhanif.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Project Example: Auth with Express\n\n[![Travis CI](https://travis-ci.org/mhaidarh/project-auth-express.svg?branch=master)](https://travis-ci.org/github/mhaidarh/project-auth-express)\n\n- Visit the live API: https://api.haidar.dev\n- Visit the live documentation: https://api.haidar.dev/docs\n\n## Links\n\n- Production: https://api.haidar.dev\n  - Docs: https://api.haidar.dev/docs\n- Heroku: https://api-haidar-dev.herokuapp.com\n  - Dashboard: https://dashboard.heroku.com/apps/api-haidar-dev\n- Google App Engine: https://api-haidar-dev.REGION.r.appspot.com\n- Amazon EBS: https://api-haidar-dev.example.com\n\n## Stack\n\n- REST API\n- Express\n  - Body Parser\n  - Cookie Parser\n  - bcrypt\n  - JWT\n- Debug\n- Morgan\n- Postman\n- Swagger\n- MongoDB, Mongoose, and mLab\n  - Later: MySQL, Sequelize, and MySQL instance\n- Heroku\n  - Later: Amazon EBS\n  - Later: Google App Engine\n- Cloudflare\n- Uniregistry\n\n## Features\n\n- Seed new users\n- Register new user\n  - Name\n  - Email\n  - Password encrypted using bcrypt\n- Login to existing user\n  - Email\n  - Password\n  - Authorization token with JWT\n- Get all users\n  - Don't show the password\n- Get user by id\n  - Don't show the password\n- Search users by name\n- Remove all users\n\n## REST API Specification\n\nSwagger URL: https://api.haidar.dev/docs\n\n| Endpoint              | HTTP     | Description                    |\n| --------------------- | -------- | ------------------------------ |\n| `/`                   | `GET`    | Get index                      |\n| `/users/seed`         | `POST`   | Seed initial users             |\n| `/users/register`     | `POST`   | Register new user              |\n| `/users/login`        | `POST`   | Login to existing user         |\n| `/users/validate`     | `GET`    | Validate user with its token   |\n| `/users/profile`      | `GET`    | Get authenticated user profile |\n| `/users/search?name=` | `GET`    | Search user by name            |\n| `/users`              | `GET`    | Get all users                  |\n| `/users`              | `DELETE` | Delete all users               |\n| `/users/:id`          | `GET`    | Get one user by id             |\n| `/users/:id`          | `DELETE` | Delete one user by id          |\n\n## Scripts\n\n### Setup Environment Variables\n\n#### Development\n\nRun the `setup.sh` script first, to copy `.env.schema` into `.env`.\n\n```sh\n./setup.sh\n```\n\nThen you fill the variables in `.env` file.\nRemember to install and make sure MongoDB is running on your machine.\n\n```txt\nMONGODB_URI=mongodb://localhost:27017\nJWT_SECRET=this_is_your_secret\n```\n\n#### Production\n\n```\nMONGODB_URI=mongodb://urltomongodb.com:27017\nJWT_SECRET=this_is_your_other_secret\n```\n\n### Install Dependencies\n\n```sh\nyarn\n```\n\n### Run Development Server\n\n```sh\nyarn dev\n```\n\n### Run Production Server\n\n```sh\nyarn start\n```\n\n### Run Test Suite\n\n```sh\nyarn test\n```\n\n### Debug Production on Heroku\n\n```sh\nheroku logs --tail -a api-haidar-dev\n```\n\n## References\n\n- [Swagger: Time to document that Express API you built!](https://levelup.gitconnected.com/swagger-time-to-document-that-express-api-you-built-9b8faaeae563)\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmhaidarhanif%2Fproject-auth-express","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmhaidarhanif%2Fproject-auth-express","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmhaidarhanif%2Fproject-auth-express/lists"}