From 38097ba3c26785b66d419badbb236ec7b7421a66 Mon Sep 17 00:00:00 2001 From: Shahdidul Date: Thu, 4 Dec 2025 11:48:00 +0600 Subject: [PATCH 1/3] updated gitignore for backend --- .gitignore | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.gitignore b/.gitignore index 9c83499..141b478 100644 --- a/.gitignore +++ b/.gitignore @@ -186,3 +186,9 @@ ui-debug.log* # Turbopack .turbo + +#backend +.venv +__pycache__/ +*.pyc +.env \ No newline at end of file From 3ba01b142934b23c6c69b2f537ceb30cae457bd8 Mon Sep 17 00:00:00 2001 From: Shahdidul Date: Thu, 4 Dec 2025 17:06:25 +0600 Subject: [PATCH 2/3] added register and login api --- TOC-Backend/API_DOCS.md | 113 ++++++++++++ TOC-Backend/apps/authentication/__init__.py | 0 TOC-Backend/apps/authentication/admin.py | 10 + TOC-Backend/apps/authentication/apps.py | 6 + .../authentication/migrations/0001_initial.py | 44 +++++ .../authentication/migrations/__init__.py | 0 TOC-Backend/apps/authentication/models.py | 18 ++ .../apps/authentication/serializers.py | 38 ++++ TOC-Backend/apps/authentication/tests.py | 3 + TOC-Backend/apps/authentication/urls.py | 9 + TOC-Backend/apps/authentication/views.py | 27 +++ TOC-Backend/config/__init__.py | 0 TOC-Backend/config/asgi.py | 16 ++ TOC-Backend/config/settings.py | 171 ++++++++++++++++++ TOC-Backend/config/urls.py | 23 +++ TOC-Backend/config/wsgi.py | 16 ++ TOC-Backend/manage.py | 22 +++ requirements.txt | 7 + 18 files changed, 523 insertions(+) create mode 100644 TOC-Backend/API_DOCS.md create mode 100644 TOC-Backend/apps/authentication/__init__.py create mode 100644 TOC-Backend/apps/authentication/admin.py create mode 100644 TOC-Backend/apps/authentication/apps.py create mode 100644 TOC-Backend/apps/authentication/migrations/0001_initial.py create mode 100644 TOC-Backend/apps/authentication/migrations/__init__.py create mode 100644 TOC-Backend/apps/authentication/models.py create mode 100644 TOC-Backend/apps/authentication/serializers.py create mode 100644 TOC-Backend/apps/authentication/tests.py create mode 100644 TOC-Backend/apps/authentication/urls.py create mode 100644 TOC-Backend/apps/authentication/views.py create mode 100644 TOC-Backend/config/__init__.py create mode 100644 TOC-Backend/config/asgi.py create mode 100644 TOC-Backend/config/settings.py create mode 100644 TOC-Backend/config/urls.py create mode 100644 TOC-Backend/config/wsgi.py create mode 100644 TOC-Backend/manage.py create mode 100644 requirements.txt diff --git a/TOC-Backend/API_DOCS.md b/TOC-Backend/API_DOCS.md new file mode 100644 index 0000000..c830d07 --- /dev/null +++ b/TOC-Backend/API_DOCS.md @@ -0,0 +1,113 @@ +# Authentication API Documentation + +Base URL: `http://localhost:8000` (dev) | `https://your-backend.vercel.app` (prod) + +## Endpoints + +### 1. Register +```http +POST /auth/register/ +Content-Type: application/json +``` + +**Request:** +```json +{ + "username": "string", + "email": "string", + "password": "string", + "re_password": "string", + "first_name": "string", + "last_name": "string" +} +``` + +**Response (201):** +```json +{ + "user": { + "id": 1, + "username": "string", + "email": "string", + "first_name": "string", + "last_name": "string" + }, + "refresh": "jwt_token", + "access": "jwt_token", + "message": "Registration successful" +} +``` + +--- + +### 2. Login +```http +POST /auth/login/ +Content-Type: application/json +``` + +**Request:** +```json +{ + "email": "string", + "password": "string" +} +``` + +**Response (200):** +```json +{ + "refresh": "jwt_token", + "access": "jwt_token" +} +``` + +--- + +### 3. Refresh Token +```http +POST /auth/token/refresh/ +Content-Type: application/json +``` + +**Request:** +```json +{ + "refresh": "jwt_token" +} +``` + +**Response (200):** +```json +{ + "access": "jwt_token", + "refresh": "jwt_token" +} +``` + +--- + +## Authentication + +For protected endpoints, include the access token in the Authorization header: + +```http +Authorization: Bearer +``` + +## Token Lifecycle + +- **Access Token:** 60 minutes +- **Refresh Token:** 7 days +- Refresh tokens rotate on use (new refresh token returned) + +## Error Responses + +```json +{ + "field_name": ["error message"], + "detail": "error description" +} +``` + +Common status codes: `400` (validation error), `401` (unauthorized), `404` (not found) diff --git a/TOC-Backend/apps/authentication/__init__.py b/TOC-Backend/apps/authentication/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/TOC-Backend/apps/authentication/admin.py b/TOC-Backend/apps/authentication/admin.py new file mode 100644 index 0000000..48fd81c --- /dev/null +++ b/TOC-Backend/apps/authentication/admin.py @@ -0,0 +1,10 @@ +from django.contrib import admin +from django.contrib.auth.admin import UserAdmin as BaseUserAdmin +from .models import User + +@admin.register(User) +class UserAdmin(BaseUserAdmin): + list_display = ('email', 'username', 'first_name', 'last_name', 'is_staff', 'created_at') + list_filter = ('is_staff', 'is_superuser', 'created_at') + search_fields = ('email', 'username', 'first_name', 'last_name') + ordering = ('-created_at',) \ No newline at end of file diff --git a/TOC-Backend/apps/authentication/apps.py b/TOC-Backend/apps/authentication/apps.py new file mode 100644 index 0000000..bc4ed96 --- /dev/null +++ b/TOC-Backend/apps/authentication/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class AuthenticationConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'apps.authentication' diff --git a/TOC-Backend/apps/authentication/migrations/0001_initial.py b/TOC-Backend/apps/authentication/migrations/0001_initial.py new file mode 100644 index 0000000..d15e988 --- /dev/null +++ b/TOC-Backend/apps/authentication/migrations/0001_initial.py @@ -0,0 +1,44 @@ +# Generated by Django 5.1.3 on 2025-12-04 10:27 + +import django.contrib.auth.models +import django.contrib.auth.validators +import django.utils.timezone +from django.db import migrations, models + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ('auth', '0012_alter_user_first_name_max_length'), + ] + + operations = [ + migrations.CreateModel( + name='User', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('password', models.CharField(max_length=128, verbose_name='password')), + ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')), + ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')), + ('username', models.CharField(error_messages={'unique': 'A user with that username already exists.'}, help_text='Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.', max_length=150, unique=True, validators=[django.contrib.auth.validators.UnicodeUsernameValidator()], verbose_name='username')), + ('first_name', models.CharField(blank=True, max_length=150, verbose_name='first name')), + ('last_name', models.CharField(blank=True, max_length=150, verbose_name='last name')), + ('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')), + ('is_active', models.BooleanField(default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')), + ('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')), + ('email', models.EmailField(max_length=254, unique=True)), + ('created_at', models.DateTimeField(auto_now_add=True)), + ('updated_at', models.DateTimeField(auto_now=True)), + ('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.group', verbose_name='groups')), + ('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.permission', verbose_name='user permissions')), + ], + options={ + 'db_table': 'auth_user', + }, + managers=[ + ('objects', django.contrib.auth.models.UserManager()), + ], + ), + ] diff --git a/TOC-Backend/apps/authentication/migrations/__init__.py b/TOC-Backend/apps/authentication/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/TOC-Backend/apps/authentication/models.py b/TOC-Backend/apps/authentication/models.py new file mode 100644 index 0000000..71c7cec --- /dev/null +++ b/TOC-Backend/apps/authentication/models.py @@ -0,0 +1,18 @@ +from django.db import models +from django.contrib.auth.models import AbstractUser + +# Create your models here. + +class User(AbstractUser): + email = models.EmailField(unique=True) + created_at = models.DateTimeField(auto_now_add=True) + updated_at = models.DateTimeField(auto_now=True) + + USERNAME_FIELD = 'email' + REQUIRED_FIELDS = ['username'] + + def __str__(self): + return self.email + + class Meta: + db_table = 'auth_user' \ No newline at end of file diff --git a/TOC-Backend/apps/authentication/serializers.py b/TOC-Backend/apps/authentication/serializers.py new file mode 100644 index 0000000..61e46b2 --- /dev/null +++ b/TOC-Backend/apps/authentication/serializers.py @@ -0,0 +1,38 @@ +from rest_framework import serializers +from django.contrib.auth import get_user_model +from django.contrib.auth.password_validation import validate_password + +User = get_user_model() + +class UserSerializer(serializers.ModelSerializer): + password = serializers.CharField( + write_only=True, + required=True, + validators=[validate_password] + ) + re_password = serializers.CharField(write_only=True, required=True) + + class Meta: + model = User + fields = ('id', 'username', 'email', 'password', 're_password', 'first_name', 'last_name') + extra_kwargs = { + 'first_name': {'required': True}, + 'last_name': {'required': True}, + } + + def validate(self, attrs): + if attrs['password'] != attrs['re_password']: + raise serializers.ValidationError({"password": "Password fields didn't match."}) + return attrs + + def create(self, validated_data): + validated_data.pop('re_password') + user = User.objects.create( + username=validated_data['username'], + email=validated_data['email'], + first_name=validated_data['first_name'], + last_name=validated_data['last_name'] + ) + user.set_password(validated_data['password']) + user.save() + return user diff --git a/TOC-Backend/apps/authentication/tests.py b/TOC-Backend/apps/authentication/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/TOC-Backend/apps/authentication/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/TOC-Backend/apps/authentication/urls.py b/TOC-Backend/apps/authentication/urls.py new file mode 100644 index 0000000..895ed17 --- /dev/null +++ b/TOC-Backend/apps/authentication/urls.py @@ -0,0 +1,9 @@ +from django.urls import path +from rest_framework_simplejwt.views import TokenObtainPairView, TokenRefreshView +from .views import RegisterView + +urlpatterns = [ + path('register/', RegisterView.as_view(), name='register'), + path('login/', TokenObtainPairView.as_view(), name='token_obtain_pair'), + path('token/refresh/', TokenRefreshView.as_view(), name='token_refresh'), +] \ No newline at end of file diff --git a/TOC-Backend/apps/authentication/views.py b/TOC-Backend/apps/authentication/views.py new file mode 100644 index 0000000..71c2f35 --- /dev/null +++ b/TOC-Backend/apps/authentication/views.py @@ -0,0 +1,27 @@ +from rest_framework import status, generics +from rest_framework.response import Response +from rest_framework.views import APIView +from rest_framework.permissions import AllowAny +from rest_framework_simplejwt.tokens import RefreshToken +from .serializers import UserSerializer +from django.contrib.auth import get_user_model + +User = get_user_model() + +class RegisterView(generics.CreateAPIView): + queryset = User.objects.all() + permission_classes = (AllowAny,) + serializer_class = UserSerializer + + def create(self, request, *args, **kwargs): + serializer = self.get_serializer(data=request.data) + serializer.is_valid(raise_exception=True) + user = serializer.save() + refresh = RefreshToken.for_user(user) + res_data = { + "user": serializer.data, + "refresh": str(refresh), + "access": str(refresh.access_token), + "message": "Registration successful" + } + return Response(res_data, status=status.HTTP_201_CREATED) diff --git a/TOC-Backend/config/__init__.py b/TOC-Backend/config/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/TOC-Backend/config/asgi.py b/TOC-Backend/config/asgi.py new file mode 100644 index 0000000..400e9e3 --- /dev/null +++ b/TOC-Backend/config/asgi.py @@ -0,0 +1,16 @@ +""" +ASGI config for config 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', 'config.settings') + +application = get_asgi_application() diff --git a/TOC-Backend/config/settings.py b/TOC-Backend/config/settings.py new file mode 100644 index 0000000..2f2b019 --- /dev/null +++ b/TOC-Backend/config/settings.py @@ -0,0 +1,171 @@ +""" +Django settings for config project. + +Generated by 'django-admin startproject' using Django 5.1.3. + +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/ +""" +import os +from pathlib import Path +from datetime import timedelta +import dj_database_url +from dotenv import load_dotenv + +load_dotenv() + +# 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 = os.getenv('SECRET_KEY') + +# SECURITY WARNING: don't run with debug turned on in production! +DEBUG = os.getenv('DEBUG', 'True') == 'True' + +ALLOWED_HOSTS = ['localhost', 'toc-simulator.vercel.app', '127.0.0.1'] + + +# Application definition + +INSTALLED_APPS = [ + 'django.contrib.admin', + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + 'django.contrib.messages', + 'django.contrib.staticfiles', + 'rest_framework', + 'rest_framework_simplejwt', + 'corsheaders', + 'apps.authentication', +] + +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', + 'corsheaders.middleware.CorsMiddleware', +] + +ROOT_URLCONF = 'config.urls' + +CORS_ALLOWED_ORIGINS = [ + "http://localhost:3000", + "https://toc-simulator.vercel.app", +] + +CORS_ALLOW_CREDENTIALS = True + +REST_FRAMEWORK = { + 'DEFAULT_AUTHENTICATION_CLASSES': ( + 'rest_framework_simplejwt.authentication.JWTAuthentication', + ), + 'DEFAULT_PERMISSION_CLASSES': ( + 'rest_framework.permissions.IsAuthenticated', + ), + 'DEFAULT_THROTTLE_CLASSES': [ + 'rest_framework.throttling.AnonRateThrottle', + 'rest_framework.throttling.UserRateThrottle' + ], + 'DEFAULT_THROTTLE_RATES': { + 'anon': '100/day', + 'user': '1000/day' + } +} + +SIMPLE_JWT = { + 'ACCESS_TOKEN_LIFETIME': timedelta(minutes=60), + 'REFRESH_TOKEN_LIFETIME': timedelta(days=7), + 'ROTATE_REFRESH_TOKENS': True, + 'BLACKLIST_AFTER_ROTATION': True, +} + +AUTH_USER_MODEL = 'authentication.User' + +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 = 'config.wsgi.application' + + +# Database +# https://docs.djangoproject.com/en/5.1/ref/settings/#databases + +DATABASES = { + 'default': dj_database_url.config( + default=os.getenv('DATABASE_URL'), + conn_max_age=0, # Don't persist connections in serverless + conn_health_checks=True, + ) + } +# Add PostgreSQL-specific options +DATABASES['default']['OPTIONS'] = { + 'connect_timeout': 10, + } + + +# 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' diff --git a/TOC-Backend/config/urls.py b/TOC-Backend/config/urls.py new file mode 100644 index 0000000..2176f65 --- /dev/null +++ b/TOC-Backend/config/urls.py @@ -0,0 +1,23 @@ +""" +URL configuration for config 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')) +""" +from django.contrib import admin +from django.urls import include, path + +urlpatterns = [ + path('admin/', admin.site.urls), + path('auth/', include('apps.authentication.urls')), +] diff --git a/TOC-Backend/config/wsgi.py b/TOC-Backend/config/wsgi.py new file mode 100644 index 0000000..e232e56 --- /dev/null +++ b/TOC-Backend/config/wsgi.py @@ -0,0 +1,16 @@ +""" +WSGI config for config 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', 'config.settings') + +application = get_wsgi_application() diff --git a/TOC-Backend/manage.py b/TOC-Backend/manage.py new file mode 100644 index 0000000..8e7ac79 --- /dev/null +++ b/TOC-Backend/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', 'config.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/requirements.txt b/requirements.txt new file mode 100644 index 0000000..590e8e3 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,7 @@ +django==5.1.3 +djangorestframework==3.15.2 +djangorestframework-simplejwt==5.3.1 +django-cors-headers==4.5.0 +dj-database-url==2.2.0 +psycopg2-binary==2.9.10 +python-dotenv==1.0.0 \ No newline at end of file From 5cf750a4f7826b515ddfd0282b7099dc1004629a Mon Sep 17 00:00:00 2001 From: Shahdidul Date: Sat, 6 Dec 2025 20:37:38 +0600 Subject: [PATCH 3/3] Seperated backend folder --- {TOC-Backend => Backend}/API_DOCS.md | 0 {TOC-Backend => Backend}/apps/authentication/__init__.py | 0 {TOC-Backend => Backend}/apps/authentication/admin.py | 0 {TOC-Backend => Backend}/apps/authentication/apps.py | 0 .../apps/authentication/migrations/0001_initial.py | 0 .../apps/authentication/migrations/__init__.py | 0 {TOC-Backend => Backend}/apps/authentication/models.py | 0 {TOC-Backend => Backend}/apps/authentication/serializers.py | 0 {TOC-Backend => Backend}/apps/authentication/tests.py | 0 {TOC-Backend => Backend}/apps/authentication/urls.py | 0 {TOC-Backend => Backend}/apps/authentication/views.py | 0 {TOC-Backend => Backend}/config/__init__.py | 0 {TOC-Backend => Backend}/config/asgi.py | 0 {TOC-Backend => Backend}/config/settings.py | 0 {TOC-Backend => Backend}/config/urls.py | 0 {TOC-Backend => Backend}/config/wsgi.py | 0 {TOC-Backend => Backend}/manage.py | 0 requirements.txt => Backend/requirements.txt | 0 18 files changed, 0 insertions(+), 0 deletions(-) rename {TOC-Backend => Backend}/API_DOCS.md (100%) rename {TOC-Backend => Backend}/apps/authentication/__init__.py (100%) rename {TOC-Backend => Backend}/apps/authentication/admin.py (100%) rename {TOC-Backend => Backend}/apps/authentication/apps.py (100%) rename {TOC-Backend => Backend}/apps/authentication/migrations/0001_initial.py (100%) rename {TOC-Backend => Backend}/apps/authentication/migrations/__init__.py (100%) rename {TOC-Backend => Backend}/apps/authentication/models.py (100%) rename {TOC-Backend => Backend}/apps/authentication/serializers.py (100%) rename {TOC-Backend => Backend}/apps/authentication/tests.py (100%) rename {TOC-Backend => Backend}/apps/authentication/urls.py (100%) rename {TOC-Backend => Backend}/apps/authentication/views.py (100%) rename {TOC-Backend => Backend}/config/__init__.py (100%) rename {TOC-Backend => Backend}/config/asgi.py (100%) rename {TOC-Backend => Backend}/config/settings.py (100%) rename {TOC-Backend => Backend}/config/urls.py (100%) rename {TOC-Backend => Backend}/config/wsgi.py (100%) rename {TOC-Backend => Backend}/manage.py (100%) rename requirements.txt => Backend/requirements.txt (100%) diff --git a/TOC-Backend/API_DOCS.md b/Backend/API_DOCS.md similarity index 100% rename from TOC-Backend/API_DOCS.md rename to Backend/API_DOCS.md diff --git a/TOC-Backend/apps/authentication/__init__.py b/Backend/apps/authentication/__init__.py similarity index 100% rename from TOC-Backend/apps/authentication/__init__.py rename to Backend/apps/authentication/__init__.py diff --git a/TOC-Backend/apps/authentication/admin.py b/Backend/apps/authentication/admin.py similarity index 100% rename from TOC-Backend/apps/authentication/admin.py rename to Backend/apps/authentication/admin.py diff --git a/TOC-Backend/apps/authentication/apps.py b/Backend/apps/authentication/apps.py similarity index 100% rename from TOC-Backend/apps/authentication/apps.py rename to Backend/apps/authentication/apps.py diff --git a/TOC-Backend/apps/authentication/migrations/0001_initial.py b/Backend/apps/authentication/migrations/0001_initial.py similarity index 100% rename from TOC-Backend/apps/authentication/migrations/0001_initial.py rename to Backend/apps/authentication/migrations/0001_initial.py diff --git a/TOC-Backend/apps/authentication/migrations/__init__.py b/Backend/apps/authentication/migrations/__init__.py similarity index 100% rename from TOC-Backend/apps/authentication/migrations/__init__.py rename to Backend/apps/authentication/migrations/__init__.py diff --git a/TOC-Backend/apps/authentication/models.py b/Backend/apps/authentication/models.py similarity index 100% rename from TOC-Backend/apps/authentication/models.py rename to Backend/apps/authentication/models.py diff --git a/TOC-Backend/apps/authentication/serializers.py b/Backend/apps/authentication/serializers.py similarity index 100% rename from TOC-Backend/apps/authentication/serializers.py rename to Backend/apps/authentication/serializers.py diff --git a/TOC-Backend/apps/authentication/tests.py b/Backend/apps/authentication/tests.py similarity index 100% rename from TOC-Backend/apps/authentication/tests.py rename to Backend/apps/authentication/tests.py diff --git a/TOC-Backend/apps/authentication/urls.py b/Backend/apps/authentication/urls.py similarity index 100% rename from TOC-Backend/apps/authentication/urls.py rename to Backend/apps/authentication/urls.py diff --git a/TOC-Backend/apps/authentication/views.py b/Backend/apps/authentication/views.py similarity index 100% rename from TOC-Backend/apps/authentication/views.py rename to Backend/apps/authentication/views.py diff --git a/TOC-Backend/config/__init__.py b/Backend/config/__init__.py similarity index 100% rename from TOC-Backend/config/__init__.py rename to Backend/config/__init__.py diff --git a/TOC-Backend/config/asgi.py b/Backend/config/asgi.py similarity index 100% rename from TOC-Backend/config/asgi.py rename to Backend/config/asgi.py diff --git a/TOC-Backend/config/settings.py b/Backend/config/settings.py similarity index 100% rename from TOC-Backend/config/settings.py rename to Backend/config/settings.py diff --git a/TOC-Backend/config/urls.py b/Backend/config/urls.py similarity index 100% rename from TOC-Backend/config/urls.py rename to Backend/config/urls.py diff --git a/TOC-Backend/config/wsgi.py b/Backend/config/wsgi.py similarity index 100% rename from TOC-Backend/config/wsgi.py rename to Backend/config/wsgi.py diff --git a/TOC-Backend/manage.py b/Backend/manage.py similarity index 100% rename from TOC-Backend/manage.py rename to Backend/manage.py diff --git a/requirements.txt b/Backend/requirements.txt similarity index 100% rename from requirements.txt rename to Backend/requirements.txt