commit f6ebcb570a5c26c2184637814723176b1f9bb113 Author: Gokuldevx Date: Mon Aug 18 21:04:22 2025 +0530 Initial Commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a60531d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +civicenv diff --git a/civicfix/.env b/civicfix/.env new file mode 100644 index 0000000..8d5ccee --- /dev/null +++ b/civicfix/.env @@ -0,0 +1 @@ +RECOVERY_CODE = 'QNMHFLRJTNFEB8VCG3WB8U3P' \ No newline at end of file diff --git a/civicfix/.gitignore b/civicfix/.gitignore new file mode 100644 index 0000000..2eea525 --- /dev/null +++ b/civicfix/.gitignore @@ -0,0 +1 @@ +.env \ No newline at end of file diff --git a/civicfix/civicfix/__init__.py b/civicfix/civicfix/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/civicfix/civicfix/__pycache__/__init__.cpython-313.pyc b/civicfix/civicfix/__pycache__/__init__.cpython-313.pyc new file mode 100644 index 0000000..fd40d33 Binary files /dev/null and b/civicfix/civicfix/__pycache__/__init__.cpython-313.pyc differ diff --git a/civicfix/civicfix/__pycache__/settings.cpython-313.pyc b/civicfix/civicfix/__pycache__/settings.cpython-313.pyc new file mode 100644 index 0000000..592f0d4 Binary files /dev/null and b/civicfix/civicfix/__pycache__/settings.cpython-313.pyc differ diff --git a/civicfix/civicfix/__pycache__/urls.cpython-313.pyc b/civicfix/civicfix/__pycache__/urls.cpython-313.pyc new file mode 100644 index 0000000..708e3fc Binary files /dev/null and b/civicfix/civicfix/__pycache__/urls.cpython-313.pyc differ diff --git a/civicfix/civicfix/__pycache__/wsgi.cpython-313.pyc b/civicfix/civicfix/__pycache__/wsgi.cpython-313.pyc new file mode 100644 index 0000000..f19e8d9 Binary files /dev/null and b/civicfix/civicfix/__pycache__/wsgi.cpython-313.pyc differ diff --git a/civicfix/civicfix/asgi.py b/civicfix/civicfix/asgi.py new file mode 100644 index 0000000..8c74353 --- /dev/null +++ b/civicfix/civicfix/asgi.py @@ -0,0 +1,16 @@ +""" +ASGI config for civicfix project. + +It exposes the ASGI callable as a module-level variable named ``application``. + +For more information on this file, see +https://docs.djangoproject.com/en/5.2/howto/deployment/asgi/ +""" + +import os + +from django.core.asgi import get_asgi_application + +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'civicfix.settings') + +application = get_asgi_application() diff --git a/civicfix/civicfix/settings.py b/civicfix/civicfix/settings.py new file mode 100644 index 0000000..ba0425d --- /dev/null +++ b/civicfix/civicfix/settings.py @@ -0,0 +1,115 @@ +import os +from pathlib import Path + +# Build paths inside the project like this: BASE_DIR / 'subdir'. +BASE_DIR = Path(__file__).resolve().parent.parent + + +# Quick-start development settings - unsuitable for production +# See https://docs.djangoproject.com/en/5.2/howto/deployment/checklist/ + +# SECURITY WARNING: keep the secret key used in production secret! +SECRET_KEY = 'django-insecure-wa6p9d+go#+evjql%m(+e5eti$%z7yx2o#cbq8bsh!==icxua3' + +# SECURITY WARNING: don't run with debug turned on in production! +DEBUG = True + +ALLOWED_HOSTS = [] + + +# Application definition + +INSTALLED_APPS = [ + 'django.contrib.admin', + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + 'django.contrib.messages', + 'django.contrib.staticfiles', + 'core', +] + +MIDDLEWARE = [ + 'django.middleware.security.SecurityMiddleware', + 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.middleware.common.CommonMiddleware', + 'django.middleware.csrf.CsrfViewMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.contrib.messages.middleware.MessageMiddleware', + 'django.middleware.clickjacking.XFrameOptionsMiddleware', +] + +ROOT_URLCONF = 'civicfix.urls' + +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'DIRS': [os.path.join(BASE_DIR, 'templates')], + 'APP_DIRS': True, + 'OPTIONS': { + 'context_processors': [ + 'django.template.context_processors.request', + 'django.contrib.auth.context_processors.auth', + 'django.contrib.messages.context_processors.messages', + ], + }, + }, +] + +WSGI_APPLICATION = 'civicfix.wsgi.application' + + +# Database +# https://docs.djangoproject.com/en/5.2/ref/settings/#databases + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.postgresql', + 'NAME': 'civixfix_db', + 'USER': 'civicfix_user', + 'PASSWORD': 'Gokul@2001', + 'HOST': 'localhost', + 'PORT': '5432', + } +} + +# Password validation +# https://docs.djangoproject.com/en/5.2/ref/settings/#auth-password-validators + +AUTH_PASSWORD_VALIDATORS = [ + { + 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', + }, +] + + +# Internationalization +# https://docs.djangoproject.com/en/5.2/topics/i18n/ + +LANGUAGE_CODE = 'en-us' + +TIME_ZONE = 'UTC' + +USE_I18N = True + +USE_TZ = True + + +# Static files (CSS, JavaScript, Images) +# https://docs.djangoproject.com/en/5.2/howto/static-files/ + +STATIC_URL = 'static/' + +# Default primary key field type +# https://docs.djangoproject.com/en/5.2/ref/settings/#default-auto-field + +DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' diff --git a/civicfix/civicfix/urls.py b/civicfix/civicfix/urls.py new file mode 100644 index 0000000..a45ff28 --- /dev/null +++ b/civicfix/civicfix/urls.py @@ -0,0 +1,12 @@ +from django.contrib import admin +from django.urls import path, include +from django.contrib.auth import views as auth_views + +urlpatterns = [ + path('admin/', admin.site.urls), + path('', include('core.urls')), + path('login/', auth_views.LoginView.as_view(template_name='core/login.html'), name='login'), + path('logout/', auth_views.LogoutView.as_view(), name='logout'), + path('register/', auth_views.LoginView.as_view(template_name='core/register.html'), name='register'), + +] \ No newline at end of file diff --git a/civicfix/civicfix/wsgi.py b/civicfix/civicfix/wsgi.py new file mode 100644 index 0000000..3f80d4f --- /dev/null +++ b/civicfix/civicfix/wsgi.py @@ -0,0 +1,16 @@ +""" +WSGI config for civicfix project. + +It exposes the WSGI callable as a module-level variable named ``application``. + +For more information on this file, see +https://docs.djangoproject.com/en/5.2/howto/deployment/wsgi/ +""" + +import os + +from django.core.wsgi import get_wsgi_application + +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'civicfix.settings') + +application = get_wsgi_application() diff --git a/civicfix/core/__init__.py b/civicfix/core/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/civicfix/core/__pycache__/__init__.cpython-313.pyc b/civicfix/core/__pycache__/__init__.cpython-313.pyc new file mode 100644 index 0000000..327c7a5 Binary files /dev/null and b/civicfix/core/__pycache__/__init__.cpython-313.pyc differ diff --git a/civicfix/core/__pycache__/admin.cpython-313.pyc b/civicfix/core/__pycache__/admin.cpython-313.pyc new file mode 100644 index 0000000..2b39130 Binary files /dev/null and b/civicfix/core/__pycache__/admin.cpython-313.pyc differ diff --git a/civicfix/core/__pycache__/apps.cpython-313.pyc b/civicfix/core/__pycache__/apps.cpython-313.pyc new file mode 100644 index 0000000..41d6f5a Binary files /dev/null and b/civicfix/core/__pycache__/apps.cpython-313.pyc differ diff --git a/civicfix/core/__pycache__/models.cpython-313.pyc b/civicfix/core/__pycache__/models.cpython-313.pyc new file mode 100644 index 0000000..5b9a7dd Binary files /dev/null and b/civicfix/core/__pycache__/models.cpython-313.pyc differ diff --git a/civicfix/core/__pycache__/urls.cpython-313.pyc b/civicfix/core/__pycache__/urls.cpython-313.pyc new file mode 100644 index 0000000..56eeed5 Binary files /dev/null and b/civicfix/core/__pycache__/urls.cpython-313.pyc differ diff --git a/civicfix/core/__pycache__/views.cpython-313.pyc b/civicfix/core/__pycache__/views.cpython-313.pyc new file mode 100644 index 0000000..3a31bf9 Binary files /dev/null and b/civicfix/core/__pycache__/views.cpython-313.pyc differ diff --git a/civicfix/core/admin.py b/civicfix/core/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/civicfix/core/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/civicfix/core/apps.py b/civicfix/core/apps.py new file mode 100644 index 0000000..8115ae6 --- /dev/null +++ b/civicfix/core/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class CoreConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'core' diff --git a/civicfix/core/migrations/__init__.py b/civicfix/core/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/civicfix/core/migrations/__pycache__/__init__.cpython-313.pyc b/civicfix/core/migrations/__pycache__/__init__.cpython-313.pyc new file mode 100644 index 0000000..e259cd5 Binary files /dev/null and b/civicfix/core/migrations/__pycache__/__init__.cpython-313.pyc differ diff --git a/civicfix/core/models.py b/civicfix/core/models.py new file mode 100644 index 0000000..71a8362 --- /dev/null +++ b/civicfix/core/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/civicfix/core/templates/core/base.html b/civicfix/core/templates/core/base.html new file mode 100644 index 0000000..4464a85 --- /dev/null +++ b/civicfix/core/templates/core/base.html @@ -0,0 +1,107 @@ + + + + + + Civixfix - {% block title %}Community Issue Reporting Platform{% endblock %} + + + + + + + {% block extra_css %}{% endblock %} + + + + + + +
+ {% block content %}{% endblock %} +
+ + + + + + + + + {% block extra_js %}{% endblock %} + + \ No newline at end of file diff --git a/civicfix/core/templates/core/index.html b/civicfix/core/templates/core/index.html new file mode 100644 index 0000000..5112bea --- /dev/null +++ b/civicfix/core/templates/core/index.html @@ -0,0 +1,189 @@ +{% extends "core/base.html" %} + +{% block content %} + +
+
+

Report. Resolve. Rejoice.

+

Your voice matters in making our community better. Report local issues and track their resolution in real-time.

+ +
+
+ + +
+
+
+

403+

+

Issues Reported

+
+
+

403+

+

Issues Resolved

+
+
+

403+

+

Active Users

+
+
+

403+

+

Municipal Departments

+
+
+
+ + +
+
+

Why Choose Civixfix?

+

Transparent, efficient, and community-driven problem solving

+
+
+
+
+
+
+ +
+
Location-Based Reporting
+

Pinpoint issues on an interactive map for accurate location tracking and faster resolution.

+
+
+
+
+
+
+
+ +
+
Real-Time Tracking
+

Follow your reported issues through every stage from reporting to resolution.

+
+
+
+
+
+
+
+ +
+
Community Engagement
+

Vote and comment on issues to help prioritize what matters most to your neighborhood.

+
+
+
+
+
+ + +
+
+
+

How Civixfix Works

+

Simple steps to make your community better

+
+
+
+
+
+ 1 +
Report an Issue
+

Take a photo, add details, and drop a pin on the map to report problems in your area.

+
+
+
+
+
+
+ 2 +
Community Support
+

Others can vote and comment to show support and add details to your report.

+
+
+
+
+
+
+ 3 +
Official Response
+

Municipal authorities receive, prioritize, and work on resolving the issues.

+
+
+
+
+
+
+ + +
+
+

Recently Reported Issues

+ View All Issues +
+
+
+
+ Pothole +
+ Roads +
Large pothole on Main Street
+

A dangerous pothole near the intersection causing damage to vehicles.

+
+ 0.3 miles away + 24 votes +
+
+ +
+
+
+
+ Garbage +
+ Sanitation +
Overflowing garbage bins
+

Trash bins at the park haven't been emptied in over a week.

+
+ 0.7 miles away + 42 votes +
+
+ +
+
+
+
+ Streetlight +
+ Electricity +
Broken streetlight on Oak Ave
+

Dark intersection creating safety concerns for pedestrians.

+
+ 1.2 miles away + 18 votes +
+
+ +
+
+
+
+ + +
+
+

Ready to make a difference in your community?

+

Join thousands of citizens who are actively improving their neighborhoods.

+ Get Started Now +
+
+{% endblock %} \ No newline at end of file diff --git a/civicfix/core/tests.py b/civicfix/core/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/civicfix/core/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/civicfix/core/urls.py b/civicfix/core/urls.py new file mode 100644 index 0000000..0d4ddcf --- /dev/null +++ b/civicfix/core/urls.py @@ -0,0 +1,6 @@ +from django.urls import path +from . import views + +urlpatterns = [ + path('', views.home, name='home'), +] \ No newline at end of file diff --git a/civicfix/core/views.py b/civicfix/core/views.py new file mode 100644 index 0000000..25729de --- /dev/null +++ b/civicfix/core/views.py @@ -0,0 +1,4 @@ +from django.shortcuts import render + +def home(request): + return render(request, 'core/index.html') \ No newline at end of file diff --git a/civicfix/db.sqlite3 b/civicfix/db.sqlite3 new file mode 100644 index 0000000..ae6669a Binary files /dev/null and b/civicfix/db.sqlite3 differ diff --git a/civicfix/manage.py b/civicfix/manage.py new file mode 100644 index 0000000..c5ca9b4 --- /dev/null +++ b/civicfix/manage.py @@ -0,0 +1,22 @@ +#!/usr/bin/env python +"""Django's command-line utility for administrative tasks.""" +import os +import sys + + +def main(): + """Run administrative tasks.""" + os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'civicfix.settings') + try: + from django.core.management import execute_from_command_line + except ImportError as exc: + raise ImportError( + "Couldn't import Django. Are you sure it's installed and " + "available on your PYTHONPATH environment variable? Did you " + "forget to activate a virtual environment?" + ) from exc + execute_from_command_line(sys.argv) + + +if __name__ == '__main__': + main() diff --git a/civicfix/templates/base.html b/civicfix/templates/base.html new file mode 100644 index 0000000..a9341b6 --- /dev/null +++ b/civicfix/templates/base.html @@ -0,0 +1,16 @@ + +{% load static %} + + + + Civixfix - {% block title %}{% endblock %} + + + + +
+ {% block content %}{% endblock %} +
+ + + \ No newline at end of file