Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
37 changes: 37 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,38 @@
# DevCreateBuildTest
 Team Details :
 Team Name: Deadline Mavericks
 Team ID: T062
👥 Team Members & Roles :
• Mandeep Singh Mankoo – Team Lead / Data Scientist
• Daljinder Singh – Machine Learning Engineer
• Pawan Kumar– Backend Developer (APIs, model integration)
• Muskan Guleria– Frontend Developer (UI for predictions)
• Mannat Preet Kaur - Data Engineer (ETL, data preprocessing)

📝 Problem Statement
POWERGRID executes large-scale infrastructure projects such as substations, overhead lines, and underground cables. These projects face cost overruns and schedule delays due to factors like terrain, regulatory hurdles, weather, vendor reliability, and resource availability.
The objective is to build a predictive software system that forecasts project costs and completion timelines accurately by identifying relationships and dependencies across structured, semi-structured, and unstructured data sources.
🛠️ Tech Stack Used :
• Programming Language: Python
• Backend: Django, FastAPI
• Frontend: React.js (for dashboard & user interface)
• Machine Learning / AI: XGBoost


• ⚙️ How to Run the Project (Setup Instructions)
• 1. Clone the Repository
• git clone https://github.com/mandeepsinghmankoo/ChronoCost-CC-.git cd project-cost-prediction

• 2. Install Dependencies
npm install @reduxjs/toolkit react-redux react-router-dom appwrite react-hot-toast @heroicons/react recharts axios


• 3. Run Backend (Model API)
pythn manage.py runserver

• 5. Run Frontend (Dashboard)
cd frontend
npm run dev



Empty file added backend/backend/__init__.py
Empty file.
Binary file added backend/backend/__pycache__/__init__.cpython-312.pyc
Binary file not shown.
Binary file not shown.
Binary file added backend/backend/__pycache__/urls.cpython-312.pyc
Binary file not shown.
Binary file added backend/backend/__pycache__/wsgi.cpython-312.pyc
Binary file not shown.
16 changes: 16 additions & 0 deletions backend/backend/asgi.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
"""
ASGI config for backend 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.1/howto/deployment/asgi/
"""

import os

from django.core.asgi import get_asgi_application

os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'backend.settings')

application = get_asgi_application()
164 changes: 164 additions & 0 deletions backend/backend/settings.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
"""
Django settings for backend project.

Generated by 'django-admin startproject' using Django 5.1.6.

For more information on this file, see
https://docs.djangoproject.com/en/5.1/topics/settings/

For the full list of settings and their values, see
https://docs.djangoproject.com/en/5.1/ref/settings/
"""

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.1/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'django-insecure-^4bha32*=tma8!_qur-%bfoam&vi@mtu1dj-lpaht^*awd)rhp'

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

ALLOWED_HOSTS = ['localhost', '127.0.0.1']

# CORS settings
CORS_ALLOW_ALL_ORIGINS = True # Only for development
CORS_ALLOW_CREDENTIALS = True
CORS_ALLOWED_ORIGINS = [
"http://localhost:5173",
"http://localhost:5174",
"http://localhost:5175",
"http://localhost:5176",
]


# Application definition

INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'corsheaders',
]

MIDDLEWARE = [
'corsheaders.middleware.CorsMiddleware',
'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',
]

CORS_ALLOW_ALL_ORIGINS = True
CORS_ALLOWED_LOCALHOSTS = [
'http://localhost:5173',
]

CORS_ALLOWED_ORIGINS = [
"http://localhost:5173",
"http://127.0.0.1:3000",
]
CORS_ALLOW_METHODS = [
'DELETE',
'GET',
'OPTIONS',
'PATCH',
'POST',
'PUT',
]

CORS_ALLOW_HEADERS = [
'accept',
'accept-encoding',
'authorization',
'content-type',
'dnt',
'origin',
'user-agent',
'x-csrftoken',
'x-requested-with',
]
ROOT_URLCONF = 'backend.urls'

TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
},
},
]

WSGI_APPLICATION = 'backend.wsgi.application'


# Database
# https://docs.djangoproject.com/en/5.1/ref/settings/#databases

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': BASE_DIR / 'db.sqlite3',
}
}


# Password validation
# https://docs.djangoproject.com/en/5.1/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.1/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.1/howto/static-files/

STATIC_URL = 'static/'

# Default primary key field type
# https://docs.djangoproject.com/en/5.1/ref/settings/#default-auto-field

DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
24 changes: 24 additions & 0 deletions backend/backend/urls.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
"""
URL configuration for backend project.

The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/5.1/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based views
1. Add an import: from other_app.views import Home
2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
Including another URLconf
1. Import the include() function: from django.urls import include, path
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
# backend/urls.py
from django.contrib import admin
from django.urls import path, include

urlpatterns = [
path('admin/', admin.site.urls),
path('api/inference/', include('inference.urls')), # This line is crucial
]
16 changes: 16 additions & 0 deletions backend/backend/wsgi.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
"""
WSGI config for backend 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.1/howto/deployment/wsgi/
"""

import os

from django.core.wsgi import get_wsgi_application

os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'backend.settings')

application = get_wsgi_application()
Empty file added backend/db.sqlite3
Empty file.
Empty file added backend/inference/__init__.py
Empty file.
Binary file not shown.
Binary file added backend/inference/__pycache__/admin.cpython-312.pyc
Binary file not shown.
Binary file added backend/inference/__pycache__/apps.cpython-312.pyc
Binary file not shown.
Binary file added backend/inference/__pycache__/models.cpython-312.pyc
Binary file not shown.
Binary file added backend/inference/__pycache__/urls.cpython-312.pyc
Binary file not shown.
Binary file not shown.
3 changes: 3 additions & 0 deletions backend/inference/admin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.contrib import admin

# Register your models here.
6 changes: 6 additions & 0 deletions backend/inference/apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from django.apps import AppConfig


class InferenceConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'inference'
Empty file.
Binary file not shown.
3 changes: 3 additions & 0 deletions backend/inference/models.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.db import models

# Create your models here.
3 changes: 3 additions & 0 deletions backend/inference/tests.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.test import TestCase

# Create your tests here.
9 changes: 9 additions & 0 deletions backend/inference/urls.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# inference/urls.py
from django.urls import path
from . import views

urlpatterns = [
path('health/', views.health_check, name='health_check'),
path('predict/', views.predict_cost, name='predict_cost'), # Make sure this exists
path('scenarios/', views.scenario_analysis, name='scenario_analysis'),
]
Loading