Project Shashank
Project Shashank
PROJECT REPORT
CROWD FUNDING
By
Shashank Singh
ECC2214027
413004
Adviser:
Mr. Abhishek Srivastava
DEPARTMENT OF COMPUTERS
May 2025
Project Evaluation
Total:[240]
I hereby declare that the work presented in this Project Report titled” Crowd Funding ”
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
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
Computers, Ewing Christian College, Prayagraj for the award of the degree of Bachelor
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.
S. Content Pg.no.
No.
1. INTRODUCTION 5
2. OBJECTIVE 6
5. SYSTEM ANALYSIS 14
7. SYSTEM DESIGN 17
8. DATABASE DESIGN 20
11. IMPLEMENTATION 48
12 TESTING 61
13. CONCLUSION 66
14. BIBLIOGRAPHY 67
INTRODUCTION
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:
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.
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.
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.
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.
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.
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
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.
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.
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.
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.
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
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
1. Users
2. Campaigns
3. Categories
4. Donations
5. Volunteers
6. Galleries
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
USER
ADMIN
DONOR
MODULE DESCRIPTION
PROJECT MODULE
Home:
About:
Running Events:
Contact us:
Donate:
Enroll for Volunteer:
USER MODULE
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:
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:
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:
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:
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
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
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:
Purpose: Ensures that user profiles are accurate, authentic, and meet the platform’s
standards.
Features:
Purpose: Provides admin with insights into platform performance and user behavior,
supporting data-driven decisions.
Features:
ADMIN ROUTES
Route::group(['prefix' => 'admin'],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');
});
});
VIEW PAGE
HOME VIEW
@extends('layouts.app')
@section('content')
@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>
@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;
$validator = Validator::make($request->all(),[
'email' => 'required|email',
'password' => 'required',
]);
if($validator){
$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'));
}
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'));
}
}
// 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;
$campaign = Campaign::findOrFail($campaignId);
return view("donate_now",compact('campaign'));
}
<?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;
$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>';
}
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;
$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;
if($validator->passes()){
Session::session()->flash('success', 'Your contribution can make people happy, Thanks for your contribution!');
return response()->json([
'status' => true,
'message' => 'Donation successfully'
]);
$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')
]);
}
try {
$payment = $api->payment->fetch($request->razorpay_payment_id);
$payment->capture(['amount' => $payment['amount']]);
AUTHENTICATE
<?php
namespace App\Http\Middleware;
$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;
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;
/**
* 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();
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;
/**
* 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;
DONATION
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
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;
/**
* 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',
];
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
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
2. Integration Testing
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
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
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.
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
7. Performance Testing
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.
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
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/