{"id":19253972,"url":"https://github.com/belchenkov/phpiggy","last_synced_at":"2025-02-23T17:14:35.659Z","repository":{"id":217626674,"uuid":"744387653","full_name":"Belchenkov/phpiggy","owner":"Belchenkov","description":"A PHP application for tracking expenses. (PHP 8, MySQL)","archived":false,"fork":false,"pushed_at":"2024-02-26T07:27:13.000Z","size":239,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-05T07:21:47.725Z","etag":null,"topics":["css3","html5","mysql","pdo","php8","phpdotenv"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Belchenkov.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-01-17T07:40:31.000Z","updated_at":"2024-02-26T07:30:05.000Z","dependencies_parsed_at":"2024-11-09T18:47:32.122Z","dependency_job_id":null,"html_url":"https://github.com/Belchenkov/phpiggy","commit_stats":null,"previous_names":["belchenkov/phpiggy"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Belchenkov%2Fphpiggy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Belchenkov%2Fphpiggy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Belchenkov%2Fphpiggy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Belchenkov%2Fphpiggy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Belchenkov","download_url":"https://codeload.github.com/Belchenkov/phpiggy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240347979,"owners_count":19787237,"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":["css3","html5","mysql","pdo","php8","phpdotenv"],"created_at":"2024-11-09T18:34:04.858Z","updated_at":"2025-02-23T17:14:35.629Z","avatar_url":"https://github.com/Belchenkov.png","language":"PHP","readme":"# PHP IGGY\n\n\u003e  A PHP application for tracking expenses.\n\n![phpiggy](./public/screen.png)\n\n## Usage\n\n### Requirements\n\n- PHP 8.1 or higher\n- MySQL 5.7 or higher\n\n### Installation\n\n1. Clone the repo into your document root (www, htdocs, etc)\n2. Create a database called `phpiggy`\n3. Import the `database.sql` file into your database\n4. Rename `.env.example` to `.env` and update with your credentials\n5. Run `composer install` to set up the autoloading\n6. Set your document root to the `public` directory\n\n### Setting the Document Root\n\nYou will need to set your document root to the `public` directory. Here are some instructions for setting the document root for some popular local development tools:\n\n##### PHP built-in server\n\nIf you are using the PHP built-in server, you can run the following command from the project root:\n\n`php -S localhost:8000 -t public`\n\n## Project Structure and Notes\n\n#### Custom Laravel-like router\n\nCreating a route in `routes.php` looks like this:\n\n`$router-\u003eget('/lisings', 'ListingController@index');`\n\nThis would load the `index` method in the `App/controllers/ListingController.php` file.\n\n#### Authorization Middleware\n\n`$router-\u003eget('/register', 'AuthController@register)-\u003emiddleware(AuthRequiredMiddleware::class)`\n\n#### Public Directory\n\nThis project has a public directory that contains all of the assets like CSS, JS and images. This is where the `index.php` file is located, which is the entry point for the application.\n\nYou will need to set your document root to the `public` directory.\n\n#### Framework Directory\n\nAll of the core files for this project are in the `Framework` directory. This includes the following files:\n\n- **Database.php** - Database connection and query method (PDO)\n- **Router.php** - Router logic\n- **Session.php** - Session logic\n- **Validator.php** - Simple validations for strings, email and matching passwords\n\n#### PSR-4 Autoloading\n\nThis project uses PSR-4 autoloading. All of the classes are loaded in the `composer.json` file:\n\n```json\n \"autoload\": {\n    \"psr-4\": {\n      \"Framework\\\\\": \"Framework/\",\n      \"App\\\\\": \"App/\"\n    }\n  }\n```\n\n#### Namespaces\n\nThis project uses namespaces for all of the classes. Here are the namespaces used:\n\n- **Framework** - All of the core framework classes\n- **App\\Controllers** - All of the controllers\n\n#### App Directory\n\nThe `App` directory contains all of the main application files like controllers, views, etc. Here is the directory structure:\n\n- **controllers/** - Contains all of the controllers including listings, users, home and error\n- **views/** - Contains all of the views\n- **views/partials/** - Contains all of the partial views\n\n#### Other Files\n\n- **/index.php** - Entry point for the application\n- **public/.htaccess** - Handles the URL rewriting\n- **/functions.php** - Contains helper functions\n- **/Routes.php** - Contains all of the routes\n- **composer.json** - Contains the composer dependencies\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbelchenkov%2Fphpiggy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbelchenkov%2Fphpiggy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbelchenkov%2Fphpiggy/lists"}