{"id":22144738,"url":"https://github.com/mohamedsaidsallam/flashcards-api","last_synced_at":"2026-04-08T21:32:27.351Z","repository":{"id":135770803,"uuid":"328649805","full_name":"MohamedSaidSallam/FlashCards-API","owner":"MohamedSaidSallam","description":"API for the Frontend. Allows for Simple CRUD operations of cardpacks.","archived":false,"fork":false,"pushed_at":"2021-05-06T23:35:53.000Z","size":25,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-24T12:19:11.476Z","etag":null,"topics":["docker","docker-compose","express","kubernetes","node","rest-api"],"latest_commit_sha":null,"homepage":"http://flashcards-api.digitalphoenixx.live","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/MohamedSaidSallam.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.MD","contributing":"CONTRIBUTING.md","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":"2021-01-11T12:00:12.000Z","updated_at":"2021-05-06T23:35:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"ade103c0-ad78-490b-9978-ddc406384b9c","html_url":"https://github.com/MohamedSaidSallam/FlashCards-API","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/MohamedSaidSallam/FlashCards-API","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MohamedSaidSallam%2FFlashCards-API","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MohamedSaidSallam%2FFlashCards-API/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MohamedSaidSallam%2FFlashCards-API/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MohamedSaidSallam%2FFlashCards-API/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MohamedSaidSallam","download_url":"https://codeload.github.com/MohamedSaidSallam/FlashCards-API/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MohamedSaidSallam%2FFlashCards-API/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31575567,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"ssl_error","status_checked_at":"2026-04-08T14:31:17.202Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["docker","docker-compose","express","kubernetes","node","rest-api"],"created_at":"2024-12-01T22:31:08.567Z","updated_at":"2026-04-08T21:32:27.334Z","avatar_url":"https://github.com/MohamedSaidSallam.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FlashCards API\n\n[![GitHub Release][github_release_badge]][github_release_link]\n[![License][license-image]][license-url]\n\nAPI for the [Flashcard][github-flashcards] Frontend. Allows for Simple CRUD operations of cardpacks.\n\nDeployed: [flashcards-api.digitalphoenixx.live](flashcards-api.digitalphoenixx.live).\n\nView [Endpoints Docs](./docs/endpoints.md).\n\n## Getting Started\n\nThese instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.\n\n### Prerequisites\n\nTo install the required dependencies:\n\n```sh\nnpm install\n```\n\nduplicate the ``.env.example`` file and rename to ``.env`` and fill in the required fields\n\n| Field Name | Required Value                |\n| ---------- | ----------------------------- |\n| DB_STRING  | MongoDB Connection String     |\n| PORT       | Port Number to run the API on |\n\n### Running\n\nTo Run the API you can either run:\n\n```sh\nnodemon src/app.js\n```\n\nOr use the script in the ``packages.json`` using:\n\n```sh\nnpm run mon\n```\n\n## Deployment\n\nTo deploy the api to a live/production server. You can either use docker, docker-compose or K8s.\n\n### Docker\n\nDuplicate ``.env.example`` file and rename it to ``.env`` and fill in the required fields or pass it through command line arguemnts when running ``docker run``. Change the first part of the tag to your dockerhub id)\n\n```sh\ndocker build -t digitalphoenixx/flashcards-api:latest .\ndocker run -p 8000:8000 digitalphoenixx/flashcards-api:latest\n```\n\nReplace build tag and port used with appropriate values.\n\n### Docker-compose\n\nDuplicate the ``.env`` file and fill in the data. Replace the port number in the ``docker-compose.yml`` file with preferred port. Then run\n\n```sh\ndocker-compose up\n```\n\n### K8s\n\n1) Build the image. (change the first part of the tag to your dockerhub id)\n\n    ```sh\n    docker build -t digitalphoenixx/flashcards-api:latest .\n    ```\n\n1) Change the image name in the ``.k8s/kustomization.yml`` to the tag used in the build step.\n\n1) Change the hostname in the ``.k8s/ingress.yml`` to your domain.\n\n1) Create deployment.\n\n    ```sh\n    kubectl apply -k .k8s/\n    ```\n\n1) Create the secret with the mongo connection string.\n\n    ```sh\n    kubectl create secret generic flashcards-api-secret --from-literal=DB_STRING=\"CONNECTION_STRING_HERE\" -n flashcards\n    ```\n\n1) Check the everything is running, might take a second. Note: Ready is 1/1.\n\n    ``` sh\n    \u003e kubectl get -n flashcards all\n\n    NAME                                             READY   STATUS    RESTARTS   AGE\n    pod/flashcards-api-deployment-79559684df-54d8c   1/1     Running   0          37s\n\n    NAME                             TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)    AGE\n    service/flashcards-api-service   ClusterIP   10.100.135.137   \u003cnone\u003e        8000/TCP   37s\n\n    NAME                                        READY   UP-TO-DATE   AVAILABLE   AGE\n    deployment.apps/flashcards-api-deployment   1/1     1            1           37s\n\n    NAME                                                   DESIRED   CURRENT   READY   AGE\n    replicaset.apps/flashcards-api-deployment-79559684df   1         1         1       37s\n\n    ```\n\n## Built With\n\n* [VS Code](https://code.visualstudio.com/) - Code Editor\n\n## Contributing\n\nPlease read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.\n\n## Versioning\n\nWe use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository][github-tags].\n\n## Authors\n\n* **Mohamed Said Sallam** - Main Dev - [TheDigitalPhoenixX](https://github.com/TheDigitalPhoenixX)\n\nSee also the list of [contributors][github-contributors] who participated in this project and their work in [CONTRIBUTORS.md](CONTRIBUTORS.md).\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details\n\n## Acknowledgments\n\n* [README.md Template](https://gist.github.com/PurpleBooth/109311bb0361f32d87a2)\n\n[license-image]: https://img.shields.io/badge/License-MIT-brightgreen.svg\n[license-url]: https://opensource.org/licenses/MIT\n\n[github_release_badge]: https://img.shields.io/github/v/release/TheDigitalPhoenixX/FlashCards-API.svg?style=flat\u0026include_prereleases\n[github_release_link]: https://github.com/TheDigitalPhoenixX/FlashCards-API/releases\n\n[github-contributors]: https://github.com/TheDigitalPhoenixX/FlashCards-API/contributors\n[github-tags]: https://github.com/TheDigitalPhoenixX/FlashCards-API/tags\n\n[github-flashcards]: https://github.com/TheDigitalPhoenixX/FlashCards-API\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohamedsaidsallam%2Fflashcards-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmohamedsaidsallam%2Fflashcards-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohamedsaidsallam%2Fflashcards-api/lists"}