0% found this document useful (0 votes)
2 views

Project Shashank

The project report titled 'Crowd Funding' by Shashank Singh outlines the development of a web-based platform aimed at connecting individuals and organizations for fundraising purposes. The platform emphasizes transparency, security, and user engagement, allowing users to create campaigns and donors to contribute easily. The report details the project's objectives, system design, and the technologies used, while also highlighting the importance of community-driven support in achieving impactful fundraising outcomes.

Uploaded by

Shashank Singh
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Project Shashank

The project report titled 'Crowd Funding' by Shashank Singh outlines the development of a web-based platform aimed at connecting individuals and organizations for fundraising purposes. The platform emphasizes transparency, security, and user engagement, allowing users to create campaigns and donors to contribute easily. The report details the project's objectives, system design, and the technologies used, while also highlighting the importance of community-driven support in achieving impactful fundraising outcomes.

Uploaded by

Shashank Singh
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 82

Bachelor of Computer Application [B.C.A.

PROJECT REPORT

CROWD FUNDING
By
Shashank Singh
ECC2214027
413004

Adviser:
Mr. Abhishek Srivastava
DEPARTMENT OF COMPUTERS

Ewing Christian College, Prayagraj


Gaughat, Prayagraj Uttar Pradesh: 211003

May 2025
Project Evaluation

1. Project Report [80]

2. Project Demonstration [80]

3. Project Viva [80]

Total:[240]

Internal Examiner External Examiner


Declaration

I hereby declare that the work presented in this Project Report titled” Crowd Funding ”

Submitted to the Department of Computers, Ewing Christian College, Prayagraj in partial

fulfillment of the requirements for the award of the degree of Bachelor of Computer

Application [B.C.A.] is a bonafide record carried out under the supervision of Mr.

Abhishek Srivastava. The contents of this Project Report in full or in parts, have not been

submitted to, and will not be submitted by me to, any other Institute or University in

India or abroad for the award of any degree or diploma.

1. Shashank Singh
413004
ECC2214027 Signature

Date:
Department of Computers
Bachelor of Computer Application[BCA]
Ewing Christian College, Prayagraj

CERTIFICATE

This is to certify that the Project Report titled” Crowd Funding”, Submitted Shashank

Singh Roll Number: 413004 Enrollment No:ECC2214027 to the Department of

Computers, Ewing Christian College, Prayagraj for the award of the degree of Bachelor

of Computer Application [B.C.A.], is a bonafide record of the Project work done by

him/her under my supervision.

Mr. Abhishek Srivastava

Advisor Signature
ACKNOWLEDGEMENTS

First, I would like to express my gratitude to my Mentor, Mr. Abhishek Srivastava, who
was a continual source of inspiration. He pushed me to think about humanity and urged
us to do this project without hesitation. His vast knowledge, extensive experience, and
professional competence enabled us to successfully accomplish this project. This
endeavor would not have been possible without his help and supervision. We could not
have asked for a finer mentor in our studies.
I would like to extend my heartfelt thanks to Mr. Praneet Srivastava and Ms. Sakshi
Agarwal, my professor, for his invaluable guidance, support, and encouragement
throughout this project. His expertise and insights were instrumental in helping me
overcome challenges and successfully complete this work.
I would like to thank Ewing Christian College for providing me with the opportunity to
work on the project (Crowd Funding). Last but not least, I would like to express my
gratitude to my family, siblings, and friends for their invaluable assistance, and I am
deeply grateful to everyone who has contributed to the successful completion of this
project.
ABSTRACT
The Crowd Funding System project is a web-based platform designed to connect
individuals, organizations, and communities to fund diverse causes and projects. This
system allows project creators to present their ideas, specify funding targets, and appeal
to a broad audience for financial support. Contributors can easily browse campaigns,
select causes that resonate with them, and contribute funds through a secure payment
gateway integrated within the platform.

The platform is built to promote transparency, accountability, and accessibility. It


includes an admin portal for overseeing campaigns, managing user data, and generating
reports, as well as a user portal for users to contribute and track their donations. The
website’s design prioritizes a user-friendly interface and a secure backend to ensure
efficient data handling and secure transactions. By leveraging the power of collective
support, this crowd funding website aims to simplify fundraising, empower individuals,
and foster community-driven impact across various sectors.
Table of Contents

S. Content Pg.no.
No.
1. INTRODUCTION 5

2. OBJECTIVE 6

3. ABOUT THE PROJECT 11

4. TECHNOLOGY AND PLATFORM USED 13

5. SYSTEM ANALYSIS 14

7. SYSTEM DESIGN 17

8. DATABASE DESIGN 20

9. DATA FLOW DIAGRAM 24

10. MODULE DESCRIPTION 29

11. IMPLEMENTATION 48

12 TESTING 61

13. CONCLUSION 66

14. BIBLIOGRAPHY 67
INTRODUCTION

"At CROWD FUNDING we believe in the power of community-driven support. Our


platform connects individuals and causes, empowering people to raise funds for social,
environmental, and personal initiatives. With a focus on transparency and impact, we
ensure that every contribution makes a meaningful difference. Together, we can create
lasting change by turning collective efforts into powerful solutions."

It is dedicated to transforming ideas into impactful realities by bridging the gap between
communities and causes. As a leading crowd funding platform, we empower individuals,
non-profits, and innovators to raise funds for initiatives ranging from social welfare,
education, healthcare, and environmental sustainability to personal causes and creative
projects.

Our platform prioritizes transparency, trust, and ease of use, ensuring that fundraisers and
donors alike have a seamless and secure experience. By leveraging the power of
collective support, we enable campaigns to reach their full potential and bring positive
change to those who need it most. At crowd funding we are committed to building a
better future, one contribution at a time."
OBJECTIVE

The main objective of a crowd funding organization is to facilitate the raising of funds
by connecting individuals, groups, or organizations with potential donors or investors.
Crowd funding platforms provide a space where people can support projects, initiatives,
or causes that align with their interests. Key objectives include:

1. Funding Accessibility: Enable individuals or organizations to access financial


support for projects, startups, social causes, or emergencies that may not attract
traditional funding sources like banks or investors.
2. Community Engagement: Allowing a wide audience to contribute to campaigns,
making donors feel involved in the success of a project or cause.
3. Transparency and Trust: Ensure transparency in how funds are used and build trust
between fundraisers and donors by providing clear goals, progress updates, and
accountability.
4. Democratizing Fundraising: Empower anyone, regardless of their background, to
raise money for their ideas or causes, breaking down traditional barriers to funding.

Ultimately, a crowd funding organization aims to create a platform where ideas,


innovations, and causes can thrive through the collective financial support of a broad
community.
SYSTEM DEVELOPMENT LIFE CYCLE (SDLC) MODEL

Iteration 1: Basic Foundation and Core Setup

 Objective: Create a simple, functional core of the system to set up foundational features
for both users and admin.
 Tasks:

 Set up the development environment (Laravel 10, xammp, database setup, deployment).
 Implement basic home page with login and registration for users and admin.
 Create the basic project structure, including tables for users, campaigns, and donations.

 Outcome: The project has a basic structure where users can register and log in, and the
database is set up to store user and campaign data.

Iteration 2: User Module – Campaign Creation and Donations

 Objective: Allow users to create campaigns and make donations to specific campaigns.
 Tasks:

 Build "Create Campaign" functionality with a form and validation to add campaigns to
the database.
 Display campaigns on the homepage and link each campaign to a detailed page with a
donation form.
 Set up a donation feature linked to specific campaigns, saving donation data in the
donation table.

 Outcome: Users can create campaigns and donate to specific ones, establishing the core
purpose of the crowd funding platform.

Iteration 3: Admin Module – Campaign Approval and Management

 Objective: Enable admin to manage campaigns and oversee platform activity.


 Tasks:

 Develop an admin dashboard showing campaign and donation summaries.


 Create a campaign approval process, allowing admin to approve or reject user-
submitted campaigns.
 Add gallery management for campaign images to enhance visual appeal.
 Outcome: Admin can manage and approve campaigns, enhancing control over user-
generated content on the platform.

Iteration 4: User Dashboard and Withdrawal Requests

 Objective: Enhance user experience with a personal dashboard and allow withdrawal
requests for campaigns.
 Tasks:

 Create a user dashboard with summaries of the user’s campaigns, donations, and profile
information.
 Develop a withdrawal request system, where users can request withdrawals for
campaigns they created, which admin must approve.
 Ensure data security by restricting users to only view and manage their own campaigns
and donations.

 Outcome: Users can see a personalized dashboard and request withdrawals, adding
interactivity and control.

Iteration 5: Advanced Admin Functions

 Objective: Provide admin with more control and insights into platform activities.
 Tasks:

 Implement withdrawal log tracking and donation reports for enhanced admin oversight.
 Build a category management feature for admin to categorize campaigns.
 Integrate volunteer management, allowing admin to add and manage volunteers
associated with campaigns.

 Outcome: Admin have access to detailed logs, can categorize campaigns, and manage
volunteer involvement, enhancing operational control.

Iteration 6: Profile Management, and Testing

 Objective: Add user profile features and verification for improved security and
usability.
 Tasks:.
 Allow users to edit their profile and manage account settings from the dashboard.
 Conduct testing on all modules (user and admin), including integration, usability, and
load testing.

 Outcome: The platform gains security with email verification, and users have more
control over their profiles, enhancing the user experience.

Iteration 7: Optimization, Final Testing, and Deployment

 Objective: Prepare the system for deployment with a focus on performance and
security.
 Tasks:

 Optimize database queries and code for faster performance, particularly for campaign
and donation retrieval.
 Perform final user acceptance testing and fix any issues identified.

 Outcome: The platform is fully optimized, secure, and ready for public access.
SIMPLE ITERATIVE MODEL FOR CROWD FUNDING
ABOUT OUR PROJECT

WE ARE IN A MISSION TO HELP HELPLESS


we believe that great ideas and meaningful causes deserve the opportunity to thrive,
regardless of financial barriers. As a leading crowd funding platform, our mission is to
connect passionate individuals, non-profits, startups, and innovators with the support
they need to bring their visions to life. Whether you're launching a new product,
supporting a community cause, or raising funds for personal needs, our platform
empowers you to turn dreams into reality through the power of collective giving.

Why choose us

 Easy Setup: Creating a campaign on our platform is simple and straightforward. With
just a few clicks, fundraisers can start sharing their story and attract donations.

 Wide Reach: Our platform harnesses the power of social media and digital outreach,
allowing fundraisers to reach a broad, global audience.

 Secure Transactions: We take security seriously. All payments on our platform are
encrypted, ensuring that donors and fundraisers can trust their financial information is
safe.

 Supportive Community: We offer a space where backers and campaigners can interact,
providing not just financial support, but encouragement and advocacy for the causes they
believe in.

At CROWD FUNDING we believe in the power of collective action. Together, we can


achieve more—one contribution, one cause, and one community at a time.

WHAT WE ARE DOING


At CROWD FUND ORGANIZATION we are reshaping the way people raise funds by
providing an accessible, transparent, and secure crowd funding platform for individuals,
organizations, and startups. Here’s how we’re making it happen:

1. Creating Opportunities for Fundraisers


We give everyone the opportunity to raise funds for their projects or causes, no matter
how big or small. From nonprofit organizations working on social impact initiatives to
individuals seeking financial assistance for personal goals, we ensure that anyone can
create a campaign and gain visibility. Our platform removes traditional barriers to
fundraising, making it easy for people to share their stories and gather support from a
global community.

2. Connecting Donors with Causes That Matter


We connect donors with causes and projects they care about, providing them with a
simple and transparent way to contribute. our platform offers a diverse range of
campaigns. We make it easy for donors to explore campaigns and see exactly where their
money is going, ensuring they feel confident in their contributions.

3. Empowering Communities Through Collective Action


We believe that small contributions can add up to significant change. By enabling many
people to come together and support a cause, we magnify the impact of each individual
contribution. Through social sharing and digital outreach, we encourage communities to
rally around campaigns and build momentum, turning financial support into powerful
action.

4. Ensuring Transparency and Accountability


Fundraisers are required to provide clear goals, detailed descriptions, and updates about
how the funds will be used. Donors can track the progress of the campaigns they
support and receive updates on how their contributions are making a difference. This
builds trust and ensures accountability, making our platform a reliable space for both
fundraisers and donors.

5. Supporting Innovation and Creativity


We champion creativity by helping innovators and entrepreneurs bring their ideas to life.
Our platform is a launch pad for new products, services, and ventures that solve real-
world problems. By providing startups and creators with a space to raise funds, we give
them the opportunity to connect with early backers who believe in their vision and want
to see it succeed.

6. Providing a Secure and User-Friendly Platform


Our platform is designed to be easy to use for both fundraisers and donors. We’ve
streamlined the process of setting up campaigns, making it simple to share your story and
attract support. At the same time, we ensure that all transactions are secure, using the
latest encryption technologies to protect personal and financial information.

8. Offering Ongoing Support for Campaigners


We don’t just provide a platform; we actively support our fundraisers through every step
of their journey. From guidance on how to craft compelling campaigns to offering tips on
outreach and engagement, we help campaigners maximize their chances of success. Our
dedicated support team is always available to answer questions and provide assistance
throughout the fundraising process.
TECHNOLOGY AND PLATFORM USED

Software Requirements:
 Operating System: Windows 10 or any upgraded version
 Programming language: PHP, HTML, JavaScript, CSS
 Framework: Laravel 10
 IDE: Visual Studio Code
 Web Browser: Chrome or any supported web browser

Hardware Requirements:
 Processor: INTEL i3
 RAM: 4GB
 HDD: 256
SYSTEM ANALYSIS
The system analysis for the Crowd Funding Website project involves examining existing
systems, identifying problems, and defining the proposed solution's requirements,
feasibility, and benefits. This project is designed to bridge the gap between project
creators and potential funders, enabling a streamlined, transparent, and secure platform
for fundraising.

1. Existing System Analysis

Crowd Funding is a popular way to fund various initiatives, ranging from charitable
causes and community projects to startup ventures. However, many existing crowd
funding platforms have limitations, including:

 High Platform Fees: Existing platforms often charge significant processing fees,
reducing the funds received by project creators.
 Limited Customization and Transparency: Some platforms lack customization in
campaign tracking or do not provide full transparency regarding fund allocation and
progress.
 Limited Administrative Control: Administrators have limited tools for monitoring
campaigns or managing users effectively.
 Complex User Experience: Many users find navigating these platforms complex, which
can deter potential contributors.

These issues highlight the need for a customizable, transparent, and user-friendly crowd
funding platform with effective management controls.

2. Proposed System Analysis

The proposed Crowd funding Website is designed to address these limitations by offering
an optimized solution with the following characteristics:
 Enhanced Transparency and Security: The platform will incorporate secure payment
processing and clear fund tracking, providing contributors with confidence in the
process.
 Customizable Campaign Management: Campaign creators can set funding goals,
upload project details, and track contributions through intuitive dashboards.
 Administrative Oversight: A dedicated admin portal will allow administrators to
approve, monitor, and manage campaigns, users, and reports. This oversight ensures that
campaigns meet platform standards and are appropriately represented.
 User-Friendly Interface: The platform will prioritize a clean, accessible interface to
improve user engagement and satisfaction.
 Minimal Fees: The system will be designed to minimize or eliminate processing fees,
ensuring that a larger portion of the funds goes directly to the intended cause.

3. Feasibility Study

 Technical Feasibility: The project will use a PHP-based backend with MySQL for
database management, JavaScript for interactivity, and a secure payment gateway for
transactions. The technologies selected are compatible, widely used, and feasible for the
scope of this project.
 Economic Feasibility: By minimizing additional costs such as high fees, the project
aims to keep development and operational costs low, making it an affordable solution for
both users and administrators.
 Operational Feasibility: The platform’s design is intuitive and easy to use for all levels
of users, making it feasible for widespread adoption. The administrative portal ensures
operational efficiency in campaign management and data handling.

4. Benefits of the Proposed System

 Transparency and Trust: Provides users with detailed information on campaign


progress and fund usage, building trust.
 Accessibility and Usability: A simple and engaging interface encourages more
contributions and repeat usage.
 Effective Fundraising for Creators: Offers a reliable platform for project creators to
reach a larger audience, thereby enhancing fundraising potential.
 Improved Management and Reporting: Enables administrators to monitor and analyze
campaign performance for platform improvements.
SYSTEM DESIGN

SYSTEM ARCHITECTURE (CLIENT-SIDE)


HOME

ADMIN LOGIN USER LOGIN


CREATE CREATE VOLUN USER
DONATIO WITHDR
CATEGOR CAMPAIG
N STATUS TEERS
MANAGE
AW LOGS CREEATE CAMPAIGN
Y N MENT

APPROVE VERIFY
USER USER APPR
CAMPAIG VALID
N USER OVE

DONATIONS

REJE REJE
CT CT

PROFILE

WITHDRAW REQUEST

 Data Entry & Form Handling: Forms on the frontend capture user data (e.g., login
details, campaign donatios) and validate it before sending it to the server. For example,
the donation form validates the amount entered and the campaign ID.
 API Requests: The client uses AJAX or Axios (if using JavaScript or a frontend
framework) to send HTTP requests (GET, POST, PUT, DELETE) to the backend API
endpoints.
 Error Handling & Notifications: Errors returned by the server are handled on the client,
with user-friendly messages displayed for issues like validation errors or permission
restrictions.
SYSTEM ARCHITECTURE (SERVER-SIDE)

ROUTES
ADMIN USER
CATEGORY CONTROLLER CAMPAIGN CONTROLLER

CAMPAIGN CONTROLLER DONATIONS CONTROLLLER

DONATION CONTROLLER PROFILE CONTROLLER

VOLUNTEER CONTROLLER WITHDRAW REQUEST CONTROLLER

USER MANAGEMENT CONTROLLER

WITHDRAW CONTROLLER

 Routing: Laravel routes map incoming HTTP requests to specific controller methods.
For example, a POST /donations/{campaignId}/store route is handled by
the DonationController@store method.
 Request Validation: Before processing, the server validates incoming data to ensure it
meets required criteria (e.g., ensuring that the donation amount is a valid number).

 Business Logic: After validation, the server executes the business logic, such as updating
the campaign's donation record, sending confirmation emails, or handling payment
gateway transactions.
 Database Interaction: The server uses Eloquent ORM in Laravel to interact with the
database. For example, the ContributionController@store method might
create a new Contribution record linked to a specific Campaign.
 Response Formatting: Responses are sent back to the client in a standard format (e.g.,
JSON). For successful operations, the server might send a success message and the
updated campaign information, while errors would include error codes and descriptions.
DATABASE DESIGN
ENTITY RELATIONSHIP COMPONENT

Entities and Attributes

1. Users

 Attributes: id (PK), name, email, password, gender, dob, phone, id_type,


idno, address, image, role, created_at, updated_at
 Relationships:
o Can create campaigns: users table is linked to campaigns through a foreign key
(user_id in campaigns).
o Can contribute to campaigns: Linked to donations through user_id (foreign key
in donations).

2. Campaigns

 Attributes: id (PK), name, description, amount, deadline, status,


user_id (FK), category_id (FK), image, created_at, updated_at
 Relationships:
o Belongs to a user: Campaigns are created by users.
o Has many donations: Linked to donations through campaign_id.
o Belongs to a category: Linked to categories through category_id.

3. Categories

 Attributes: id (PK), name, description, status, created_at,


updated_at
 Relationships:
o Can be associated with many campaigns: Each category can have multiple campaigns
linked via category_id.

4. Donations

 Attributes: id (PK), name, contact, id_type, idno, address, amount,


user_id (FK), campaign_id (FK), status, timestamp
 Relationships:
o Belongs to both users and campaigns:
 Each donation is linked to a specific user (user_id FK) and campaign
(campaign_id FK), establishing a many-to-one relationship with both.

5. Volunteers

 Attributes: id (PK), name, email, phone, occupation, id_type, uid,


address, mother, father, created_at, updated_at
 Relationships:
o Assists with campaigns: Volunteers are involved in the platform but do not directly
interact with donations or campaigns tables.

6. Galleries

 Attributes: id (PK), campaign_id (FK), image, created_at


 Relationships:
o Each gallery is associated with one campaign: campaign_id is a foreign key linking
each gallery entry to a specific campaign.

Other Tables (Supporting Entities)

1. failed_jobs
o Purpose: Stores details on failed queue jobs.
o Note: This is a supporting table for job management.
2. password_reset_tokens
o Purpose: Used for password reset functionality.
o Note: This is a supporting table for authentication.

3. personal_access_tokens
o Purpose: Used for authentication, particularly for API access.
o Note: This table supports secure access, often for authenticated requests.

Relationships

 Users and Campaigns: One-to-Many


o A user can create multiple campaigns, but each campaign is created by a single user.
 Campaigns and Donations: One-to-Many
o Each campaign can have multiple donations, but each donation belongs to a single
campaign.
 Users and Donations: One-to-Many
o Each user can make multiple donations, but each donation is made by a single user.
 Campaigns and Categories: Many-to-One
o Each campaign belongs to a single category, but each category can have multiple
campaigns.
 Campaigns and Galleries: One-to-Many
o Each campaign can have multiple gallery images, but each gallery image belongs to a
single campaign.
ENTITY RELATIONSHIP DIAGRAM
DATA FLOW DIAGRAM (LEVEL 0 - DFD)
DATA FLOW DIAGRAM (LEVEL 1 - DFD)

USER
ADMIN

DONOR
MODULE DESCRIPTION

PROJECT MODULE
Home:

About:
Running Events:

Contact us:
Donate:
Enroll for Volunteer:
USER MODULE

Registration & Login:

 Purpose: Secures access to the platform for new and existing users while facilitating a
smooth onboarding experience.
 Features:

 User Registration: New users can sign up with a detailed form, providing essential
information to create their accounts.
 Email OTP Verification: For additional security, a one-time password (OTP) is sent to
the user’s email to verify their identity and activate the account.
 Login and Authentication: Existing users can log in with secure credentials, with
options for two-factor authentication to enhance security

Dashboard:
 Purpose: Acts as the user’s primary interface for managing their activities on the
platform.
 Features:

 Activity Overview: Displays a summary of the user’s recent actions, such as recent
donations, ongoing campaigns, and updates on projects they’ve supported or created.
 Real-Time Campaign Status: Shows live updates on the progress of campaigns the user
is involved in, such as percentage of funding achieved and recent donor activity.
Campaigns:

 Purpose: Allows users to create ,view and edit campaigns .


 Features:

 Campaign Listing: Displays a searchable and filterable list of users campaigns, enabling
users to find campaigns by campaign name.
 Create Campaign: Allows users to start new campaigns, enabling them to share their
project ideas and raise funds. Users can fill out a form with essential details such as the
campaign title, category, description, target funding amount, and end date.
Donation:
 Purpose: Enables campaign creators to track who has donated to their campaign and view
contributions in real-time.
 Features:

 Donation List: Displays a list of supporters who have contributed to the campaign,
including donor names (if public), donation amounts, and timestamps.
 Anonymous Donations: Indicates if a donation was made anonymously, respecting the
donor's privacy preferences.
 Donation Totals and Progress: Shows cumulative donation amounts, helping campaign
creators gauge progress toward their funding goal.
Withdraw:

 Purpose: Manages the withdrawal of funds by campaign creators, ensuring that funds are
accessed responsibly and transparently.
 Features:

 Request Withdrawal: Allows campaign creators to request withdrawals of funds from


completed and successful campaigns.
 Approval Workflow: Withdrawal requests are reviewed by the admin for approval or
rejection, ensuring compliance with platform policies.
 Status Tracking: Provides creators with real-time updates on the status of their
withdrawal requests, showing whether they are pending, approved, or rejected.
 Transaction Records: Stores details of all past withdrawals, giving creators and admins
a transparent view of funds transferred.
Profile:

 Purpose: Manages user information, preferences, and security settings.


 Features:

 Personal Information Management: Users can view and update their profile details,
including name, contact information, and address.
 Password and Security: Users can change their password, add two-factor
authentication, and manage other security settings for a safer experience.
 Preferences and Settings: Allows users to set preferences, such as receiving campaign
updates, transaction notifications, and email alerts.
ADMIN MODULE

1. Login

 Purpose: Ensures that only authorized administrators have access to the backend
functionalities of the platform.
 Features:

 Secure Authentication: Admins are required to log in using secure credentials.


 Multi-Factor Authentication (Optional): Adds an extra layer of security by requiring
an OTP sent to the admin’s email or phone.
 Role-Based Access: Limits access to specific features based on admin roles (e.g., super
admin, moderator), ensuring sensitive data is only accessible to authorized personnel.
2. Dashboard

 Purpose: Serves as the main control panel, offering a quick overview of platform activity
and performance metrics.
 Features:

 Real-Time Data: Displays current statistics, such as total campaigns, active users, total
funds raised, and pending approvals.
 Key Insights: Highlights recent activities and alerts (e.g., new campaigns submitted for
approval, pending withdrawals).
 Quick Links: Provides shortcuts to frequently used functionalities, like campaign
approval, user management, and report generation.
CREATE CATEGORY:

 Purpose: Allows administrators to manage and organize categories for campaigns,


ensuring that users can easily browse and classify campaigns by type.
 Features:

 Create New Categories: Admins can add new campaign categories, such as “Health,”
“Education,” or “Environment,” providing a structured browsing experience for users.
 Edit and Delete Categories: Enables admins to edit or remove categories, keeping the
platform relevant to changing trends or needs.
 Assign Campaigns to Categories: Admins can review existing campaigns and reassign
them to appropriate categories if misclassified.
 Category Descriptions: Allows the addition of descriptions for each category, helping
users understand what types of campaigns fall under each classification.
Create Campaign and Approve User Campaigns

 Purpose: Allows the admin to create platform-managed campaigns and approve


campaigns submitted by users, ensuring that all campaigns meet platform standards.
 Features:

 Campaign Creation: Admin can directly create official campaigns, adding details like
title, category, funding goal, description, and images.
 Approval Workflow: Displays pending user-submitted campaigns with full details,
allowing admin to review, approve, or reject them.
 Compliance Checks: Ensures campaigns align with the platform’s guidelines (e.g., no
prohibited content), and flags those needing further review.
 Notifications: Sends automated notifications to users when their campaigns are
approved, rejected, or require additional information.
4. Gallery Management

 Purpose: Monitors and manages the visual content associated with campaigns to
maintain a professional and secure environment.
 Features:

 Content Review: Admin can review images and videos uploaded by users, ensuring they
meet the platform’s guidelines.
 Organization Tools: Provides features for categorizing and tagging media, making it
easier for users to search for and browse galleries.
5. Donation Management

 Purpose: Offers a comprehensive view of all donations made across campaigns,


supporting transparency and accountability.
 Features:

 Donation Records: Displays detailed records of each donation, including donor name,
donation amount, campaign name, and date.
 Anonymous Donations: Identifies donations made anonymously, ensuring the admin
respects donor privacy.
 Audit Trail: Keeps a log of donation activity for future reference or auditing purposes,
helping to resolve any disputes.
 Refund Management: Enables admin to issue refunds for specific donations if
necessary.
6. Withdraw Logs

 Purpose: Tracks all fund withdrawal requests submitted by campaign creators, ensuring
funds are handled transparently.
 Features:

 Request Details: Shows withdrawal amount, campaign ID, request date, and current
status (e.g., pending, approved, rejected).
 Approval Process: Allows admin to approve or reject withdrawals, checking for any
suspicious activity or discrepancies.
 Notifications: Sends alerts to campaign creators on the status of their withdrawal
requests, and provides reasons for any rejections.
 Audit Records: Maintains a complete history of all withdrawals for auditing and
reporting.
7. Manage Volunteers

 Purpose: Enables the admin to organize and oversee volunteer contributors for various
campaigns or platform operations.
 Features:

 Volunteer Profiles: Stores information on each volunteer, including contact details,


areas of expertise, and availability.
 Assignment Tools: Allows admin to assign volunteers to specific campaigns or roles,
facilitating coordinated support.
 Activity Tracking: Monitors volunteer contributions, making it easier to recognize
active volunteers and assess the impact of their efforts.
8. Manage and Authorize User Profiles

 Purpose: Ensures that user profiles are accurate, authentic, and meet the platform’s
standards.
 Features:

 Profile Verification: Reviews user-submitted data and documents to verify identity, if


required by platform policies.
 Access Control: Approves, suspends, or deletes user accounts based on behavior,
providing warnings when policy violations occur.
 Role Assignment: Assigns user roles and permissions, such as creating campaigns or
viewing specific reports, ensuring the right access levels.
 Profile Management: Admin can edit user profiles, update contact information, and
make changes to user permissions as necessary.
9. Reports

 Purpose: Provides admin with insights into platform performance and user behavior,
supporting data-driven decisions.
 Features:

 Financial Reports: Generates detailed reports on total funds raised, successful


campaigns, and transaction summaries for transparency.
 User Activity Reports: Shows data on user engagement, campaign participation,
donation trends, and user growth metrics.
 Campaign Performance Analysis: Allows admin to view metrics like campaign success
rates, average donation amounts, and duration-to-funding ratios.
 Exportable Formats: Supports exporting reports in various formats (e.g., PDF, Excel)
for record-keeping or presentations.
 Customizable Filters: Offers filters to view reports based on timeframes, specific
campaigns, or user segments, helping admin focus on relevant data
IMPLEMENTATION
ROUTES
LIBRARY USED IN ROUTES
use App\Http\Controllers\Admin\CampaignController;
use App\Http\Controllers\Admin\CategoryController;
use App\Http\Controllers\Admin\DashboardController;
use App\Http\Controllers\Admin\DonationController as AdminDonationController;
use App\Http\Controllers\Admin\GalleryController;
use App\Http\Controllers\Admin\LoginController as AdminLoginController;
use App\Http\Controllers\Admin\ReportController;
use App\Http\Controllers\Admin\TempImagesController;
use App\Http\Controllers\Admin\UserManagementController;
use App\Http\Controllers\Admin\VolunteerController;
use App\Http\Controllers\Admin\WithdrawLogsController;
use App\Http\Controllers\Auth\LoginController;
use App\Http\Controllers\HomeController;
use App\Http\Controllers\PaymentController;
use App\Http\Controllers\User\CampaignController as UserCampaignController;
use App\Http\Controllers\User\DashboardController as UserDashboardController;
use App\Http\Controllers\User\DonationController;
use App\Http\Controllers\User\GalleryController as UserGalleryController;
use App\Http\Controllers\User\ProfileController;
use App\Http\Controllers\User\WithdrawController;
use Illuminate\Support\Facades\Route;

HOME PAGE ROUTES


Route::controller(HomeController::class)->group(function(){
Route::get('/', 'index')->name('home');
Route::get('/pro', 'program');
Route::get('/elements', 'elements');
Route::get('/events', 'events');
Route::get('/contact', 'contact');
Route::get('/blogs', 'blog');
Route::get('/blog_details', 'blog_details');
Route::get('/about', 'about');
Route::get('/donate_now/{campaign}', 'donate')->name('donate');
Route::post('/donate_now', 'donation_store')->name('donation.store');
Route::get('/volunteer', 'volunteers')->name('home.volunteer');
Route::post('/volunteer', 'volunteer_store')->name('volunteer.store');
});

ADMIN ROUTES
Route::group(['prefix' => 'admin'],function(){

Route::group(['middleware' => 'admin.guest'],function(){


Route::get('/login',[AdminLoginController::class,'index'])->name('admin.login');
Route::post('/authenticate',[AdminLoginController::class,'authenticate'])->name('admin.authenticate');
});

Route::group(['middleware' => 'admin.auth'],function(){

Route::get('/dashboard',[DashboardController::class,'index'])->name('admin.dashboard');
Route::get('/logout',[DashboardController::class,'logout'])->name('admin.logout');

//Category Route
Route::get('/categories',[CategoryController::class,'index'])->name('categories.index');
Route::get('/categories/create',[CategoryController::class,'create'])->name('categories.create');
Route::post('/categories',[CategoryController::class,'store'])->name('categories.store');
Route::get('/categories/{category}/edit',[CategoryController::class,'edit'])->name('categories.edit');
Route::put('/categories/{category}',[CategoryController::class,'update'])->name('categories.update');
Route::delete('/categories/{category}',[CategoryController::class,'destroy'])->name('categories.delete');

//Campaign Route
Route::get('/campaigns',[CampaignController::class,'index'])->name('campaigns.index');
Route::get('/campaigns/create',[CampaignController::class,'create'])->name('campaigns.create');
Route::post('/campaigns',[CampaignController::class,'store'])->name('campaigns.store');
Route::get('/campaigns/{campaign}/edit',[CampaignController::class,'edit'])->name('campaigns.edit');
Route::put('/campaigns/{campaign}',[CampaignController::class,'update'])->name('campaigns.update');
Route::delete('/campaigns/{campaign}',[CampaignController::class,'destroy'])->name('campaigns.delete');

//Gallery Route
Route::get('/galleries',[GalleryController::class,'index'])->name('galleries.index');
Route::get('/galleries/create',[GalleryController::class,'create'])->name('galleries.create');
Route::post('/galleries',[GalleryController::class,'store'])->name('galleries.store');
Route::get('/galleries/{gallery}/edit',[GalleryController::class,'edit'])->name('galleries.edit');
Route::put('/galleries/{gallery}',[GalleryController::class,'update'])->name('galleries.update');
Route::delete('/galleries/{gallery}',[GalleryController::class,'destroy'])->name('galleries.delete');

//Users route
Route::get('/donation',[AdminDonationController::class,'index'])->name('admin.donation');
Route::delete('/donation/{donation}',[GalleryController::class,'destroy'])->name('donation.delete');
//Volunteers route
Route::get('/volunteers',[VolunteerController::class,'index'])->name('volunteers.index');
Route::get('/volunteers/{volunteer}/edit',[VolunteerController::class,'edit'])->name('volunteers.edit');
Route::put('/volunteers/{volunteer}',[VolunteerController::class,'update'])->name('volunteers.update');
Route::delete('/volunteers/{volunteer}',[VolunteerController::class,'destroy'])->name('volunteers.delete');

//Users route
Route::get('/withdrawlogs',[WithdrawLogsController::class,'index'])->name('admin.withdrawlogs');
Route::post('/withdrawlogs/{id}/approve', [WithdrawLogsController::class, 'approve'])-
>name('admin.withdrawlogs.approve');
Route::post('/withdrawlogs/{id}/reject', [WithdrawLogsController::class, 'reject'])->name('admin.withdrawlogs.reject');
Route::get('/withdrawlogs/{id}/edit', [WithdrawLogsController::class, 'edit'])->name('admin.withdrawlogs.edit');
Route::post('/withdrawlogs/{id}/update', [WithdrawLogsController::class, 'update'])->name('admin.withdrawlogs.update');

//Users route
Route::get('/users',[UserManagementController::class,'index'])->name('usermanagement.index');
Route::delete('/users/{user}',[UserManagementController::class,'destroy'])->name('usermanagement.delete');

//Users route
Route::get('/report',[ReportController::class,'index'])->name('report');

});
});

USER ROUTES
Route::group(['middleware' => 'guest'],function(){
Route::get('/register',[LoginController::class,'create'])->name('auth.register');
Route::post('/authentication',[LoginController::class,'register'])->name('register.store');
});
Route::group(['middleware' => 'guest'],function(){
Route::get('/login',[LoginController::class,'index'])->name('login');
Route::post('/authenticate',[LoginController::class,'authenticate'])->name('auth.authenticate');
});
Route::group(['prefix' => 'user'],function(){
Route::group(['middleware' => 'web'],function(){
Route::get('/dashboard',[UserDashboardController::class,'index'])->name('user.dashboard');
Route::get('/logout',[UserDashboardController::class,'logout'])->name('user.logout');

//Campaign Controller
Route::get('/campaigns',[UserCampaignController::class,'index'])->name('campaign.index');
Route::get('/campaigns/create',[UserCampaignController::class,'create'])->name('campaign.create');
Route::post('/campaigns',[UserCampaignController::class,'store'])->name('campaign.store');
Route::get('/campaigns/{campaign}/edit',[UserCampaignController::class,'edit'])->name('campaign.edit');
Route::put('/campaigns/{campaign}',[UserCampaignController::class,'update'])->name('campaign.update');
Route::delete('/campaigns/{campaign}',[UserCampaignController::class,'destroy'])->name('campaign.delete');

//Gallery Route
Route::get('/galleries',[UserGalleryController::class,'index'])->name('usergalleries.index');
Route::get('/galleries/create',[UserGalleryController::class,'create'])->name('usergalleries.create');
Route::post('/galleries',[UserGalleryController::class,'store'])->name('usergalleries.store');
Route::get('/galleries/{gallery}/edit',[UserGalleryController::class,'edit'])->name('usergalleries.edit');
Route::put('/galleries/{gallery}',[UserGalleryController::class,'update'])->name('usergalleries.update');
Route::delete('/galleries/{gallery}',[UserGalleryController::class,'destroy'])->name('usergalleries.delete');

//Profile Route
Route::get('/profile',[ProfileController::class,'index'])->name('user.profile');
Route::get('/profile/{user}/update',[ProfileController::class,'edit'])->name('profile.update');
Route::put('/profile/{user}',[ProfileController::class,'store'])->name('profile.store');

//Donation Route
Route::get('/donations',[DonationController::class,'index'])->name('user.donations');

//Withdraw Request Route


Route::get('/withdraw',[WithdrawController::class,'index'])->name('user.withdraw');
// Route::get('/withdraw/request',[WithdrawController::class,'request'])->name('withdraw.request');
Route::post('/withdraw',[WithdrawController::class,'store'])->name('withdraw.store');

});
});
VIEW PAGE
HOME VIEW
@extends('layouts.app')

@section('content')

<div id="carouselExampleCaptions" class="carousel slide carousel-fade" data-bs-ride="carousel">


</div>
<div class="service-area section-padding30">
</div>
<section class="about-low-area section-padding2">
</section>
<div class="our-cases-area section-padding30">
</div>
<section class="featured-job-area section-padding30 section-bg2" data-background="assets/img/gallery/section_bg03.png">
</section>
<div class="team-area pt-160 pb-160">
</div>
<section class="wantToWork-area ">
/section>
<div class="testimonial-area testimonial-padding">
</div>
<div class="count-down-area pt-25 section-bg" data-background="assets/img/gallery/section_bg02.png">
</div>

@endsection
USER VIEW
@extends('user.layouts.app')

@section('content')
<!-- Content Header (Page header) -->
<section class="content-header">
<div class="container-fluid">
<div class="row mb-2">
<div class="col-sm-6">
<h1>Dashboard</h1>
</div>
<div class="col-sm-6">

</div>
</div>
</div>
<!-- /.container-fluid -->
</section>
<!-- Main content -->
<section class="content">
<div class="container-fluid">
<!-- Small boxes (Stat box) -->
<div class="row">
<div class="col-12 col-sm-6 col-md-4 offset-md-2">
<div class="info-box mb-3">
<span class="info-box-icon bg-warning elevation-1"><i
class="fas fa-flag"></i></span>

<div class="info-box-content">
<span class="info-box-text">Total Campaign</span>
<span class="info-box-number">{{$campaign}}</span>
</div>
<!-- /.info-box-content -->
</div>
<!-- /.info-box -->
</div>
<div class="col-12 col-sm-6 col-md-4">
<div class="info-box mb-3">
<span class="info-box-icon bg-danger elevation-1"><i
class="fas fa-heart"></i></span>

<div class="info-box-content">
<span class="info-box-text">Total Donations</span>
<span class="info-box-number">{{$donation}}</span>
</div>
<!-- /.info-box-content -->
</div>
<!-- /.info-box -->
</div>
<!-- ./col -->
</div>

</div><!-- /.container-fluid -->


</section>
<!-- /.content -->
@endsection

@section('customjs')

<script>
console.log("hello")
</script>

@endsection

ADMIN VIEW
@extends('admin.layouts.app')

@section('content')
<!-- Content Header (Page header) -->
<section class="content-header">
<div class="container-fluid">
<div class="row mb-2">
<div class="col-sm-6">
<h1>Dashboard</h1>
</div>
<div class="col-sm-6">

</div>
</div>
</div>
<!-- /.container-fluid -->
</section>
<!-- Main content -->
<section class="content">
<!-- Default box -->
<div class="container-fluid">
<div class="row">
<div class="col-12 col-sm-6 col-md-4 offset-md-2">
<div class="info-box mb-3">
<span class="info-box-icon bg-success
elevation-1"><i class="fas fa-user"></i></span>
<div class="info-box-content">
<span class="info-box-text">Total
Users</span>
<span class="info-box-
number">{{$user}}</span>
</div>
<!-- /.info-box-content -->
</div>
<!-- /.info-box -->
</div>
<div class="col-12 col-sm-6 col-md-4">
<div class="info-box mb-3">
<span class="info-box-icon bg-info
elevation-1"><i class="fas fa-calendar-week"></i></span>
<div class="info-box-content">
<span class="info-box-text">Total
Donation</span>
<span class="info-box-
number">{{$donor}}</span>
</div>
<!-- /.info-box-content -->
</div>
<!-- /.info-box -->
</div>
<div class="col-12 col-sm-6 col-md-4 offset-md-2">
<div class="info-box mb-3">
<span class="info-box-icon bg-warning
elevation-1"><i class="fas fa-flag"></i></span>
<div class="info-box-content">
<span class="info-box-text">Total
Campaign</span>
<span class="info-box-
number">{{$campaign}}</span>
</div>
<!-- /.info-box-content -->
</div>
<!-- /.info-box -->
</div>
<div class="col-12 col-sm-6 col-md-4">
<div class="info-box mb-3">
<span class="info-box-icon bg-danger
elevation-1"><i class="fas fa-users"></i></span>
<div class="info-box-content">
<span class="info-box-text">Total
Volunteer</span>
<span class="info-box-
number">{{$volunteer}}</span>
</div>
<!-- /.info-box-content -->
</div>
<!-- /.info-box -->
</div>
</div>
<!-- /.card -->
</section>
<!-- /.content -->
@endsection
CONTROLLER
LOGIN AND SIGNUP CONTROLLER
<?php

namespace App\Http\Controllers\Auth;

use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Contracts\Auth\Guard;
use Illuminate\Foundation\Auth\AuthenticatesUsers;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Validator;
use App\Models\User;
use App\Models\EmailVerification;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Mail;
use Illuminate\Support\Facades\Session;

class LoginController extends Controller


{
public function index(){
return view('account.login');
}

public function authenticate(Request $request){

$validator = Validator::make($request->all(),[
'email' => 'required|email',
'password' => 'required',
]);

if($validator){

if(Auth::guard('web')->attempt(['email' => $request->email,'password'=>


$request->password],$request->get('remember'))){

$login = Auth::guard('web')->user();

if ($login->role == 1){
return redirect()->route('user.dashboard');
}
else{
return redirect()->route('login')
->with('error','You are not authorized for user login')
->withInput($request->only('email'));
}

if(Auth::attempt(['email' => $request->email, 'passsword' => $request->password],$request->get('remember'))){


return redirect()->route('customer.dashboard');
}
}

return redirect()->route('login')
->with('error','Either Email/Password is incorrect')
->withInput($request->only('email'));

}
else{
return redirect()->route('login')
->withErrors($validator)
->withInput($request->only('email'));
}
}

public function create(){


return view('account.register');
}
public function register(Request $request){
$validator = Validator::make($request->all(),[
'name' => 'required|min:3',
'email' => 'required|email|unique:users',
'password' => 'required|min:8|confirmed'
]);
if($validator->passes()){

$user = new User();


$user->name = $request->name;
$user->email = $request->email;
$user->phone = $request->phone;
$user->password = Hash::make($request->password);
$user->save();

request()->session()->flash('success', 'You are registered successfully');


return redirect()->route('login');

// return response()->json([
// 'status' => true,
// 'message' => 'Account created successfully'
// ]);

}
else{
return response()->json([
'status' => false,
'errors' => $validator->errors()
]);
}

HOME CONTROLLER
<?php

namespace App\Http\Controllers;

use App\Models\Campaign;
use App\Models\Donation;
use App\Models\TempImage;
use App\Models\Volunteer;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\File;
use Illuminate\Support\Facades\Session;
use Illuminate\Support\Facades\Validator;
use Intervention\Image\ImageManager;
use Intervention\Image\Drivers\Gd\Driver;

class HomeController extends Controller


{
public function index(){
return view("home");
}
public function program(){
return view("program");
}
public function about(){
return view("about");
}
public function blog(){
return view("blog");
}
public function contact(){
return view("contact");
}
public function blog_details(){
return view("blog_details");
}
public function elements(){
return view("elements");
}
public function events(){
return view("events");
}

public function donate( $campaignId){

$campaign = Campaign::findOrFail($campaignId);
return view("donate_now",compact('campaign'));
}

public function donation_store(Request $request){


}

public function volunteers(){


return view("volunteers");
}

public function volunteer_store(Request $request){


}
}
USER DASHBOARD CONTROLLER

<?php

namespace App\Http\Controllers\User;

use App\Http\Controllers\Controller;
use App\Models\Campaign;
use App\Models\Donation;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;

class DashboardController extends Controller


{
public function index(){

$user = Auth::user();
$campaign = Campaign::where('user_id',$user->id)->count();
$campaigns = Campaign::where('user_id',$user->id)->pluck('id')->toArray();
$donation = Donation::whereIn('campaign_id', $campaigns)->count();
$data['campaign'] = $campaign;
$data['donation'] = $donation;
return view('user.dashboard',$data);
// $admin = Auth::guard('auth')->user();
// echo 'Welcome admin'.$admin->name.'<a href="'.route('admin.logout').'">Logout</a>';
}

public function logout(){


Auth::guard('web')->logout();
return redirect()->route('login');
}
}

ADMIN DASHBOARD CONTROLLER


<?php

namespace App\Http\Controllers\Admin;

use App\Http\Controllers\Controller;
use App\Models\Campaign;
use App\Models\Donation;
use App\Models\Volunteer;
use App\Models\User;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;

class DashboardController extends Controller


{
public function index(){
$volunteer = Volunteer::where('status','1')->count();
$donor = Donation::count();
$campaign = Campaign::where('status','1')->count();
$user = User::where('role','1')->count();

$data['campaign'] = $campaign;
$data['volunteer'] = $volunteer;
$data['donor'] = $donor;
$data['user'] = $user;
return view('admin.dashboard',$data);
}
public function logout(){
Auth::guard('admin')->logout();
return redirect()->route('admin.login');
}
}

PAYMENT CONTROLLER
<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use Razorpay\Api\Api;
use App\Models\Donation;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Validator;
use Illuminate\Support\Facades\Session;
use App\Models\Campaign;

class PaymentController extends Controller


{
public function donate($campaignId)
{
$campaign = Campaign::findOrFail($campaignId);
return view('payment.donate', compact('campaign'));
}

public function processPayment(Request $request)


{
// Validate request
$validator = Validator::make($request->all(), [
'campaign_id' => 'required|exists:campaigns,id',
'name' => 'required',
'address' => 'required',
'id_type' => 'required',
'idno' => 'required',
'contact' => 'required',
'amount' => 'required|numeric|min:1',
'transaction_id' => 'required',
]);

if($validator->passes()){

$donation = new Donation();


$donation->campaign_id = $request->campaign_id;
$donation->name = $request->name;
$donation->address = $request->address;
$donation->id_type = $request->id_type;
$donation->idno = $request->idno;
$donation->contact = $request->contact;
$donation->amount = $request->amount;
$donation->transaction_id = $request->transaction_id;
$donation->save();

Session::session()->flash('success', 'Your contribution can make people happy, Thanks for your contribution!');

return response()->json([
'status' => true,
'message' => 'Donation successfully'
]);

$api = new Api(env('RAZORPAY_KEY_ID'), env('RAZORPAY_KEY_SECRET'));

$orderData = [
'receipt' => 'ORD_'.uniqid(),
'amount' => $request->amount * 100, // Amount in paisa
'currency' => 'INR',
'payment_capture' => 1
];

$razorpayOrder = $api->order->create($orderData);

return response()->json([
'order_id' => $razorpayOrder['id'],
'amount' => $orderData['amount'],
'key' => env('RAZORPAY_KEY_ID')
]);
}

public function paymentSuccess(Request $request)


{
$api = new Api(env('RAZORPAY_KEY_ID'), env('RAZORPAY_KEY_SECRET'));

try {
$payment = $api->payment->fetch($request->razorpay_payment_id);
$payment->capture(['amount' => $payment['amount']]);

return redirect()->route('home')->with('success', 'Donation successful!');


} catch (\Exception $e) {
return redirect()->route('payment.fail')->with('error', 'Payment failed. Please try again.');
}
}
public function paymentFail()
{
return view('payment.fail');
}
}
MIDDLEWARE

AUTHENTICATE
<?php

namespace App\Http\Middleware;

use Illuminate\Auth\Middleware\Authenticate as Middleware;


use Illuminate\Http\Request;

class Authenticate extends Middleware


{
/**
* Get the path the user should be redirected to when they are not authenticated.
*/
protected function redirectTo(Request $request): ?string
{
return $request->expectsJson() ? null : route('login');
}

protected function authenticate($request, array $guards)


{
if ($this->auth->guard('web')->check()) {
return $this->auth->shouldUse('web');
}

$this->unauthenticated($request, ['web']);
}
}

REDIRECT IF AUTHENTICATED
<?php

namespace App\Http\Middleware;

use App\Providers\RouteServiceProvider;
use Closure;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Symfony\Component\HttpFoundation\Response;

class RedirectIfAuthenticated
{
/**
* Handle an incoming request.
*
* @param \Closure(\Illuminate\Http\Request): (\Symfony\Component\HttpFoundation\Response) $next
*/
public function handle(Request $request, Closure $next, string ...$guards): Response
{
$guards = empty($guards) ? [null] : $guards;

foreach ($guards as $guard) {


if (Auth::guard($guard)->check()) {
return redirect(RouteServiceProvider::HOME);
}
}
if (Auth::guard('web')->check()) {
return redirect()->route('user.dashboard');
}

return $next($request);
}
}

LOGIN REQUEST
<?php

namespace App\Http\Requests\Auth;

use Illuminate\Auth\Events\Lockout;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\RateLimiter;
use Illuminate\Support\Str;
use Illuminate\Validation\ValidationException;

class LoginRequest extends FormRequest


{
/**
* Determine if the user is authorized to make this request.
*/
public function authorize(): bool
{
return true;
}

/**
* Get the validation rules that apply to the request.
*
* @return array<string, \Illuminate\Contracts\Validation\Rule|array|string>
*/
public function rules(): array
{
return [
'email' => ['required', 'string', 'email'],
'password' => ['required', 'string'],
];
}

/**
* Attempt to authenticate the request's credentials.
*
* @throws \Illuminate\Validation\ValidationException
*/
public function authenticate(): void
{
$this->ensureIsNotRateLimited();

if (! Auth::attempt($this->only('email', 'password'), $this->boolean('remember'))) {


RateLimiter::hit($this->throttleKey());

throw ValidationException::withMessages([
'email' => trans('auth.failed'),
]);
}

RateLimiter::clear($this->throttleKey());
}

/**
* Ensure the login request is not rate limited.
*
* @throws \Illuminate\Validation\ValidationException
*/
public function ensureIsNotRateLimited(): void
{
if (! RateLimiter::tooManyAttempts($this->throttleKey(), 5)) {
return;
}

event(new Lockout($this));

$seconds = RateLimiter::availableIn($this->throttleKey());

throw ValidationException::withMessages([
'email' => trans('auth.throttle', [
'seconds' => $seconds,
'minutes' => ceil($seconds / 60),
]),
]);
}

/**
* Get the rate limiting throttle key for the request.
*/
public function throttleKey(): string
{
return Str::transliterate(Str::lower($this->string('email')).'|'.$this->ip());
}
}

KERNEL
<?php

namespace App\Http;

use Illuminate\Foundation\Http\Kernel as HttpKernel;

class Kernel extends HttpKernel


{
/**
* The application's global HTTP middleware stack.
*
* These middleware are run during every request to your application.
*
* @var array<int, class-string|string>
*/
protected $middleware = [
// \App\Http\Middleware\TrustHosts::class,
\App\Http\Middleware\TrustProxies::class,
\Illuminate\Http\Middleware\HandleCors::class,
\App\Http\Middleware\PreventRequestsDuringMaintenance::class,
\Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
\App\Http\Middleware\TrimStrings::class,
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
];

/**
* The application's route middleware groups.
*
* @var array<string, array<int, class-string|string>>
*/
protected $middlewareGroups = [
'web' => [
\App\Http\Middleware\EncryptCookies::class,
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
\Illuminate\Session\Middleware\StartSession::class,
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
\App\Http\Middleware\VerifyCsrfToken::class,
\Illuminate\Routing\Middleware\SubstituteBindings::class,
],

'api' => [
// \Laravel\Sanctum\Http\Middleware\EnsureFrontendRequestsAreStateful::class,
\Illuminate\Routing\Middleware\ThrottleRequests::class.':api',
\Illuminate\Routing\Middleware\SubstituteBindings::class,
],
];

/**
* The application's middleware aliases.
*
* Aliases may be used instead of class names to conveniently assign middleware to routes and groups.
*
* @var array<string, class-string|string>
*/
protected $middlewareAliases = [
'auth' => \App\Http\Middleware\Authenticate::class,
'admin.auth' => \App\Http\Middleware\AdminAuthenticate::class,
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
'auth.session' => \Illuminate\Session\Middleware\AuthenticateSession::class,
'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,
'can' => \Illuminate\Auth\Middleware\Authorize::class,
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
'admin.guest' => \App\Http\Middleware\AdminRedirectIfAuthenticated::class,
'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class,
'precognitive' => \Illuminate\Foundation\Http\Middleware\HandlePrecognitiveRequests::class,
'signed' => \App\Http\Middleware\ValidateSignature::class,
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,
];
}

ENVIRONMENT (.ENV)
APP_NAME="Crowd Funding"
APP_ENV=production
APP_KEY=base64:mKHA3xexEiPhunZQQ0kPvNuxIHMWlw8zHMXNEXnjz8I=
APP_DEBUG=true
APP_URL=http://localhost

LOG_CHANNEL=stack
LOG_DEPRECATIONS_CHANNEL=null
LOG_LEVEL=debug

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=crowd_fund
DB_USERNAME=root
DB_PASSWORD=

RAZORPAY_KEY_ID=rzp_test_t6IAkxVPJbUiTG
RAZORPAY_KEY_SECRET=hq3GZrvUwxZnaaNJoFvy4VB9

BROADCAST_DRIVER=log
CACHE_DRIVER=file
FILESYSTEM_DISK=local
QUEUE_CONNECTION=sync
SESSION_DRIVER=file
SESSION_LIFETIME=120

MEMCACHED_HOST=127.0.0.1

REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

MAIL_MAILER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
[email protected]
MAIL_PASSWORD=vtqqkwekxroqgoqs
MAIL_ENCRYPTION=TLS
MAIL_FROM_ADDRESS="[email protected]"
MAIL_FROM_NAME="Crowd Funding"

AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=
AWS_USE_PATH_STYLE_ENDPOINT=false

PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_HOST=
PUSHER_PORT=443
PUSHER_SCHEME=https
PUSHER_APP_CLUSTER=mt1

VITE_APP_NAME="${APP_NAME}"
VITE_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
VITE_PUSHER_HOST="${PUSHER_HOST}"
VITE_PUSHER_PORT="${PUSHER_PORT}"
VITE_PUSHER_SCHEME="${PUSHER_SCHEME}"
VITE_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
MODELS

CAMPAIGN
<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class Campaign extends Model


{
use HasFactory;

public function categories()


{
return $this->belongsTo(Category::class);
}

public function donations()


{
return $this->hasMany(Donation::class);
}

public function galleries()


{
return $this->hasMany(Gallery::class);
}

public function user() {


return $this->belongsTo(User::class);
}
}

DONATION
<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class Donation extends Model


{
use HasFactory;

public function campaign()


{
return $this->belongsTo(Campaign::class);
}

public function user() {


return $this->belongsTo(User::class);
}

public static function totalRaisedInMonth($month, $year)


{
return self::whereYear('created_at', $year)
->whereMonth('created_at', $month)
->sum('amount');
}
}

USER
<?php

namespace App\Models;

use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Laravel\Sanctum\HasApiTokens;

class User extends Authenticatable implements MustVerifyEmail


{
use HasApiTokens, HasFactory, Notifiable;

/**
* The attributes that are mass assignable.
*
* @var array<int, string>
*/
protected $fillable = [
'name',
'email',
'password',
];

/**
* The attributes that should be hidden for serialization.
*
* @var array<int, string>
*/
protected $hidden = [
'password',
'remember_token',
];

/**
* The attributes that should be cast.
*
* @var array<string, string>
*/
protected $casts = [
'email_verified_at' => 'datetime',
'password' => 'hashed',
];

public function campaigns() {


return $this->hasMany(Campaign::class);
}

public function donations() {


return $this->hasMany(Donation::class);
}
}
WITHDRAW
<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class Withdraw extends Model


{
use HasFactory;
protected $fillable = [
'user_id',
'campaign_id',
'amount',
'status'
];

public function user()


{
return $this->belongsTo(User::class);
}

public function campaign()


{
return $this->belongsTo(Campaign::class);
}

public function donations()


{
return $this->hasMany(Donation::class);
}
// public function campaigns()
// {
// return $this->hasMany(Campaign::class);
// }

USER FACTORY
<?php

namespace Database\Factories;

use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Str;

/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\User>
*/
class UserFactory extends Factory
{
/**
* The current password being used by the factory.
*/
protected static ?string $password;
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'name' => fake()->name(),
'email' => fake()->unique()->safeEmail(),
'email_verified_at' => now(),
'password' => static::$password ??= Hash::make('password'),
'remember_token' => Str::random(10),
];
}

/**
* Indicate that the model's email address should be unverified.
*/
public function unverified(): static
{
return $this->state(fn (array $attributes) => [
'email_verified_at' => null,
]);
}
}
TESTING

1. Unit Testing

 Objective: Verify individual components (functions, methods) work as expected.


 Key Areas:

 User Authentication: Test login, registration, and OTP verification functions.


 Campaign Creation: Validate input fields and error messages for missing or invalid
data.
 Donation Processing: Check donation submission, correct campaign association, and
data storage.
 Withdraw Request: Ensure withdrawal requests are created with accurate data and
proper status.
 Admin Approvals: Test campaign approval functions, ensuring they change status
correctly and are visible on the front end only when approved.

2. Integration Testing

 Objective: Ensure multiple components work together as expected.


 Key Areas:

 User Module Integration: Test the complete user workflow, from registration to
creating a campaign, viewing donations, and making withdrawal requests.
 Admin Module Integration: Check the admin ability to approve campaigns, review
donations, manage user profiles, and monitor volunteer information.

 Email OTP Verification: Verify that the OTP system sends emails, accepts correct
OTPs, and rejects invalid ones.
 AJAX Form Submissions: Confirm that AJAX-based forms submit data
asynchronously without reloading, and handle errors gracefully.
 Campaigns and Donations: Ensure that users only see their donations, and donations
are linked to the correct campaigns.

3. Database Testing

 Objective: Validate data integrity and performance in the database.


 Key Areas:

 Data Accuracy: Ensure correct relationships between tables, such as users with
campaigns and donations.
 Data Security: Confirm that sensitive information (passwords, emails) is securely stored
(hashed/encrypted) and follows privacy policies.
 Data Constraints: Test foreign key constraints, required fields, and unique constraints
(e.g., unique emails, campaign IDs).
 Performance: Check the speed of complex queries, especially for large data sets in
reports, dashboard stats, and filtering operations.

4. Functional Testing

 Objective: Confirm the application meets all functional requirements.


 Key Areas:

 Registration and Login: Validate form validation, correct error messaging, and
redirection after login.
 Campaign Management: Ensure users can create, edit, and delete campaigns and that
only admin can approve campaigns.
 Donation Flow: Check the donation process for different campaigns, ensuring correct
amounts and associations.
 Profile Management: Verify that users can update profiles and manage settings, and that
admin can view profiles.
 Withdrawal Process: Ensure users can request withdrawals, and admin can approve or
reject them accurately.
 Gallery and Category Management: Confirm that admin can manage galleries and
campaign categories effectively.

5. User Interface (UI) Testing

 Objective: Ensure the application’s UI is user-friendly, consistent, and responsive.


 Key Areas:

 Home Page: Test that campaigns, categories, login/signup buttons, and navigation are
displayed correctly.
 User and Admin Dashboards: Check for correct display of stats, links, and sections in
different screen resolutions.
 Form Usability: Ensure all forms (registration, donation, campaign creation) are visually
clear and properly aligned.
 Responsive Design: Verify that the application functions well on mobile, tablet, and
desktop screens.

6. Security Testing

 Objective: Identify and address security vulnerabilities.


 Key Areas:
 User Authentication: Test for common vulnerabilities (e.g., SQL injection, brute-force
attacks).
 Access Control: Ensure that only authorized users can access or modify certain data
(e.g., only an admin can approve campaigns).
 Data Encryption: Verify that sensitive data (passwords, OTPs) is securely encrypted
both in transit and at rest.
 File Upload Security: If the gallery or profile includes image uploads, ensure that only
safe file types are allowed and scanned.

7. Performance Testing

 Objective: Assess the application’s performance under varying load conditions.


 Key Areas:

 Load Testing: Simulate high traffic on the website to evaluate performance (e.g., high
donation traffic during a popular campaign).
 Stress Testing: Push the system beyond its limits to see how it behaves and where it
fails.
 Database Load: Test how well the database handles high numbers of transactions or
large data sets.

8. User Acceptance Testing (UAT)

 Objective: Verify that the application meets end-user expectations and works as
required.
 Key Areas:
 Real-User Scenarios: Have test users perform real-life tasks like campaign creation,
donation, and profile updates to identify any usability issues.
 Feedback Collection: Collect feedback on the UI, navigation, and functionality,
focusing on ease of use and feature usefulness.

9. Regression Testing

 Objective: Ensure that new updates don’t negatively impact existing functionality.
 Key Areas:

 Re-test all Features: After each update, run tests on previously implemented features to
ensure they still work as expected.
 Database Consistency: Verify that new changes don’t disrupt existing data relationships
or database functionality.
CONCLUSION

Crowd Funding has emerged as a powerful alternative financing method, enabling


individuals, small businesses, and organizations to secure funds outside traditional
financial systems. This report explored the structure, strategies, and challenges associated
with crowd funding, highlighting its transformative potential for democratizing access to
capital and fostering community engagement. The rise of digital platforms has made
crowd funding more accessible than ever, allowing campaigns to reach wider audiences
and generate support from diverse sources.

However, the success of crowd funding relies on careful campaign planning, transparent
communication, and effective platform management. Risks like project failures, lack of
accountability, and regulatory limitations are critical areas that need ongoing attention
and improvement. Platforms and project creators must work collaboratively to build
trust, ensure transparency, and address these challenges to sustain growth and credibility
in this sector.

In conclusion, while crowd funding has shown remarkable growth and proven effective
across various industries, the future of crowd funding will depend on developing robust
policies, enhancing technological tools, and fostering a culture of trust and collaboration.
As this model continues to evolve, it holds significant potential for innovation, economic
inclusivity, and social impact in a rapidly changing financial landscape.
BIBLIOGRAPHY
1. Laravel. (2024). Laravel Documentation. Retrieved from https://laravel.com/docs/10.x
2. Sommerville, I. (2016). Software Engineering. Pearson Education.
3. Mollick, E. (2014). The Dynamics of Crowd funding: An Exploratory Study. Journal
of Business Venturing, 29(1), 1-16.
4. Mozilla Foundation. (2024). AJAX Documentation. Retrieved from
https://developer.mozilla.org/
5. OWASP Foundation. (2024). OWASP Top 10 Security Risks. Retrieved from
https://owasp.org/

You might also like