{"id":22339936,"url":"https://github.com/rafinhaa/ci4-api-secure","last_synced_at":"2026-04-25T16:33:54.553Z","repository":{"id":149505742,"uuid":"396968628","full_name":"rafinhaa/ci4-api-secure","owner":"rafinhaa","description":"To demonstrate a secure API with secure CodeIgniter","archived":false,"fork":false,"pushed_at":"2021-08-19T18:00:15.000Z","size":606,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-26T09:14:28.478Z","etag":null,"topics":["back-end","codeigniter4","jwt","php"],"latest_commit_sha":null,"homepage":"","language":"PHP","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/rafinhaa.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":"2021-08-16T20:54:15.000Z","updated_at":"2023-02-18T18:23:06.000Z","dependencies_parsed_at":"2023-07-03T23:20:18.758Z","dependency_job_id":null,"html_url":"https://github.com/rafinhaa/ci4-api-secure","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rafinhaa/ci4-api-secure","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rafinhaa%2Fci4-api-secure","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rafinhaa%2Fci4-api-secure/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rafinhaa%2Fci4-api-secure/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rafinhaa%2Fci4-api-secure/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rafinhaa","download_url":"https://codeload.github.com/rafinhaa/ci4-api-secure/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rafinhaa%2Fci4-api-secure/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32269462,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-25T09:15:33.318Z","status":"ssl_error","status_checked_at":"2026-04-25T09:15:31.997Z","response_time":59,"last_error":"SSL_read: 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":["back-end","codeigniter4","jwt","php"],"created_at":"2024-12-04T07:09:52.161Z","updated_at":"2026-04-25T16:33:54.536Z","avatar_url":"https://github.com/rafinhaa.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch4 align=\"center\"\u003e\n    \u003cbr\u003e\u003cbr\u003e\n    \u003cp align=\"center\"\u003e\n      \u003ca href=\"#-about\"\u003eAbout\u003c/a\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;|\u0026nbsp;\u0026nbsp;\u0026nbsp;\n      \u003ca href=\"#-technologies\"\u003eTechnologies\u003c/a\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;|\u0026nbsp;\u0026nbsp;\u0026nbsp;\n      \u003ca href=\"#-how-to-run-the-project\"\u003eRun\u003c/a\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;|\u0026nbsp;\u0026nbsp;\u0026nbsp;\n      \u003ca href=\"#-info\"\u003eInfo\u003c/a\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;|\u0026nbsp;\u0026nbsp;\u0026nbsp;\n      \u003ca href=\"#-changelog\"\u003eChangelog\u003c/a\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;|\u0026nbsp;\u0026nbsp;\u0026nbsp;\n      \u003ca href=\"#-license\"\u003eLicense\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/h4\u003e\n\n## 🔖 About\nTo demonstrate a secure API with secure CodeIgniter, I've built an API that will be used in a fictional way to manage the customer database for a company. This database contains the following data about each customer:\n\n- [X] Name\n- [X] Email\n- [X] Amount paid to retain the company’s services (Retainer fee)\n\n### The built API has the following features:\n* Register a new user\n* Authenticate an existing user\n* Add a new client\n* Edit the details of an existing client\n* View all clients\n* View a single client by ID\n* Delete a single client by ID\n\n## 🚀 Technologies\n\n- [PHP](https://php.net/)\n- [CodeIgniter](https://codeigniter.com/)\n- [JWT](https://jwt.io/)\n\n## 🏁 How to run the project\n\n#### Clone the repository\n\n```bash\ngit clone https://github.com/rafinhaa/ci4-api-secure.git\ncd ci4-api-secure\n```\n\n#### Install dependencies\n\n```bash\ncomposer install\n```\n\n#### Create and edit env file\n\n```bash\ncp env .env\nvi .env\n```\n\n#### Set permissions to writable folder\n\n```bash\nchmod -R 777 writable\n```\n\n#### Execute migrations\n\n```bash\nphp spark migrate\n```\n\n#### Execute seeders\n\n```bash\nphp spark db:seed ClientSeeder\n```\n\n## ℹ️ Info\n\n#### Api usage\n##### Register. POST multipart with name, email, password.\nhttp://localhost:8080/auth/register\n\n##### Login. POST multipart with email, password.\nhttp://localhost:8080/auth/register\n\n##### Send the Bearer token with the request\n\n##### Create new client. POST multipart with email and retainer_fee.\nhttp://localhost:8080/client\n\n##### Get all clients. Method GET.\nhttp://localhost:8080/client\n\n##### Get client by id. Method GET.\nhttp://localhost:8080/client/1\n\n##### Update client. POST multipart with name and retainer_fee.\nhttp://localhost:8080/client/1\n\n##### Delete client. Method DELETE\nhttp://localhost:8080/client/1\n\n\n\n#### JWT Secret Key\n\nCreate your own JWT secret key and place it in the .env file in the JWT_SECRET_KEY variable\n\n## 📄 Changelog\n\n[See here](docs/changelog.md)\n\n## 📝 License\n\n[MIT](LICENSE)\n\n**Free Software, Hell Yeah!**","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frafinhaa%2Fci4-api-secure","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frafinhaa%2Fci4-api-secure","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frafinhaa%2Fci4-api-secure/lists"}