{"id":26262470,"url":"https://github.com/gauravssnl/airbus-inventory","last_synced_at":"2026-05-15T08:32:31.000Z","repository":{"id":176226239,"uuid":"437492129","full_name":"gauravssnl/airbus-inventory","owner":"gauravssnl","description":"Airbus Inventory code challenge","archived":false,"fork":false,"pushed_at":"2021-12-13T18:25:54.000Z","size":913,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-14T00:19:14.406Z","etag":null,"topics":["api","flask","fullstack","gunicorn","python","rest-api"],"latest_commit_sha":null,"homepage":"https://airbus-inventory.herokuapp.com/","language":"Python","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/gauravssnl.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,"zenodo":null}},"created_at":"2021-12-12T08:32:07.000Z","updated_at":"2023-05-04T11:51:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"b766f9fe-dec8-403e-b4ac-0ca2bdba6d4a","html_url":"https://github.com/gauravssnl/airbus-inventory","commit_stats":null,"previous_names":["gauravssnl/airbus-inventory"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gauravssnl/airbus-inventory","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gauravssnl%2Fairbus-inventory","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gauravssnl%2Fairbus-inventory/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gauravssnl%2Fairbus-inventory/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gauravssnl%2Fairbus-inventory/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gauravssnl","download_url":"https://codeload.github.com/gauravssnl/airbus-inventory/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gauravssnl%2Fairbus-inventory/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272315642,"owners_count":24912615,"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-08-27T02:00:09.397Z","response_time":76,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","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":["api","flask","fullstack","gunicorn","python","rest-api"],"created_at":"2025-03-14T00:19:16.561Z","updated_at":"2025-10-19T10:19:31.203Z","avatar_url":"https://github.com/gauravssnl.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# airbus-inventory\nAirbus Inventory code challenge\n\nThe application is deployed on Heroku and `gunicorn` is used as WSGI server.\n\nHeroku app URL : https://airbus-inventory.herokuapp.com/\n\nThe user needs to login first to use the application. If needed, user can register new account.\n\nPlease use the below dummy Email account for logging in for the first time \nEmail : admin@example.com\nPassword: admin\n\nThe application screenshots are available in the screenshots folder .\n\nMost of the REST API ( `/api/v1/login` for example) are secured with JWT Bearer Token. The APIs can be tested with PostMan. The JWT tokens can be obtained by calling the `/api/v1/login` REST API. For subsequent REST API calls, this JWT Token has to be pased.\n\n## Screenshots\n\nPlease see `screenshots` folder for more.\n\n![Product Listing Page](https://github.com/gauravssnl/airbus-inventory/blob/main/screenshots/Screenshot%20from%202021-12-13%2023-36-02.png)\n## Steps\nTo run the application , follow the below steps as needed:\n1. Set the Flask application name environment variable first, by running the below command:\n\n```bash\nexport FLASK_APP=flask_app\n```\n2. Pick desired environemnt configuartion (defualt value is set to  `DevelopmentConfig` ) by setting the below environment variable :\n```bash\nFLASK_CONFIG=production #for production\n```\nChange the value accordingly. Use `testing` for `TestingConfig ` and `development`' for `DevelopmentConfig` .\n\n3. Create Migration repository. If `migrations` folder for DB tables  is not present, we need to initailize flask-migrate scripts which uses Alembic. We can do by running the below command:\n```bash\nflask db init\n``` \n4. Creating Migration scripts. To create an automatic migration script(s), run the blow command and pass your  commit message similar to git commit:\n```bash\nflask db migrate -m \"initial migration\"\n```\n\n5. To run the application in PROD mode, please run the below commands:\n\n```bash\nexport FLASK_APP=flask_app \nexport FLASK_CONFIG=production\nexport FLASK_DEBUG=0\nflask run\n```\n\n6. To run the application in DEBUG + DEV mode, please run the below commands:\n\n```bash\nexport FLASK_APP=flask_app \nexport FLASK_CONFIG=development\nexport FLASK_DEBUG=1   \nflask run\n```\n7. Once the application server is running (on port 5000 for example), we need to call the `/api/v1/login` first to get JWT Bearer Access Token. The JWT token has to be passed for all the protected API calls.\n\n8. APIs realted to Users are avialble at `/api/v1/users`, APIs related to Product Categories are available at `/api/v1/categories` and APIs related to Products are available at `/api/v1/products` .\n\n9. `GET` method is used for fetching the data and id can be passed in the URL path to fetch data with particular Id ( Example : `/api/v1/products/1` ) . If no ID is passed the URL, all records are fetched ( we can also add pagination based on requirements). `POST` is used for new resource creation , `PUT` is used for updating an existing resource and `DELETE`  is used for deletion of any resource. For more API details, please see `app.api` package code.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgauravssnl%2Fairbus-inventory","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgauravssnl%2Fairbus-inventory","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgauravssnl%2Fairbus-inventory/lists"}