diff --git a/README.md b/README.md
index 0287eab..c0a5425 100644
--- a/README.md
+++ b/README.md
@@ -1,13 +1,50 @@
# Electhon - 2023
-#### Team Name -
-#### Problem Statement -
-#### Team Leader Email -
+#### Team Name - HackOverFlow
+#### Problem Statement - How can we increase the participation of urban and youth voters in elections to ensure their involvement in the democratic process?
+#### Team Leader Email - 20eucs018@skcet.ac.in
## A Brief of the Prototype:
What is your solution? and how it works.
+Our application Democratic Desk is a integration of separate application services into
+a single application , which serves as one-end solution for all services.
+We have included two fascinating facts that will inspire voting in order to enhance the
+turnout of urban and young voters.
+Template creation
+Referential programme
+Developing a system for timeslot reservations voting and analysis of line lengths and
+updating estimated wait times.
+
+Additionally, To enhance the registration of the voter identification we have introduced
+the concept of campaigning in colleges.
+Some people, such as those who halted their study after high school or who
+immediately enrolled in higher education overseas, will fail to register their voter
+identification during college elections, thus it is important to prevent situations like this
+from occurring.
+We could implement the idea of pre-registering for the voter id campaign in schools
+to prevent situations like this.
+
## Code Execution Instruction:
*[If your solution is **not** application based, you can ignore this para]
*The Repository must contain your **Execution Plan PDF**.
+
+This app contains two parts, the frontend and the backend.
+
+To start the frontend,
+ - cd frontend
+ - Configure the backend domain in the .env file
+ - run 'npm install'
+ - run 'npm run start' to start the frontend
+
+
+To start the backend,
+ - Install all necessary PHP extensions, composer as well as wkhtmltopdf and imagick extensions.
+ - cd backend
+ - composer install
+ - Configure the credentials in .env file
+ - run 'php artisan migrate --seed' to migrate the databse and seed fake data.
+ - run 'php artisan serve' to start the backend
+
+
diff --git a/TEAM HACKOVERFLOW.pdf b/TEAM HACKOVERFLOW.pdf
new file mode 100644
index 0000000..3482bd5
Binary files /dev/null and b/TEAM HACKOVERFLOW.pdf differ
diff --git a/backend/.env.example b/backend/.env.example
new file mode 100644
index 0000000..478972c
--- /dev/null
+++ b/backend/.env.example
@@ -0,0 +1,58 @@
+APP_NAME=Laravel
+APP_ENV=local
+APP_KEY=
+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=laravel
+DB_USERNAME=root
+DB_PASSWORD=
+
+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=mailpit
+MAIL_PORT=1025
+MAIL_USERNAME=null
+MAIL_PASSWORD=null
+MAIL_ENCRYPTION=null
+MAIL_FROM_ADDRESS="hello@example.com"
+MAIL_FROM_NAME="${APP_NAME}"
+
+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_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}"
diff --git a/backend/.gitattributes b/backend/.gitattributes
new file mode 100644
index 0000000..fcb21d3
--- /dev/null
+++ b/backend/.gitattributes
@@ -0,0 +1,11 @@
+* text=auto eol=lf
+
+*.blade.php diff=html
+*.css diff=css
+*.html diff=html
+*.md diff=markdown
+*.php diff=php
+
+/.github export-ignore
+CHANGELOG.md export-ignore
+.styleci.yml export-ignore
diff --git a/backend/.gitignore b/backend/.gitignore
new file mode 100644
index 0000000..7fe978f
--- /dev/null
+++ b/backend/.gitignore
@@ -0,0 +1,19 @@
+/.phpunit.cache
+/node_modules
+/public/build
+/public/hot
+/public/storage
+/storage/*.key
+/vendor
+.env
+.env.backup
+.env.production
+.phpunit.result.cache
+Homestead.json
+Homestead.yaml
+auth.json
+npm-debug.log
+yarn-error.log
+/.fleet
+/.idea
+/.vscode
diff --git a/backend/README.md b/backend/README.md
new file mode 100644
index 0000000..3ed385a
--- /dev/null
+++ b/backend/README.md
@@ -0,0 +1,66 @@
+
+
+
+
+
+
+
+
+
+## About Laravel
+
+Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel takes the pain out of development by easing common tasks used in many web projects, such as:
+
+- [Simple, fast routing engine](https://laravel.com/docs/routing).
+- [Powerful dependency injection container](https://laravel.com/docs/container).
+- Multiple back-ends for [session](https://laravel.com/docs/session) and [cache](https://laravel.com/docs/cache) storage.
+- Expressive, intuitive [database ORM](https://laravel.com/docs/eloquent).
+- Database agnostic [schema migrations](https://laravel.com/docs/migrations).
+- [Robust background job processing](https://laravel.com/docs/queues).
+- [Real-time event broadcasting](https://laravel.com/docs/broadcasting).
+
+Laravel is accessible, powerful, and provides tools required for large, robust applications.
+
+## Learning Laravel
+
+Laravel has the most extensive and thorough [documentation](https://laravel.com/docs) and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework.
+
+You may also try the [Laravel Bootcamp](https://bootcamp.laravel.com), where you will be guided through building a modern Laravel application from scratch.
+
+If you don't feel like reading, [Laracasts](https://laracasts.com) can help. Laracasts contains over 2000 video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library.
+
+## Laravel Sponsors
+
+We would like to extend our thanks to the following sponsors for funding Laravel development. If you are interested in becoming a sponsor, please visit the Laravel [Patreon page](https://patreon.com/taylorotwell).
+
+### Premium Partners
+
+- **[Vehikl](https://vehikl.com/)**
+- **[Tighten Co.](https://tighten.co)**
+- **[Kirschbaum Development Group](https://kirschbaumdevelopment.com)**
+- **[64 Robots](https://64robots.com)**
+- **[Cubet Techno Labs](https://cubettech.com)**
+- **[Cyber-Duck](https://cyber-duck.co.uk)**
+- **[Many](https://www.many.co.uk)**
+- **[Webdock, Fast VPS Hosting](https://www.webdock.io/en)**
+- **[DevSquad](https://devsquad.com)**
+- **[Curotec](https://www.curotec.com/services/technologies/laravel/)**
+- **[OP.GG](https://op.gg)**
+- **[WebReinvent](https://webreinvent.com/?utm_source=laravel&utm_medium=github&utm_campaign=patreon-sponsors)**
+- **[Lendio](https://lendio.com)**
+
+## Contributing
+
+Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions).
+
+## Code of Conduct
+
+In order to ensure that the Laravel community is welcoming to all, please review and abide by the [Code of Conduct](https://laravel.com/docs/contributions#code-of-conduct).
+
+## Security Vulnerabilities
+
+If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via [taylor@laravel.com](mailto:taylor@laravel.com). All security vulnerabilities will be promptly addressed.
+
+## License
+
+The Laravel framework is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).
diff --git a/backend/app/Console/Kernel.php b/backend/app/Console/Kernel.php
new file mode 100644
index 0000000..e6b9960
--- /dev/null
+++ b/backend/app/Console/Kernel.php
@@ -0,0 +1,27 @@
+command('inspire')->hourly();
+ }
+
+ /**
+ * Register the commands for the application.
+ */
+ protected function commands(): void
+ {
+ $this->load(__DIR__.'/Commands');
+
+ require base_path('routes/console.php');
+ }
+}
diff --git a/backend/app/Exceptions/Handler.php b/backend/app/Exceptions/Handler.php
new file mode 100644
index 0000000..b1c262c
--- /dev/null
+++ b/backend/app/Exceptions/Handler.php
@@ -0,0 +1,48 @@
+, \Psr\Log\LogLevel::*>
+ */
+ protected $levels = [
+ //
+ ];
+
+ /**
+ * A list of the exception types that are not reported.
+ *
+ * @var array>
+ */
+ protected $dontReport = [
+ //
+ ];
+
+ /**
+ * A list of the inputs that are never flashed to the session on validation exceptions.
+ *
+ * @var array
+ */
+ protected $dontFlash = [
+ 'current_password',
+ 'password',
+ 'password_confirmation',
+ ];
+
+ /**
+ * Register the exception handling callbacks for the application.
+ */
+ public function register(): void
+ {
+ $this->reportable(function (Throwable $e) {
+ //
+ });
+ }
+}
diff --git a/backend/app/Http/Controllers/Auth/AdminController.php b/backend/app/Http/Controllers/Auth/AdminController.php
new file mode 100644
index 0000000..a611601
--- /dev/null
+++ b/backend/app/Http/Controllers/Auth/AdminController.php
@@ -0,0 +1,27 @@
+validate([
+ 'email' => 'required|email',
+ 'password' => 'required|string'
+ ]);
+
+ $user = User::where('email', $request->email)->firstOrFail();
+
+ if (Hash::check($request->password, $user->password)) {
+ return ['status' => 'success', 'token' => $user->createToken( 'login_token')->plainTextToken];
+ }
+
+ return response(['status' => 'failed', 'errors' => ['password' => 'Given Password doesn\'t match']], 422);
+ }
+}
diff --git a/backend/app/Http/Controllers/Auth/LoginController.php b/backend/app/Http/Controllers/Auth/LoginController.php
new file mode 100644
index 0000000..c90916c
--- /dev/null
+++ b/backend/app/Http/Controllers/Auth/LoginController.php
@@ -0,0 +1,36 @@
+voter_id)->firstOrFail();
+ $verification_sid = config('app.twilio.verification_sid');
+
+ $verification = $client->verify->v2->services($verification_sid)
+ ->verifications
+ ->create($user->phone, 'sms');
+
+
+// if (!$verification->valid) {
+// return ['status' => 'error', 'errors' => $verification->errors];
+// }
+
+ return ['status' => 'success'];
+ }
+}
diff --git a/backend/app/Http/Controllers/Auth/VerifyController.php b/backend/app/Http/Controllers/Auth/VerifyController.php
new file mode 100644
index 0000000..1d3e0cb
--- /dev/null
+++ b/backend/app/Http/Controllers/Auth/VerifyController.php
@@ -0,0 +1,36 @@
+post('code');
+
+ $sid = config('app.twilio.account_sid');
+ $token = config('app.twilio.auth_token');
+ $client = new Client($sid, $token);
+
+ $user = User::where('voter_id', $request->voter_id)->firstOrFail();
+ $verification_sid = config('app.twilio.verification_sid');
+
+ $verification_check = $client->verify->v2->services($verification_sid)
+ ->verificationChecks
+ ->create(['code' => $code, 'to' => $user->phone]);
+
+ if($verification_check->status === 'approved') {
+ return ['status' => 'success', 'token' => $user->createToken( 'login_token')->plainTextToken];
+ }
+
+ return ['status' => 'failed'];
+ }
+}
diff --git a/backend/app/Http/Controllers/Controller.php b/backend/app/Http/Controllers/Controller.php
new file mode 100644
index 0000000..77ec359
--- /dev/null
+++ b/backend/app/Http/Controllers/Controller.php
@@ -0,0 +1,12 @@
+validate([
+ 'name' => 'required|string',
+ 'address' => 'required|string',
+ 'is_school' => 'required|boolean',
+ 'email' => 'required|email',
+ 'phone' => 'required|string',
+ 'google_sheets_url' => 'required|string',
+ ]);
+
+ Institution::create($request->all() + ['added_by' => auth()->user()->id]);
+
+ return ['status' => 'success'];
+ }
+
+ public function approve(Institution $institution)
+ {
+ $institution->update(['is_approved' => true]);
+
+ //Intimate the institution email
+
+ return ['status' => 'success'];
+ }
+
+ public function reject(Institution $institution)
+ {
+ $institution->delete();
+
+ //Intimate the institution email
+
+ return ['status' => 'success'];
+ }
+
+ public function index()
+ {
+ $colleges = Institution::where('is_approved', true)->where('is_school', false)->get();
+ $schools = Institution::where('is_approved', true)->where('is_school', true)->get();
+ $unapproved = Institution::where('is_approved', false)->get();
+
+ return [
+ 'college' => $colleges,
+ 'school' => $schools,
+ 'unapproved' => $unapproved
+ ];
+ }
+
+ public function count(Institution $institution)
+ {
+ $values = Sheets::spreadsheet($institution->google_sheets_url)
+ ->sheet("A:I")
+ ->all();
+
+ unset($values[0]);
+
+ $count = 0;
+
+ foreach ($values as $row) {
+ if ($row[1] < Carbon::now()->subYear(18)->format('d/m/Y')) {
+ continue;
+ }
+
+ if (Application::where('aadhar_id', $row[2])->exists()) {
+ continue;
+ }
+
+ $count++;
+ }
+
+ return $count;
+ }
+}
diff --git a/backend/app/Http/Controllers/TestController.php b/backend/app/Http/Controllers/TestController.php
new file mode 100644
index 0000000..959f303
--- /dev/null
+++ b/backend/app/Http/Controllers/TestController.php
@@ -0,0 +1,168 @@
+sheet("A:I")
+ ->all();
+
+
+
+ return $values;
+ }
+
+ public function index1()
+ {
+ $getrange = 'A:I';
+ $values = Sheets::spreadsheet('1MikSxYCtDdiu_H9GnIUtBzz8WugnmFoXnCR_U8LtifQ')
+ ->sheet("A:I")
+ ->all();
+
+ $output = [];
+
+ $values = Collection::make($values);
+
+ $values = $values->groupBy(function ($value) {
+ return $value[0];
+ });
+
+
+ $backgroundColor = [
+ 'rgba(255, 99, 132, 0.2)',
+ 'rgba(54, 162, 235, 0.2)',
+ 'rgba(255, 206, 86, 0.2)',
+ 'rgba(75, 192, 192, 0.2)',
+ 'rgba(153, 102, 255, 0.2)',
+ 'rgba(255, 159, 64, 0.2)',
+ ];
+
+ $borderColor = [
+ 'rgba(255, 99, 132, 1)',
+ 'rgba(54, 162, 235, 1)',
+ 'rgba(255, 206, 86, 1)',
+ 'rgba(75, 192, 192, 1)',
+ 'rgba(153, 102, 255, 1)',
+ 'rgba(255, 159, 64, 1)',
+ ];
+
+ $i = 0;
+
+ $sums = Collection::make([]);
+
+ $averages = Collection::make([]);
+
+ $time = Carbon::now()->startOfDay();
+
+ $labels = [];
+
+ while(!$time->isTomorrow()) {
+ $labels[] = $time->toTimeString();
+ $time = $time->addMinutes(30);
+ }
+
+ foreach ($values as $key => $value) {
+ $data = $value->pluck(3);
+ $array = [0];
+
+ $time = Carbon::now()->startOfDay();
+ $index = 0;
+
+ while(!$time->isTomorrow()) {
+
+ $current_sum = 0;
+ $current_count = 0;
+ if ($index !== null){
+ try {
+ $current_ts = Carbon::createFromTimeString($value[$index][1])->format("H:m:s");
+ while ($current_ts > $time->format("H:m:s") && $current_ts < $time->clone()->addMinutes(30)->format("H:m:s")) {
+ $current_sum += $value[$index][3] < 0 ? 0 : $value[$index][3];
+ $current_count ++;
+ $index ++;
+ $current_ts = Carbon::createFromTimeString($value[$index][1])->format("H:m:s");
+ }
+ } catch (\ErrorException $e) {
+ $index = null;
+ }
+ }
+
+ $time = $time->addMinutes(30);
+
+ if ($current_count > 1) {
+ $array[] = $current_sum / $current_count;
+ } else {
+ $array[] = $current_sum;
+ }
+ }
+
+ $output[] = [
+ 'label' => $key,
+ 'data' => $array,
+ 'borderColor'=> $borderColor[$i],
+ 'backgroundColor'=> $backgroundColor[$i],
+ 'largest_usage' => $data->max(),
+ 'average_usage' => $data->avg(),
+ 'total_usage' => $data->sum(),
+ 'peaks' => array_keys($array, $data->max())
+ ];
+
+ $averages->add($data->avg());
+
+ foreach ($array as $inner_key => $item) {
+ $sums[$inner_key] = ($sums[$inner_key] ?? 0) + $item;
+ }
+
+ $i++;
+ }
+
+// $peak_indexes = array_keys($sums->toArray(), $sums->max());
+// $average = $averages->avg();
+
+ return [
+ 'labels' => $labels,
+ 'data' => $output,
+// 'peaks' => $peak_indexes,
+// 'average' => $average,
+ ];
+ }
+
+ public function pdf()
+ {
+ $html = <<<'HTML'
+
+
+
+
+
+ DIGITAL BOOTH SLIP
+
+
+
+
+
This is the digital booth slip of {{ $participant_name }} residing in {{ $team_name }}
+
+ Laravel's robust library of first-party tools and libraries, such as Forge, Vapor, Nova, and Envoyer help you take your projects to the next level. Pair them with powerful open source libraries like Cashier, Dusk, Echo, Horizon, Sanctum, Telescope, and more.
+