├── .gitignore ├── Android App └── E-Voting │ ├── .gitignore │ ├── .idea │ ├── codeStyles │ │ └── Project.xml │ ├── gradle.xml │ ├── misc.xml │ └── runConfigurations.xml │ ├── app │ ├── .gitignore │ ├── build.gradle │ ├── proguard-rules.pro │ └── src │ │ ├── androidTest │ │ └── java │ │ │ └── com │ │ │ └── thebigbusters │ │ │ └── e_voting │ │ │ └── ExampleInstrumentedTest.java │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── thebigbusters │ │ │ │ └── e_voting │ │ │ │ ├── Candidate.java │ │ │ │ ├── CandidateList.java │ │ │ │ ├── Govt.java │ │ │ │ ├── MainActivity.java │ │ │ │ ├── RecyclerItemClickListener.java │ │ │ │ ├── Register.java │ │ │ │ ├── candidatesadapter.java │ │ │ │ ├── live_stats.java │ │ │ │ └── setting.java │ │ └── res │ │ │ ├── drawable-v24 │ │ │ └── ic_launcher_foreground.xml │ │ │ ├── drawable │ │ │ ├── electioncotingslogon.jpg │ │ │ ├── girl.png │ │ │ ├── govtofindia.png │ │ │ ├── ic_add_location_black_24dp.xml │ │ │ ├── ic_email_black_24dp.xml │ │ │ ├── ic_exposure_plus_1_black_24dp.xml │ │ │ ├── ic_home_black_24dp.xml │ │ │ ├── ic_insert_link_black_24dp.xml │ │ │ ├── ic_launcher_background.xml │ │ │ ├── ic_local_phone_black_24dp.xml │ │ │ ├── ic_lock_outline_black_24dp.xml │ │ │ ├── ic_person_black_24dp.xml │ │ │ ├── ic_settings_black_24dp.xml │ │ │ ├── ic_vpn_key_black_24dp.xml │ │ │ ├── nota.png │ │ │ ├── professor.png │ │ │ ├── rounded.xml │ │ │ ├── slogonvoting.jpg │ │ │ ├── teacher.png │ │ │ └── user.png │ │ │ ├── layout │ │ │ ├── activity_candidate_list.xml │ │ │ ├── activity_govt.xml │ │ │ ├── activity_live_stats.xml │ │ │ ├── activity_main.xml │ │ │ ├── activity_register.xml │ │ │ ├── activity_setting.xml │ │ │ └── candiatesview.xml │ │ │ ├── mipmap-anydpi-v26 │ │ │ ├── ic_launcher.xml │ │ │ └── ic_launcher_round.xml │ │ │ ├── mipmap-hdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-mdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ └── values │ │ │ ├── colors.xml │ │ │ ├── strings.xml │ │ │ └── styles.xml │ │ └── test │ │ └── java │ │ └── com │ │ └── thebigbusters │ │ └── e_voting │ │ └── ExampleUnitTest.java │ ├── build.gradle │ ├── gradle │ └── wrapper │ │ └── gradle-wrapper.jar │ ├── gradlew │ └── settings.gradle ├── README.md ├── blockchain-core-backend ├── Pipfile ├── Pipfile.lock ├── Procfile ├── app │ ├── Block.py │ ├── Blockchain.py │ ├── Sample blockchain output.json │ └── main.py ├── runtime.txt └── wsgi.py └── website ├── Pipfile ├── Pipfile.lock ├── Procfile ├── app ├── main.py ├── static │ ├── css │ │ ├── base.css │ │ ├── candidates.css │ │ ├── cast.css │ │ ├── dashboard.css │ │ ├── error.css │ │ ├── index.css │ │ ├── key.css │ │ ├── login.css │ │ ├── register.css │ │ ├── results.css │ │ └── voters.css │ ├── images │ │ ├── 1x │ │ │ ├── Asset 1.png │ │ │ └── alert.png │ │ ├── alert.svg │ │ ├── dash.jpg │ │ ├── favicon.svg │ │ ├── finger.svg │ │ ├── lock.svg │ │ ├── logo.svg │ │ ├── party_logo │ │ │ ├── AAP.png │ │ │ ├── BJD.png │ │ │ ├── BJP.png │ │ │ ├── CPI(M).png │ │ │ ├── CPI.png │ │ │ ├── Congress.png │ │ │ ├── Independent.png │ │ │ ├── NCP.png │ │ │ ├── RJD.png │ │ │ ├── SP.png │ │ │ ├── TDP.png │ │ │ └── TMC.png │ │ ├── profit.svg │ │ └── shield.svg │ └── script │ │ ├── candidates.js │ │ ├── cast.js │ │ ├── dashboard.js │ │ ├── login.js │ │ ├── register.js │ │ └── results.js └── templates │ ├── base.html │ ├── candidates.html │ ├── cast.html │ ├── dashboard.html │ ├── error.html │ ├── index.html │ ├── key.html │ ├── login.html │ ├── register.html │ ├── results.html │ └── voters.html └── wsgi.py /.gitignore: -------------------------------------------------------------------------------- 1 | ###Custom: 2 | config.py 3 | .vscode 4 | 5 | ### Android: 6 | 7 | 8 | # Built application files 9 | *.apk 10 | *.aar 11 | *.ap_ 12 | *.aab 13 | 14 | # Files for the ART/Dalvik VM 15 | *.dex 16 | 17 | # Java class files 18 | *.class 19 | 20 | # Generated files 21 | bin/ 22 | gen/ 23 | out/ 24 | # Uncomment the following line in case you need and you don't have the release build type files in your app 25 | # release/ 26 | 27 | # Gradle files 28 | .gradle/ 29 | build/ 30 | 31 | # Local configuration file (sdk path, etc) 32 | local.properties 33 | 34 | # Proguard folder generated by Eclipse 35 | proguard/ 36 | 37 | # Log Files 38 | *.log 39 | 40 | # Android Studio Navigation editor temp files 41 | .navigation/ 42 | 43 | # Android Studio captures folder 44 | captures/ 45 | 46 | # IntelliJ 47 | *.iml 48 | .idea/workspace.xml 49 | .idea/tasks.xml 50 | .idea/gradle.xml 51 | .idea/assetWizardSettings.xml 52 | .idea/dictionaries 53 | .idea/libraries 54 | # Android Studio 3 in .gitignore file. 55 | .idea/caches 56 | .idea/modules.xml 57 | # Comment next line if keeping position of elements in Navigation Editor is relevant for you 58 | .idea/navEditor.xml 59 | 60 | # Keystore files 61 | # Uncomment the following lines if you do not want to check your keystore files in. 62 | #*.jks 63 | #*.keystore 64 | 65 | # External native build folder generated in Android Studio 2.2 and later 66 | .externalNativeBuild 67 | .cxx/ 68 | 69 | # Google Services (e.g. APIs or Firebase) 70 | # google-services.json 71 | 72 | # Freeline 73 | freeline.py 74 | freeline/ 75 | freeline_project_description.json 76 | 77 | # fastlane 78 | fastlane/report.xml 79 | fastlane/Preview.html 80 | fastlane/screenshots 81 | fastlane/test_output 82 | fastlane/readme.md 83 | 84 | # Version control 85 | vcs.xml 86 | 87 | # lint 88 | lint/intermediates/ 89 | lint/generated/ 90 | lint/outputs/ 91 | lint/tmp/ 92 | # lint/reports/ 93 | 94 | 95 | ### Python: 96 | 97 | 98 | # Byte-compiled / optimized / DLL files 99 | __pycache__/ 100 | *.py[cod] 101 | *$py.class 102 | 103 | # C extensions 104 | *.so 105 | 106 | # Distribution / packaging 107 | .Python 108 | build/ 109 | develop-eggs/ 110 | dist/ 111 | downloads/ 112 | eggs/ 113 | .eggs/ 114 | lib/ 115 | lib64/ 116 | parts/ 117 | sdist/ 118 | var/ 119 | wheels/ 120 | share/python-wheels/ 121 | *.egg-info/ 122 | .installed.cfg 123 | *.egg 124 | MANIFEST 125 | 126 | # PyInstaller 127 | # Usually these files are written by a python script from a template 128 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 129 | *.manifest 130 | *.spec 131 | 132 | # Installer logs 133 | pip-log.txt 134 | pip-delete-this-directory.txt 135 | 136 | # Unit test / coverage reports 137 | htmlcov/ 138 | .tox/ 139 | .nox/ 140 | .coverage 141 | .coverage.* 142 | .cache 143 | nosetests.xml 144 | coverage.xml 145 | *.cover 146 | *.py,cover 147 | .hypothesis/ 148 | .pytest_cache/ 149 | cover/ 150 | 151 | # Translations 152 | *.mo 153 | *.pot 154 | 155 | # Django stuff: 156 | *.log 157 | local_settings.py 158 | db.sqlite3 159 | db.sqlite3-journal 160 | 161 | # Flask stuff: 162 | instance/ 163 | .webassets-cache 164 | 165 | # Scrapy stuff: 166 | .scrapy 167 | 168 | # Sphinx documentation 169 | docs/_build/ 170 | 171 | # PyBuilder 172 | .pybuilder/ 173 | target/ 174 | 175 | # Jupyter Notebook 176 | .ipynb_checkpoints 177 | 178 | # IPython 179 | profile_default/ 180 | ipython_config.py 181 | 182 | # pyenv 183 | # For a library or package, you might want to ignore these files since the code is 184 | # intended to run in multiple environments; otherwise, check them in: 185 | # .python-version 186 | 187 | # pipenv 188 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. 189 | # However, in case of collaboration, if having platform-specific dependencies or dependencies 190 | # having no cross-platform support, pipenv may install dependencies that don't work, or not 191 | # install all needed dependencies. 192 | #Pipfile.lock 193 | 194 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow 195 | __pypackages__/ 196 | 197 | # Celery stuff 198 | celerybeat-schedule 199 | celerybeat.pid 200 | 201 | # SageMath parsed files 202 | *.sage.py 203 | 204 | # Environments 205 | .env 206 | .venv 207 | env/ 208 | venv/ 209 | ENV/ 210 | env.bak/ 211 | venv.bak/ 212 | 213 | # Spyder project settings 214 | .spyderproject 215 | .spyproject 216 | 217 | # Rope project settings 218 | .ropeproject 219 | 220 | # mkdocs documentation 221 | /site 222 | 223 | # mypy 224 | .mypy_cache/ 225 | .dmypy.json 226 | dmypy.json 227 | 228 | # Pyre type checker 229 | .pyre/ 230 | 231 | # pytype static type analyzer 232 | .pytype/ 233 | 234 | # Cython debug symbols 235 | cython_debug/ 236 | 237 | -------------------------------------------------------------------------------- /Android App/E-Voting/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/caches 5 | /.idea/libraries 6 | /.idea/modules.xml 7 | /.idea/workspace.xml 8 | /.idea/navEditor.xml 9 | /.idea/assetWizardSettings.xml 10 | .DS_Store 11 | /build 12 | /captures 13 | .externalNativeBuild 14 | .cxx 15 | -------------------------------------------------------------------------------- /Android App/E-Voting/.idea/codeStyles/Project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | xmlns:android 14 | 15 | ^$ 16 | 17 | 18 | 19 |
20 |
21 | 22 | 23 | 24 | xmlns:.* 25 | 26 | ^$ 27 | 28 | 29 | BY_NAME 30 | 31 |
32 |
33 | 34 | 35 | 36 | .*:id 37 | 38 | http://schemas.android.com/apk/res/android 39 | 40 | 41 | 42 |
43 |
44 | 45 | 46 | 47 | .*:name 48 | 49 | http://schemas.android.com/apk/res/android 50 | 51 | 52 | 53 |
54 |
55 | 56 | 57 | 58 | name 59 | 60 | ^$ 61 | 62 | 63 | 64 |
65 |
66 | 67 | 68 | 69 | style 70 | 71 | ^$ 72 | 73 | 74 | 75 |
76 |
77 | 78 | 79 | 80 | .* 81 | 82 | ^$ 83 | 84 | 85 | BY_NAME 86 | 87 |
88 |
89 | 90 | 91 | 92 | .* 93 | 94 | http://schemas.android.com/apk/res/android 95 | 96 | 97 | ANDROID_ATTRIBUTE_ORDER 98 | 99 |
100 |
101 | 102 | 103 | 104 | .* 105 | 106 | .* 107 | 108 | 109 | BY_NAME 110 | 111 |
112 |
113 |
114 |
115 |
116 |
-------------------------------------------------------------------------------- /Android App/E-Voting/.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 15 | 16 | -------------------------------------------------------------------------------- /Android App/E-Voting/.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 9 | -------------------------------------------------------------------------------- /Android App/E-Voting/.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /Android App/E-Voting/app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /Android App/E-Voting/app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 29 5 | buildToolsVersion "29.0.3" 6 | defaultConfig { 7 | applicationId "com.thebigbusters.e_voting" 8 | minSdkVersion 22 9 | targetSdkVersion 29 10 | versionCode 1 11 | versionName "1.0" 12 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 13 | } 14 | buildTypes { 15 | release { 16 | minifyEnabled false 17 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' 18 | } 19 | } 20 | } 21 | repositories { 22 | maven { url 'https://jitpack.io' } 23 | } 24 | 25 | 26 | dependencies { 27 | implementation fileTree(dir: 'libs', include: ['*.jar']) 28 | implementation 'androidx.appcompat:appcompat:1.1.0' 29 | implementation 'androidx.constraintlayout:constraintlayout:1.1.3' 30 | implementation 'com.google.android.gms:play-services-safetynet:17.0.0' 31 | implementation 'androidx.recyclerview:recyclerview:1.1.0' 32 | implementation "androidx.cardview:cardview:1.0.0" 33 | implementation 'com.github.AnyChart:AnyChart-Android:1.1.2' 34 | testImplementation 'junit:junit:4.12' 35 | implementation 'com.android.volley:volley:1.1.1' 36 | androidTestImplementation 'androidx.test.ext:junit:1.1.0' 37 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1' 38 | } 39 | -------------------------------------------------------------------------------- /Android App/E-Voting/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /Android App/E-Voting/app/src/androidTest/java/com/thebigbusters/e_voting/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.thebigbusters.e_voting; 2 | 3 | import android.content.Context; 4 | 5 | import androidx.test.platform.app.InstrumentationRegistry; 6 | import androidx.test.ext.junit.runners.AndroidJUnit4; 7 | 8 | import org.junit.Test; 9 | import org.junit.runner.RunWith; 10 | 11 | import static org.junit.Assert.*; 12 | 13 | /** 14 | * Instrumented test, which will execute on an Android device. 15 | * 16 | * @see Testing documentation 17 | */ 18 | @RunWith(AndroidJUnit4.class) 19 | public class ExampleInstrumentedTest { 20 | @Test 21 | public void useAppContext() { 22 | // Context of the app under test. 23 | Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); 24 | 25 | assertEquals("com.thebigbusters.e_voting", appContext.getPackageName()); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Android App/E-Voting/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /Android App/E-Voting/app/src/main/java/com/thebigbusters/e_voting/Candidate.java: -------------------------------------------------------------------------------- 1 | package com.thebigbusters.e_voting; 2 | 3 | 4 | public class Candidate { 5 | private int image; 6 | private String name; 7 | private String party; 8 | 9 | public Candidate(int image, String name, String party) { 10 | this.image = image; 11 | this.name = name; 12 | this.party = party; 13 | } 14 | 15 | public int getImage() { 16 | return image; 17 | } 18 | 19 | public String getName() { 20 | return name; 21 | } 22 | 23 | public String getParty() { 24 | return party; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Android App/E-Voting/app/src/main/java/com/thebigbusters/e_voting/CandidateList.java: -------------------------------------------------------------------------------- 1 | package com.thebigbusters.e_voting; 2 | 3 | import android.content.SharedPreferences; 4 | import android.os.Bundle; 5 | import android.util.Log; 6 | import android.view.View; 7 | import android.widget.Button; 8 | import android.widget.Toast; 9 | 10 | import androidx.appcompat.app.AppCompatActivity; 11 | import androidx.recyclerview.widget.LinearLayoutManager; 12 | import androidx.recyclerview.widget.RecyclerView; 13 | 14 | import com.android.volley.Request; 15 | import com.android.volley.RequestQueue; 16 | import com.android.volley.Response; 17 | import com.android.volley.VolleyError; 18 | import com.android.volley.toolbox.StringRequest; 19 | import com.android.volley.toolbox.Volley; 20 | 21 | import java.util.ArrayList; 22 | import java.util.HashMap; 23 | import java.util.Map; 24 | 25 | public class CandidateList extends AppCompatActivity { 26 | RecyclerView candidates; 27 | Button vote; 28 | String name,password,key,aadhar; 29 | ArrayList candidateslist = new ArrayList<>(); 30 | RequestQueue queue; 31 | int selction=0; 32 | SharedPreferences sharedPreferences; 33 | 34 | @Override 35 | protected void onCreate(Bundle savedInstanceState) { 36 | super.onCreate(savedInstanceState); 37 | setContentView(R.layout.activity_candidate_list); 38 | candidates = findViewById(R.id.candidateslist); 39 | loadlist(-1); 40 | vote = findViewById(R.id.vote); 41 | vote.setVisibility(View.GONE); 42 | candidateslist.add(new Candidate(R.drawable.girl, "A", "SAAP")); 43 | candidateslist.add(new Candidate(R.drawable.professor, "B", "DJP")); 44 | candidateslist.add(new Candidate(R.drawable.teacher, "C", "RONGRESS")); 45 | candidateslist.add(new Candidate(R.drawable.user, "D", "INDEPENDENT")); 46 | candidateslist.add(new Candidate(R.drawable.nota, "E", "NOTA")); 47 | queue= Volley.newRequestQueue(getApplicationContext()); 48 | boolean forvoiting = getIntent().getBooleanExtra("voting", false); 49 | sharedPreferences=getSharedPreferences(getString(R.string.pref),MODE_PRIVATE); 50 | 51 | if (forvoiting) { 52 | name=getIntent().getStringExtra("name"); 53 | password=getIntent().getStringExtra("password"); 54 | aadhar=getIntent().getStringExtra("aadhar"); 55 | key=getIntent().getStringExtra("key"); 56 | vote.setVisibility(View.VISIBLE); 57 | candidates.addOnItemTouchListener( 58 | new RecyclerItemClickListener(this, candidates, new RecyclerItemClickListener.OnItemClickListener() { 59 | @Override 60 | public void onItemClick(View view, int position) { 61 | loadlist(position); 62 | } 63 | 64 | @Override 65 | public void onLongItemClick(View view, int position) { 66 | 67 | } 68 | })); 69 | } 70 | 71 | 72 | vote.setOnClickListener(new View.OnClickListener() { 73 | @Override 74 | public void onClick(View v) { 75 | makingvote(sharedPreferences.getString(getString(R.string.block2),"")); 76 | 77 | } 78 | }); 79 | 80 | 81 | } 82 | 83 | private void makingvote(String BASE_URL) { 84 | Toast.makeText(CandidateList.this,""+BASE_URL,Toast.LENGTH_SHORT).show(); 85 | if(BASE_URL.equals("")) { 86 | Toast.makeText(CandidateList.this,"Please check links in settings",Toast.LENGTH_SHORT).show(); 87 | return; 88 | } 89 | 90 | 91 | StringRequest makevote = new StringRequest(Request.Method.POST, BASE_URL + "/cast_vote", new Response.Listener() { 92 | @Override 93 | public void onResponse(String response) { 94 | Log.d("TAG", "onResponse: "+response); 95 | if(response.equals("1")){ 96 | Toast.makeText(CandidateList.this,"Vote Casted successfully",Toast.LENGTH_LONG).show(); 97 | finish(); 98 | }else { 99 | Toast.makeText(CandidateList.this,"Error in casting votes \n" + 100 | "Please check your details",Toast.LENGTH_LONG).show(); 101 | } 102 | 103 | } 104 | }, new Response.ErrorListener() { 105 | @Override 106 | public void onErrorResponse(VolleyError error) { 107 | 108 | } 109 | } 110 | ) { 111 | @Override 112 | protected Map getParams() { 113 | Map params = new HashMap<>(); 114 | params.put("name", name); 115 | params.put("key", key); 116 | params.put("password", password); 117 | params.put("aadhar_id",aadhar); 118 | params.put("candidate_id",(1000001+selction)+""); 119 | return params; 120 | } 121 | }; 122 | 123 | queue.add(makevote); 124 | 125 | } 126 | 127 | private void loadlist(int selction) { 128 | this.selction=selction; 129 | candidates.setLayoutManager(new LinearLayoutManager(this)); 130 | candidates.setAdapter(new candidatesadapter(this, candidateslist, selction)); 131 | candidates.scrollToPosition(selction); 132 | } 133 | } 134 | -------------------------------------------------------------------------------- /Android App/E-Voting/app/src/main/java/com/thebigbusters/e_voting/Govt.java: -------------------------------------------------------------------------------- 1 | package com.thebigbusters.e_voting; 2 | 3 | import androidx.appcompat.app.AppCompatActivity; 4 | 5 | import android.app.DownloadManager; 6 | import android.content.Intent; 7 | import android.content.SharedPreferences; 8 | import android.os.Bundle; 9 | import android.view.View; 10 | import android.widget.Button; 11 | import android.widget.EditText; 12 | 13 | import com.android.volley.RequestQueue; 14 | import com.android.volley.toolbox.Volley; 15 | 16 | public class Govt extends AppCompatActivity { 17 | EditText username,password,aadharnumber,key; 18 | Button vote,liveresult,candiateslist,register; 19 | SharedPreferences sharedPreferences; 20 | 21 | RequestQueue requestQueue; 22 | 23 | @Override 24 | protected void onCreate(Bundle savedInstanceState) { 25 | super.onCreate(savedInstanceState); 26 | setContentView(R.layout.activity_govt); 27 | 28 | username=findViewById(R.id.mainserver); 29 | password=findViewById(R.id.blockchain1); 30 | aadharnumber=findViewById(R.id.blockchain2); 31 | key=findViewById(R.id.blockchain3); 32 | vote=findViewById(R.id.castvote); 33 | liveresult=findViewById(R.id.livestats); 34 | candiateslist=findViewById(R.id.list); 35 | register=findViewById(R.id.register); 36 | sharedPreferences=getSharedPreferences(getString(R.string.pref),MODE_PRIVATE); 37 | key.setText(sharedPreferences.getString(getString(R.string.key),"")); 38 | requestQueue= Volley.newRequestQueue(this); 39 | 40 | 41 | 42 | vote.setOnClickListener(new View.OnClickListener() { 43 | @Override 44 | public void onClick(View v) { 45 | castvote(); 46 | } 47 | }); 48 | 49 | register.setOnClickListener(new View.OnClickListener() { 50 | @Override 51 | public void onClick(View v) { 52 | startActivity(new Intent(Govt.this,Register.class)); 53 | finish(); 54 | } 55 | }); 56 | 57 | candiateslist.setOnClickListener(new View.OnClickListener() { 58 | @Override 59 | public void onClick(View v) { 60 | startActivity(new Intent(Govt.this,CandidateList.class)); 61 | finish(); 62 | } 63 | }); 64 | liveresult.setOnClickListener(new View.OnClickListener() { 65 | @Override 66 | public void onClick(View v) { 67 | startActivity(new Intent(Govt.this,live_stats.class)); 68 | finish(); 69 | } 70 | }); 71 | 72 | } 73 | 74 | 75 | private void castvote(){ 76 | 77 | Intent i =new Intent(Govt.this,CandidateList.class); 78 | i.putExtra("voting", true); 79 | i.putExtra("name",username.getEditableText().toString()); 80 | i.putExtra("password",password.getEditableText().toString()); 81 | i.putExtra("aadhar",aadharnumber.getEditableText().toString()); 82 | i.putExtra("key",key.getEditableText().toString()); 83 | startActivity(i); 84 | finish(); 85 | 86 | } 87 | 88 | 89 | 90 | } 91 | -------------------------------------------------------------------------------- /Android App/E-Voting/app/src/main/java/com/thebigbusters/e_voting/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.thebigbusters.e_voting; 2 | 3 | import androidx.appcompat.app.AppCompatActivity; 4 | 5 | import android.content.Intent; 6 | import android.os.Bundle; 7 | import android.view.View; 8 | import android.widget.Button; 9 | import android.widget.ImageButton; 10 | import android.widget.ImageView; 11 | 12 | public class MainActivity extends AppCompatActivity { 13 | Button register,vote,candiateslist,liveresult; 14 | ImageView set; 15 | @Override 16 | protected void onCreate(Bundle savedInstanceState) { 17 | super.onCreate(savedInstanceState); 18 | setContentView(R.layout.activity_main); 19 | register=findViewById(R.id.register); 20 | vote=findViewById(R.id.vote); 21 | candiateslist=findViewById(R.id.candidateslist); 22 | liveresult=findViewById(R.id.livestats); 23 | set=findViewById(R.id.settingS); 24 | 25 | set.setOnClickListener(new View.OnClickListener() { 26 | @Override 27 | public void onClick(View v) { 28 | startActivity(new Intent(MainActivity.this,setting.class)); 29 | } 30 | }); 31 | 32 | 33 | register.setOnClickListener(new View.OnClickListener() { 34 | @Override 35 | public void onClick(View v) { 36 | startActivity(new Intent(MainActivity.this,Register.class)); 37 | } 38 | }); 39 | 40 | vote.setOnClickListener(new View.OnClickListener() { 41 | @Override 42 | public void onClick(View v) { 43 | startActivity(new Intent(MainActivity.this,Govt.class)); 44 | } 45 | }); 46 | candiateslist.setOnClickListener(new View.OnClickListener() { 47 | @Override 48 | public void onClick(View v) { 49 | startActivity(new Intent(MainActivity.this,CandidateList.class)); 50 | } 51 | }); 52 | liveresult.setOnClickListener(new View.OnClickListener() { 53 | @Override 54 | public void onClick(View v) { 55 | startActivity(new Intent(MainActivity.this,live_stats.class)); 56 | } 57 | }); 58 | 59 | 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /Android App/E-Voting/app/src/main/java/com/thebigbusters/e_voting/RecyclerItemClickListener.java: -------------------------------------------------------------------------------- 1 | package com.thebigbusters.e_voting; 2 | import android.content.Context; 3 | import androidx.recyclerview.widget.RecyclerView; 4 | import android.view.GestureDetector; 5 | import android.view.MotionEvent; 6 | import android.view.View; 7 | 8 | 9 | public class RecyclerItemClickListener implements RecyclerView.OnItemTouchListener { 10 | private OnItemClickListener mListener; 11 | 12 | public interface OnItemClickListener { 13 | public void onItemClick(View view, int position); 14 | 15 | public void onLongItemClick(View view, int position); 16 | } 17 | 18 | GestureDetector mGestureDetector; 19 | 20 | public RecyclerItemClickListener(Context context, final RecyclerView recyclerView, OnItemClickListener listener) { 21 | mListener = listener; 22 | mGestureDetector = new GestureDetector(context, new GestureDetector.SimpleOnGestureListener() { 23 | @Override 24 | public boolean onSingleTapUp(MotionEvent e) { 25 | return true; 26 | } 27 | 28 | @Override 29 | public void onLongPress(MotionEvent e) { 30 | View child = recyclerView.findChildViewUnder(e.getX(), e.getY()); 31 | if (child != null && mListener != null) { 32 | mListener.onLongItemClick(child, recyclerView.getChildAdapterPosition(child)); 33 | } 34 | } 35 | }); 36 | } 37 | 38 | @Override public boolean onInterceptTouchEvent(RecyclerView view, MotionEvent e) { 39 | View childView = view.findChildViewUnder(e.getX(), e.getY()); 40 | if (childView != null && mListener != null && mGestureDetector.onTouchEvent(e)) { 41 | mListener.onItemClick(childView, view.getChildAdapterPosition(childView)); 42 | return true; 43 | } 44 | return false; 45 | } 46 | 47 | @Override public void onTouchEvent(RecyclerView view, MotionEvent motionEvent) { } 48 | 49 | @Override 50 | public void onRequestDisallowInterceptTouchEvent (boolean disallowIntercept){} 51 | } 52 | 53 | -------------------------------------------------------------------------------- /Android App/E-Voting/app/src/main/java/com/thebigbusters/e_voting/Register.java: -------------------------------------------------------------------------------- 1 | package com.thebigbusters.e_voting; 2 | 3 | import androidx.appcompat.app.AppCompatActivity; 4 | 5 | import android.content.Intent; 6 | import android.content.SharedPreferences; 7 | import android.os.Bundle; 8 | import android.util.Log; 9 | import android.view.View; 10 | import android.widget.Button; 11 | import android.widget.DatePicker; 12 | import android.widget.EditText; 13 | import android.widget.Switch; 14 | import android.widget.Toast; 15 | 16 | import com.android.volley.Request; 17 | import com.android.volley.RequestQueue; 18 | import com.android.volley.Response; 19 | import com.android.volley.VolleyError; 20 | import com.android.volley.toolbox.StringRequest; 21 | import com.android.volley.toolbox.Volley; 22 | 23 | import java.util.HashMap; 24 | import java.util.Map; 25 | 26 | public class Register extends AppCompatActivity { 27 | EditText username, password, aadharnumber, contact, email, constituency; 28 | DatePicker datePicker; 29 | Button create; 30 | Switch notarobot; 31 | RequestQueue requestQueue; 32 | String BASE_URL = ""; 33 | SharedPreferences sharedPreferences; 34 | 35 | @Override 36 | protected void onCreate(Bundle savedInstanceState) { 37 | super.onCreate(savedInstanceState); 38 | setContentView(R.layout.activity_register); 39 | username = findViewById(R.id.mainserver); 40 | password = findViewById(R.id.blockchain1); 41 | aadharnumber = findViewById(R.id.blockchain2); 42 | contact = findViewById(R.id.contact); 43 | email = findViewById(R.id.email); 44 | constituency = findViewById(R.id.Constituency); 45 | datePicker = findViewById(R.id.dateofbirth); 46 | create = findViewById(R.id.createuser); 47 | notarobot = findViewById(R.id.notarobot); 48 | requestQueue = Volley.newRequestQueue(this); 49 | sharedPreferences=getSharedPreferences(getString(R.string.pref),MODE_PRIVATE); 50 | BASE_URL=sharedPreferences.getString(getString(R.string.main),""); 51 | create.setOnClickListener(new View.OnClickListener() { 52 | @Override 53 | public void onClick(View v) { 54 | createuser(); 55 | } 56 | }); 57 | 58 | 59 | 60 | } 61 | 62 | 63 | private void createuser() { 64 | if (notarobot.isChecked()) { 65 | if (username.getEditableText().toString().equals("") || password.getEditableText().toString().equals("") || aadharnumber.getEditableText().toString().equals("")) { 66 | Toast.makeText(Register.this, "Fill all the fields", Toast.LENGTH_SHORT).show(); 67 | } else { 68 | 69 | StringRequest makeuser = new StringRequest(Request.Method.POST, BASE_URL + "/create_user", new Response.Listener() { 70 | @Override 71 | public void onResponse(String response) { 72 | if(response.equals("0")){ 73 | Toast.makeText(Register.this,"Please enter the correct information",Toast.LENGTH_LONG).show(); 74 | } 75 | else { 76 | Toast.makeText(Register.this,"Account created,Your key is "+response,Toast.LENGTH_LONG).show(); 77 | sharedPreferences.edit().putString(getString(R.string.key), response).apply(); 78 | 79 | } 80 | finish(); 81 | 82 | } 83 | }, new Response.ErrorListener() { 84 | @Override 85 | public void onErrorResponse(VolleyError error) { 86 | 87 | } 88 | } 89 | ) { 90 | @Override 91 | protected Map getParams() { 92 | Map params = new HashMap<>(); 93 | params.put("name", username.getEditableText().toString()); 94 | params.put("aadhar_id", aadharnumber.getEditableText().toString()); 95 | 96 | int day = datePicker.getDayOfMonth(); 97 | int month = datePicker.getMonth() + 1; 98 | int year = datePicker.getYear(); 99 | 100 | String date=year+"-"+month+"-"+day; 101 | 102 | 103 | params.put("dob", date); 104 | params.put("contact_no", contact.getEditableText().toString()); 105 | params.put("password",password.getEditableText().toString()); 106 | Log.d("TAG", "getParams: "+params); 107 | Log.d("dob", "getParams: "+date); 108 | return params; 109 | } 110 | }; 111 | 112 | 113 | requestQueue.add(makeuser); 114 | 115 | } 116 | 117 | } 118 | else 119 | Toast.makeText(Register.this,"You are a Robot",Toast.LENGTH_LONG).show(); 120 | 121 | } 122 | 123 | 124 | } 125 | -------------------------------------------------------------------------------- /Android App/E-Voting/app/src/main/java/com/thebigbusters/e_voting/candidatesadapter.java: -------------------------------------------------------------------------------- 1 | package com.thebigbusters.e_voting; 2 | 3 | import android.content.Context; 4 | import android.view.LayoutInflater; 5 | import android.view.View; 6 | import android.view.ViewGroup; 7 | import android.widget.ImageView; 8 | import android.widget.RadioButton; 9 | import android.widget.TextView; 10 | 11 | import androidx.annotation.NonNull; 12 | import androidx.cardview.widget.CardView; 13 | import androidx.recyclerview.widget.RecyclerView; 14 | 15 | import java.util.ArrayList; 16 | 17 | public class candidatesadapter extends RecyclerView.Adapter { 18 | 19 | private Context context; 20 | private ArrayList candidateslist; 21 | private int selction; 22 | public candidatesadapter(Context context, ArrayList candidateslist,int selction) { 23 | this.context = context; 24 | this.candidateslist = candidateslist; 25 | this.selction=selction; 26 | } 27 | 28 | @NonNull 29 | @Override 30 | public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { 31 | LayoutInflater inflater=LayoutInflater.from(context); 32 | View v =inflater.inflate(R.layout.candiatesview,null); 33 | return new ViewHolder(v); 34 | } 35 | 36 | @Override 37 | public void onBindViewHolder(@NonNull ViewHolder holder, int position) { 38 | holder.image.setImageDrawable(context.getDrawable(candidateslist.get(position).getImage())); 39 | holder.name.setText(candidateslist.get(position).getName()); 40 | holder.partyname.setText(candidateslist.get(position).getParty()); 41 | if(selction==-1){ 42 | holder.radioButton.setVisibility(View.GONE); 43 | 44 | } 45 | else if(position==selction){ 46 | holder.radioButton.setChecked(true); 47 | holder.cardView.setCardBackgroundColor(context.getResources().getColor(R.color.blue_300)); 48 | } 49 | else { 50 | holder.radioButton.setChecked(false); 51 | holder.cardView.setCardBackgroundColor(context.getResources().getColor(R.color.white)); 52 | } 53 | } 54 | 55 | @Override 56 | public int getItemCount() { 57 | return candidateslist.size(); 58 | } 59 | 60 | 61 | 62 | class ViewHolder extends RecyclerView.ViewHolder{ 63 | TextView name,partyname; 64 | ImageView image; 65 | CardView cardView; 66 | RadioButton radioButton; 67 | public ViewHolder(@NonNull View itemView) { 68 | super(itemView); 69 | name=itemView.findViewById(R.id.name); 70 | partyname=itemView.findViewById(R.id.party); 71 | image=itemView.findViewById(R.id.candidate_profile); 72 | cardView=itemView.findViewById(R.id.cardview); 73 | radioButton=itemView.findViewById(R.id.selction); 74 | } 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /Android App/E-Voting/app/src/main/java/com/thebigbusters/e_voting/live_stats.java: -------------------------------------------------------------------------------- 1 | package com.thebigbusters.e_voting; 2 | 3 | import android.os.Build; 4 | import android.os.Bundle; 5 | import android.util.Log; 6 | import android.widget.TextView; 7 | import android.widget.Toast; 8 | 9 | import androidx.annotation.RequiresApi; 10 | import androidx.appcompat.app.AppCompatActivity; 11 | 12 | import com.android.volley.Request; 13 | import com.android.volley.RequestQueue; 14 | import com.android.volley.Response; 15 | import com.android.volley.VolleyError; 16 | import com.android.volley.toolbox.StringRequest; 17 | import com.android.volley.toolbox.Volley; 18 | import com.anychart.AnyChart; 19 | import com.anychart.AnyChartView; 20 | import com.anychart.chart.common.dataentry.DataEntry; 21 | import com.anychart.chart.common.dataentry.ValueDataEntry; 22 | import com.anychart.chart.common.listener.Event; 23 | import com.anychart.chart.common.listener.ListenersInterface; 24 | import com.anychart.charts.Pie; 25 | import com.anychart.enums.Align; 26 | import com.anychart.enums.LegendLayout; 27 | 28 | import org.json.JSONException; 29 | import org.json.JSONObject; 30 | 31 | import java.util.ArrayList; 32 | import java.util.HashMap; 33 | import java.util.List; 34 | import java.util.Map; 35 | 36 | public class live_stats extends AppCompatActivity { 37 | RequestQueue requestQueue; 38 | AnyChartView anyChartView; 39 | List data = new ArrayList<>(); 40 | @Override 41 | protected void onCreate(Bundle savedInstanceState) { 42 | super.onCreate(savedInstanceState); 43 | setContentView(R.layout.activity_live_stats); 44 | requestQueue= Volley.newRequestQueue(this); 45 | anyChartView= findViewById(R.id.any_chart_view); 46 | anyChartView.setProgressBar(findViewById(R.id.progress_bar)); 47 | makechart(); 48 | // getdata(); 49 | } 50 | 51 | 52 | 53 | private void makechart(){ 54 | Pie pie = AnyChart.pie(); 55 | 56 | pie.setOnClickListener(new ListenersInterface.OnClickListener(new String[]{"x", "value"}) { 57 | @Override 58 | public void onClick(Event event) { 59 | Toast.makeText(live_stats.this, event.getData().get("x") + ":" + event.getData().get("value"), Toast.LENGTH_SHORT).show(); 60 | } 61 | }); 62 | 63 | data.add(new ValueDataEntry("SAAP", 6371664)); 64 | data.add(new ValueDataEntry("RONGRESS", 789622)); 65 | data.add(new ValueDataEntry("DJP", 7216301)); 66 | data.add(new ValueDataEntry("INDEPENDENT", 1486621)); 67 | data.add(new ValueDataEntry("NOTA", 1200000)); 68 | 69 | pie.data(data); 70 | 71 | pie.title("Elections Results"); 72 | 73 | pie.labels().position("outside"); 74 | 75 | pie.legend().title().enabled(true); 76 | pie.legend().title() 77 | .text("Parties") 78 | .padding(0d, 0d, 10d, 0d); 79 | 80 | pie.legend() 81 | .position("center-bottom") 82 | .itemsLayout(LegendLayout.HORIZONTAL) 83 | .align(Align.CENTER); 84 | 85 | anyChartView.setChart(pie); 86 | 87 | } 88 | 89 | 90 | 91 | 92 | 93 | 94 | private void getdata(){ 95 | String BASE_URL=getSharedPreferences(getString(R.string.pref),MODE_PRIVATE).getString(getString(R.string.block2),""); 96 | final StringRequest makevote = new StringRequest(Request.Method.GET, BASE_URL + "/get_result", new Response.Listener() { 97 | @Override 98 | public void onResponse(String response) { 99 | Log.d("TAG", "onResponse: "+response); 100 | try { 101 | JSONObject j=new JSONObject(response); 102 | data.add(new ValueDataEntry("SAAP", (j.getInt("a")))); 103 | data.add(new ValueDataEntry("DJP", (j.getInt("b")))); 104 | data.add(new ValueDataEntry("RONGRESS", (j.getInt("c")))); 105 | data.add(new ValueDataEntry("INDEPENDENT", (j.getInt("d")))); 106 | data.add(new ValueDataEntry("NOTA", (j.getInt("e")))); 107 | makechart(); 108 | 109 | } catch (JSONException e) { 110 | e.printStackTrace(); 111 | } 112 | } 113 | }, new Response.ErrorListener() { 114 | @Override 115 | public void onErrorResponse(VolleyError error) { 116 | 117 | } 118 | } 119 | ); 120 | 121 | requestQueue.add(makevote); 122 | 123 | 124 | } 125 | } 126 | -------------------------------------------------------------------------------- /Android App/E-Voting/app/src/main/java/com/thebigbusters/e_voting/setting.java: -------------------------------------------------------------------------------- 1 | package com.thebigbusters.e_voting; 2 | 3 | import androidx.appcompat.app.AppCompatActivity; 4 | 5 | import android.content.SharedPreferences; 6 | import android.os.Bundle; 7 | import android.view.View; 8 | import android.widget.Button; 9 | import android.widget.EditText; 10 | 11 | public class setting extends AppCompatActivity { 12 | EditText main,block1,block2,block3; 13 | Button save; 14 | SharedPreferences sharedPreferences; 15 | @Override 16 | protected void onCreate(Bundle savedInstanceState) { 17 | super.onCreate(savedInstanceState); 18 | setContentView(R.layout.activity_setting); 19 | main=findViewById(R.id.mainserver); 20 | block1=findViewById(R.id.blockchain1); 21 | block2=findViewById(R.id.blockchain2); 22 | block3=findViewById(R.id.blockchain3); 23 | save=findViewById(R.id.save); 24 | sharedPreferences=getSharedPreferences(getString(R.string.pref),MODE_PRIVATE); 25 | 26 | main.setText(sharedPreferences.getString(getString(R.string.main),"")); 27 | block1.setText(sharedPreferences.getString(getString(R.string.block),"")); 28 | block2.setText(sharedPreferences.getString(getString(R.string.block2),"")); 29 | block3.setText(sharedPreferences.getString(getString(R.string.block3),"")); 30 | 31 | save.setOnClickListener(new View.OnClickListener() { 32 | @Override 33 | public void onClick(View v) { 34 | sharedPreferences.edit().putString(getString(R.string.main),main.getEditableText().toString()).apply(); 35 | sharedPreferences.edit().putString(getString(R.string.block),block1.getEditableText().toString()).apply(); 36 | sharedPreferences.edit().putString(getString(R.string.block2),block2.getEditableText().toString()).apply(); 37 | sharedPreferences.edit().putString(getString(R.string.block3),block3.getEditableText().toString()).apply(); 38 | } 39 | }); 40 | 41 | 42 | 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /Android App/E-Voting/app/src/main/res/drawable-v24/ic_launcher_foreground.xml: -------------------------------------------------------------------------------- 1 | 7 | 12 | 13 | 19 | 22 | 25 | 26 | 27 | 28 | 34 | 35 | -------------------------------------------------------------------------------- /Android App/E-Voting/app/src/main/res/drawable/electioncotingslogon.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Anshit01/e-voting-using-blockchain/1c8dd16c4341eaeb587a4c87f6201b95d97db929/Android App/E-Voting/app/src/main/res/drawable/electioncotingslogon.jpg -------------------------------------------------------------------------------- /Android App/E-Voting/app/src/main/res/drawable/girl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Anshit01/e-voting-using-blockchain/1c8dd16c4341eaeb587a4c87f6201b95d97db929/Android App/E-Voting/app/src/main/res/drawable/girl.png -------------------------------------------------------------------------------- /Android App/E-Voting/app/src/main/res/drawable/govtofindia.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Anshit01/e-voting-using-blockchain/1c8dd16c4341eaeb587a4c87f6201b95d97db929/Android App/E-Voting/app/src/main/res/drawable/govtofindia.png -------------------------------------------------------------------------------- /Android App/E-Voting/app/src/main/res/drawable/ic_add_location_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /Android App/E-Voting/app/src/main/res/drawable/ic_email_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /Android App/E-Voting/app/src/main/res/drawable/ic_exposure_plus_1_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /Android App/E-Voting/app/src/main/res/drawable/ic_home_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /Android App/E-Voting/app/src/main/res/drawable/ic_insert_link_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /Android App/E-Voting/app/src/main/res/drawable/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 10 | 15 | 20 | 25 | 30 | 35 | 40 | 45 | 50 | 55 | 60 | 65 | 70 | 75 | 80 | 85 | 90 | 95 | 100 | 105 | 110 | 115 | 120 | 125 | 130 | 135 | 140 | 145 | 150 | 155 | 160 | 165 | 170 | 171 | -------------------------------------------------------------------------------- /Android App/E-Voting/app/src/main/res/drawable/ic_local_phone_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /Android App/E-Voting/app/src/main/res/drawable/ic_lock_outline_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /Android App/E-Voting/app/src/main/res/drawable/ic_person_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /Android App/E-Voting/app/src/main/res/drawable/ic_settings_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /Android App/E-Voting/app/src/main/res/drawable/ic_vpn_key_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /Android App/E-Voting/app/src/main/res/drawable/nota.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Anshit01/e-voting-using-blockchain/1c8dd16c4341eaeb587a4c87f6201b95d97db929/Android App/E-Voting/app/src/main/res/drawable/nota.png -------------------------------------------------------------------------------- /Android App/E-Voting/app/src/main/res/drawable/professor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Anshit01/e-voting-using-blockchain/1c8dd16c4341eaeb587a4c87f6201b95d97db929/Android App/E-Voting/app/src/main/res/drawable/professor.png -------------------------------------------------------------------------------- /Android App/E-Voting/app/src/main/res/drawable/rounded.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 7 | 9 | -------------------------------------------------------------------------------- /Android App/E-Voting/app/src/main/res/drawable/slogonvoting.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Anshit01/e-voting-using-blockchain/1c8dd16c4341eaeb587a4c87f6201b95d97db929/Android App/E-Voting/app/src/main/res/drawable/slogonvoting.jpg -------------------------------------------------------------------------------- /Android App/E-Voting/app/src/main/res/drawable/teacher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Anshit01/e-voting-using-blockchain/1c8dd16c4341eaeb587a4c87f6201b95d97db929/Android App/E-Voting/app/src/main/res/drawable/teacher.png -------------------------------------------------------------------------------- /Android App/E-Voting/app/src/main/res/drawable/user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Anshit01/e-voting-using-blockchain/1c8dd16c4341eaeb587a4c87f6201b95d97db929/Android App/E-Voting/app/src/main/res/drawable/user.png -------------------------------------------------------------------------------- /Android App/E-Voting/app/src/main/res/layout/activity_candidate_list.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 17 | 18 | 32 | 40 | 41 | 27 | 28 | Home 29 | 30 | 55 | 56 | 57 | 58 | {% block content %} {% endblock %} 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /website/app/templates/candidates.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | {% block title %}Candidate List{% endblock %} 3 | 4 | {% block custom_css %} 5 | 6 | 7 | 8 | 9 | 10 | {% endblock %} 11 | 12 | {% block content %} 13 | 14 |
15 | 16 |
17 | 18 |
19 | 20 |

Candidate List


21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | {% for i in range(candidateList|length) %} 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 65 | 66 | {% endfor %} 67 | 68 | 69 | 70 |
Sr.No.NameParty
{{ i+1 }}{{ candidateList[i]['name'] }}{{ candidateList[i]['party'] }}
71 |
72 |
73 | 74 |
75 | 76 |
77 | 78 | {% endblock %} 79 | -------------------------------------------------------------------------------- /website/app/templates/cast.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | {% block title %}Cast Vote{% endblock %} 3 | 4 | {% block custom_css %} 5 | 6 | 7 | 8 | 9 | {% endblock %} 10 | 11 | {% block content %} 12 | 13 | 14 | 21 | 22 |
23 |
24 | 25 | 26 | {% for i in range(candidateList|length) %} 27 |
28 |
29 | 30 |

{{candidateList[i]['name']}}

31 |

{{candidateList[i]['party']}}

32 | 33 | Cast Vote 34 |
35 |
36 | {% endfor %} 37 | 38 | 39 | 56 | 57 | 78 | 79 | 90 | 91 | 104 | 105 | 120 | 121 | 130 |
131 | 132 | {% endblock %} -------------------------------------------------------------------------------- /website/app/templates/dashboard.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | {% block title %}Dashboard{% endblock %} 3 | 4 | {% block custom_css %} 5 | 6 | 7 | 8 | 9 | 10 | {% endblock %} 11 | 12 | {% block content %} 13 | 14 |
15 |
16 |
17 |

Hello {{username}}

18 | 19 |

Your security our priority


20 | 21 | Update Key 22 | 23 | 24 | 25 | 26 |

Why to put your password at risk. Keep updating your password and get a new key. Updating password 27 | adds an extra layer of security to an already highly secure e-voting system.

28 | 29 |
30 | 31 |
32 |

<>Profile<>


33 |
34 |
35 | Name: 36 | {{username}} 37 |
38 |
39 |
40 | Voted: 41 | 42 | {% if voted %} 43 | 44 | {% else %} 45 | 46 | {% endif %} 47 | 48 |
49 |
50 |
51 | Voter ID: 52 | {{voter_id}} 53 |
54 |
55 |
56 | Aadhar ID: 57 | {{aadhar_id}} 58 |
59 |
60 |
61 | Date of Birth: 62 | {{dob}} 63 |
64 |
65 |
66 | Contact Number: 67 | {{contact_no}} 68 |
69 |
70 |
71 | Email ID: 72 | {{email}} 73 |
74 | 75 |
76 |
77 | 78 | 79 | 80 |
81 |
82 | 83 | 100 | 101 | 111 | 112 | 133 | 134 | 135 | 136 | 137 | 138 |
139 | 140 | {% endblock %} -------------------------------------------------------------------------------- /website/app/templates/error.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block custom_css %} 4 | 5 | {% endblock %} 6 | 7 | {% block title %}Error!{% endblock %} 8 | 9 | {% block content %} 10 |
11 |

Error!

12 |
13 |

{{error}}

14 |
15 | {% endblock %} -------------------------------------------------------------------------------- /website/app/templates/index.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block title %}E-Voting Portal{% endblock %} 4 | 5 | {% block custom_css %} 6 | 7 | {% endblock %} 8 | 9 | {% block content %} 10 | 11 |
12 | 13 |

Welcome to E-Voting Portal


14 |

If you dont vote you lose the right to complain

15 | 16 |
17 |
18 | 19 | {% if loggedin is defined and loggedin == true %} 20 | Dashboard 21 | Cast Vote 22 | {% else %} 23 | Register 24 | Cast Vote 25 | {% endif %} 26 |
27 |
28 | 29 |
30 |
31 |
32 | 33 |
34 |

Increases participation

35 | 36 |

The Internet voting system tends to maximize user participation 37 | by allowing them to vote from anywhere and allowing access from different computer 38 | systems and from any device that has an internet connection.

39 |
40 | 41 |
42 |

Secure

43 | 44 |

In blockchain security system, in addition to 45 | logical and physical protection layers, mechanisms are established 46 | to ensure that only users accredited by an official document 47 | participate, so that all security guarantees are provided that 48 | equate the electronic voting process with a classic electoral process.

49 | 50 |
51 | 52 |
53 |

Reliable

54 | 55 |

56 | Essential concepts 57 | to ensure privacy and the protection of the integrity of votes, 58 | as well as to allow the audit of the elections to be held. 59 | An even more secure audit than in the traditional mail vote, 60 | where the voter loses control over his or her vote.

61 | 62 |
63 |
64 |
65 | 66 | 187 | 188 | 189 | 190 | 191 |
192 |
193 |
194 |
195 |
About
196 |

A Website where you can vote no matter wherever you are. 197 | Higly secured by blockchain. Live analysis of voting statistics is also available. 198 | No alteration in votes making it more reliable system.

199 | 200 |
201 | 202 |
203 | 204 |
205 |
Quick Links
206 | 213 |
214 |
215 |
216 |
217 |
218 |
219 |
220 | 221 |
222 | 223 |
224 | Anshit 225 | 230 |
231 |
232 | Shwetal 233 | 238 |
239 |
240 |
241 |
242 | 243 | {% endblock %} -------------------------------------------------------------------------------- /website/app/templates/key.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | 3 | {% block title %}Key{% endblock %} 4 | 5 | {% block custom_css %} 6 | 7 | 8 | 9 | {% endblock %} 10 | 11 | {% block content %} 12 | 13 |
14 |
15 |
16 |

Your Voter ID

17 |

{{voter_id}}

18 |

Your Private Key

19 |
20 |

{{key}}

21 |
22 |
23 |

Your private key is solely your responsibility. 24 | Please keep it safe and keep updating it regularly.

25 |
26 |
27 |
28 | 29 | 30 | {% endblock %} -------------------------------------------------------------------------------- /website/app/templates/login.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | {% block title %}Login{% endblock %} 3 | 4 | {% block custom_css %} 5 | 6 | 7 | 8 | {% endblock %} 9 | 10 | {% block content %} 11 | 12 |
13 | 14 |
15 | 16 |
17 | 18 |

Login


19 | 20 |
21 | 22 |
23 | 24 |
25 | 26 | 27 |
28 | 29 |
30 | 31 |
32 | 33 |
34 | 35 | 36 | 37 |

38 | 39 |

40 | {% if warning is defined %} 41 | {{warning}} 42 | {% endif %} 43 |

44 | 45 | Doesn't have an account? 46 | Register Here! 47 | 48 |
49 | 50 |
51 | 52 |
53 | 54 | {% endblock %} 55 | 56 | -------------------------------------------------------------------------------- /website/app/templates/register.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | {% block title %}Register{% endblock %} 3 | 4 | {% block custom_css %} 5 | 6 | 7 | 8 | {% endblock %} 9 | 10 | {% block content %} 11 | 12 |
13 |
14 |
15 |

Create Account


16 |
17 | 18 |
19 | 20 | 21 |
22 | 23 |
24 | 25 | 26 |
27 | 28 |
29 | 30 | 31 |
32 | 33 |
34 | 35 | 36 |
37 | 38 |
39 | 40 | 41 |
42 | 43 |
44 | 45 | 46 |
47 | 48 |
49 | 50 | 51 |
52 | 53 |

54 | {% if error is defined %} 55 | {{error}} 56 | {% endif %} 57 |

58 | 59 | 60 | 61 |

62 | 63 | 64 | 68 |
69 | 70 |
71 | 72 |
73 | 74 | {% endblock %} -------------------------------------------------------------------------------- /website/app/templates/results.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | {% block title %}Voting Statistics{% endblock %} 3 | 4 | {% block custom_css %} 5 | 6 | 7 | 8 | {% endblock %} 9 | 10 | {% block content %} 11 | 12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |

Loading the Live Poll Result...

21 |
22 | 23 |
24 | 25 |

Voting Statistics

26 | 27 |
28 | 29 |
30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 |
Sr.No.NamePartyVotes
49 | 50 |
51 | 52 |
53 | 54 | 55 | 56 | 57 | 58 |
59 | 60 |
61 | 62 |
63 | 64 | 65 | 70 | 71 | 72 | {% endblock %} 73 | -------------------------------------------------------------------------------- /website/app/templates/voters.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | {% block title %}Voter's List{% endblock %} 3 | 4 | {% block custom_css %} 5 | 6 | 7 | 8 | 9 | 10 | {% endblock %} 11 | 12 | {% block content %} 13 | 14 |
15 | 16 |
17 | 18 |
19 | 20 |

Voter List


21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | {% for i in range(voterList|length) %} 39 | 40 | 41 | 42 | 43 | 44 | 51 | 52 | 53 | {% endfor %} 54 | 55 | 56 |
Voter IDNameVoted
{{ voterList[i]['voter_id'] }}{{ voterList[i]['name'] }} 45 | {% if voterList[i]['voted'] == 0 %} 46 | 47 | {% else %} 48 | 49 | {% endif %} 50 |
57 |
58 |
59 |
60 |
61 | 62 | 63 | 64 | {% endblock %} -------------------------------------------------------------------------------- /website/wsgi.py: -------------------------------------------------------------------------------- 1 | from app import config 2 | from app.main import app 3 | 4 | if __name__ == '__main__': 5 | debugMode = False 6 | if(hasattr(config, 'debugMode')): 7 | if(config.debugMode == True): 8 | debugMode = True 9 | app.run(debug=debugMode) 10 | --------------------------------------------------------------------------------