{"id":21253642,"url":"https://github.com/roc41d/crowdfunding-app","last_synced_at":"2026-05-09T06:12:41.606Z","repository":{"id":254247635,"uuid":"845353806","full_name":"roc41d/crowdfunding-app","owner":"roc41d","description":"crowdfunding application","archived":false,"fork":false,"pushed_at":"2024-08-22T08:44:55.000Z","size":108,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-01T17:46:59.929Z","etag":null,"topics":["api","laravel","mysql","php","sanctum","sanctum-authentication"],"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/roc41d.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-08-21T04:55:14.000Z","updated_at":"2024-08-22T08:44:58.000Z","dependencies_parsed_at":"2024-08-22T09:50:38.893Z","dependency_job_id":null,"html_url":"https://github.com/roc41d/crowdfunding-app","commit_stats":null,"previous_names":["roc41d/crowdfunding-app"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/roc41d/crowdfunding-app","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roc41d%2Fcrowdfunding-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roc41d%2Fcrowdfunding-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roc41d%2Fcrowdfunding-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roc41d%2Fcrowdfunding-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/roc41d","download_url":"https://codeload.github.com/roc41d/crowdfunding-app/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roc41d%2Fcrowdfunding-app/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32809149,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"online","status_checked_at":"2026-05-09T02:00:06.633Z","response_time":123,"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","laravel","mysql","php","sanctum","sanctum-authentication"],"created_at":"2024-11-21T03:52:21.783Z","updated_at":"2026-05-09T06:12:41.589Z","avatar_url":"https://github.com/roc41d.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Crowdfunding App\nThe Crowdfunding Application is a platform that allows individuals in need to request donations from the community. Anyone interested in donating—whether they are registered or unregistered—can contribute to these donation requests. The application is built using the Laravel framework, with a clear separation of concerns via Service classes, Controllers, and Models. The app supports features such as user registration, authentication, donation creation, and donation transactions. It is containerized using Docker for easy deployment and development.\n\n## Features\n### User Authentication \u0026 Registration:\n - **Authentication:** Managed via Laravel's built-in authentication system (Sanctum).\n - **Protected Features:** Only authenticated users can create and manage their donation requests.\n### Donation Requests:\n - **Create Requests:** Authenticated users can create donation requests with a title, description, and target amount.\n - **Completion:** Once the target amount is reached, the donation request is marked as completed.\n - **List Requests:** Retrieve a paginated list of donation requests with customizable query parameters.\n - **View Request:** Retrieve a single donation request by its ID.\n### Donation Transactions:\n - **Open to All Donors:** Anyone can donate, whether they have an account or not. Donors can choose to provide a name and email or donate anonymously.\n - **Transaction Records:** Each donation transaction records the amount donated and associates it with a specific donation request.\n### Error Handling \u0026 Validation:\n - **Input Validation:** All inputs are validated using Laravel’s request validation, ensuring that the data entered is correct and follows the necessary rules.\n - **Error Handling:** Errors are handled within the service layer using try-catch blocks to manage exceptions gracefully, especially during database interactions.\n\n## Setup Instructions\n### Without Docker\n#### Requirements\n * PHP 8.2 or higher\n * Composer\n * MySQL\n\n#### Steps\n * Clone the repository and navigate to the project directory.\n```\ngit clone git@github.com:roc41d/crowdfunding-app.git\ncd crowdfunding-app\n```\n * Install the dependencies using Composer.\n```\n  composer install\n```\n* Configure Environment Variables\n```\n cp .env.example .env\n```\n* Generate a new application key.\n```\n php artisan key:generate\n```\n* Run Migrations\n```\n php artisan migrate\n```\n* Start the development server.\n```\n php artisan serve\n```\nAccess the api at `http://localhost:8000/api`\n\n### With Docker\n#### Requirements\n * Docker\n * Docker Compose\n\n#### Steps\n* Clone the repository and navigate to the project directory.\n```\n git clone git@github.com:roc41d/crowdfunding-app.git\n cd crowdfunding-app\n```\n* Configure Environment Variables\n```\n cp .env.example .env\n\n DB_CONNECTION=mysql\n DB_HOST=db \u003c-- This is the name of the MySQL service in the docker-compose file\n DB_PORT=3306\n DB_DATABASE=crowdfunding_app\n DB_USERNAME=username\n DB_PASSWORD=passwd\n```\n* Build the Docker containers.\n```\n docker-compose build\n```\n* Start the Docker containers.\n```\n docker-compose up -d\n```\n* Access the app container.\n```\n docker exec -it app bash\n```\n* Install the dependencies using Composer.\n```\n composer install\n```\n* Generate a new application key.\n```\n php artisan key:generate\n```\n* Run Migrations\n```\n php artisan migrate\n```\nAccess the api at `http://localhost:8000/api`\n\n## API Documentation\n\n### Authentication:\n - `POST /api/register`: Register a new user\n```json\n{\n    \"name\": \"John Doe\", \n    \"email\": \"johndoe@email.com\", \n    \"password\": \"12345678\", \n    \"password_confirmation\": \"12345678\"\n}\n```\n - `POST /api/login`: Login a user\n````json\n{\n    \"email\": \"johndoe@email.com\",\n    \"password\": \"12345678\"\n}\n````\n - `POST /api/logout`: Logout a user\n```\nheaders\n  Authorization: Bearer {token}\n```\n\n## Donation Requests:\nAll requests require a valid token in the Authorization header.\n```\nheaders\n  Authorization: Bearer {token}\n```\n - `POST /api/donations`: Create a new donation request (authenticated users only).\n```json\n{\n    \"title\": \"Donation name\", \n    \"description\": \"Donation description\", \n    \"target_amount\": 100000\n}\n```\n - `GET /api/donations`: Retrieve a paginated list of donation requests (with customizable query parameters for page and per_page).\n - `GET /donations/{id}`: Retrieve a single donation request.\n\n## Donation Transactions:\n - `POST /api/donations/{id}/donate`: Make a donation to a specific request, either as a registered user or as a guest (with an option to donate anonymously or provide a donor name and donor email).\n```json\n{\n    \"amount\": 5000,\n    \"donor_name\": \"Mike Doe\",\n    \"donor_email\": \"mikedoe@email.com\"\n}\n```\n\nDemo Link: [Crowdfunding App](http://crowdfunding-api.us-east-1.elasticbeanstalk.com/api)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froc41d%2Fcrowdfunding-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Froc41d%2Fcrowdfunding-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froc41d%2Fcrowdfunding-app/lists"}