{"id":15067852,"url":"https://github.com/sachnaror/combined_django_react_root","last_synced_at":"2026-01-29T09:12:33.196Z","repository":{"id":257253304,"uuid":"857738681","full_name":"sachnaror/Combined_Django_React_Root","owner":"sachnaror","description":"Django and React Integration: Session Authentication, CORS, CSRF Protection, and Cookie Management","archived":false,"fork":false,"pushed_at":"2024-09-16T11:07:25.000Z","size":1003,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-16T05:44:46.759Z","etag":null,"topics":["authentication-mechanisms","cookies","cors","cross-origin-requests","csrf","django","react","session","session-management","web-security"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sachnaror.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-15T13:37:58.000Z","updated_at":"2024-09-16T11:07:29.000Z","dependencies_parsed_at":"2024-09-15T15:03:22.884Z","dependency_job_id":"81e0e592-5707-480d-b67f-c21fd00bf307","html_url":"https://github.com/sachnaror/Combined_Django_React_Root","commit_stats":null,"previous_names":["sachnaror/combined_django_react_root"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sachnaror%2FCombined_Django_React_Root","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sachnaror%2FCombined_Django_React_Root/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sachnaror%2FCombined_Django_React_Root/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sachnaror%2FCombined_Django_React_Root/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sachnaror","download_url":"https://codeload.github.com/sachnaror/Combined_Django_React_Root/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243830912,"owners_count":20354850,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["authentication-mechanisms","cookies","cors","cross-origin-requests","csrf","django","react","session","session-management","web-security"],"created_at":"2024-09-25T01:28:10.204Z","updated_at":"2026-01-29T09:12:31.654Z","avatar_url":"https://github.com/sachnaror.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Combined Django React Root\n\n\n\u003cimg src=\"image.png\" alt=\"Image Description\" width=\"450\" height=\"350\" /\u003e\n\n\u003cimg src=\"image-1.png\" alt=\"Image Description\" width=\"350\" height=\"350\" /\u003e\n\n## Description\n\nThis project is a web application that combines a Django backend with a React frontend. The Django application serves as the backend API, managing data and providing endpoints for the React frontend to interact with. The application is designed to manage a collection of books, allowing users to view, add, and authenticate against the book records.\n\n## Features\n\n- **Django Backend**:\n  - RESTful API built using Django REST Framework.\n  - User authentication and authorization.\n  - Management of book records, including creation, retrieval, and listing.\n\n- **React Frontend**:\n  - Built using Create React App.\n  - Interactive user interface for managing books.\n  - Fetches data from the Django API and displays it to users.\n\n## Technologies Used\n\n- **Backend**:\n  - Django 5.1\n  - Django REST Framework\n  - SQLite (default database)\n  - Faker (for generating fake data)\n\n- **Frontend**:\n  - React\n  - Axios (for making API requests)\n\n## Installation\n\n### Prerequisites\n\n- Python 3.x\n- Node.js and npm\n- Django\n- Django REST Framework\n\n### Clone the Repository\n\ngit clone https://github.com/sachnaror/Combined_Django_React_Root.git\n\ncd Combined_Django_React_Root\n\n\n### Set Up the Backend\n\n\n1. Navigate to the Django app directory:\n\n2. Create a virtual environment:\n\n3. Install the required packages:\n\n4. Run migrations to set up the database:\n\n5. Create fake book records (optional):\n\n6. Start the Django development server:\n\n7. Start the React development server:\n\n\n## API Endpoints\n\n- **List Books**: `GET /api/listbooks/`\n  - Retrieves a list of all books.\n\n- **Login**: `POST /api/login/`\n  - Authenticates a user and returns a token.\n\n- **Set CSRF Cookie**: `GET /api/setcsrf/`\n  - Sets a CSRF cookie for secure requests.\n\n## Usage\n\n- Access the React application at `http://localhost:3000`.\n- Use the provided API endpoints to interact with the backend.\n- The application allows users to view and manage book records.\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a pull request or open an issue for any enhancements or bug fixes.\n\n## License\n\nThis project is licensed under the MIT License. See the LICENSE file for more details.\n\n## Contact\n\nFor any queries, you can reach out to [schnaror@gmail.com].\n\n\n```\n├── Combined_Django_React_Root/\n│   ├── requirements.txt\n│   ├── db.sqlite3\n│   ├── README.md\n│   ├── .env\n│   ├── manage.py\n│   ├── image-1.png\n│   ├── image.png\n│   ├── Django_App/\n│   │   ├── models.py\n│   │   ├── serializers.py\n│   │   ├── apps.py\n│   │   ├── admin.py\n│   │   ├── tests.py\n│   │   ├── urls.py\n│   │   └── views.py\n│   │   ├── tests/\n│   │   │   ├── test_views.py\n│   │   │   └── test_models.py\n│   │   ├── management/\n│   │   │   ├── commands/\n│   │   │   │   └── fakebooks.py\n│   │   ├── static/\n│   │   │   ├── Django_App/\n│   │   │   │   ├── css/\n│   │   │   │   │   └── styles.css\n│   │   │   │   ├── images/\n│   │   │   │   │   └── logo.png\n│   │   │   │   ├── js/\n│   │   │   │   │   └── script.js\n│   │   │   │   ├── fonts/\n│   │   │   │   │   └── font.ttf\n│   │   ├── api/\n│   │   │   ├── serializers.py\n│   │   │   └── api_views.py\n│   │   └── templates/\n│   ├── Combined_Django_React_Root/\n│   │   ├── asgi.py\n│   │   ├── settings.py\n│   │   ├── urls.py\n│   │   └── wsgi.py\n│   ├── myproject-frontend/\n│   │   ├── README.md\n│   │   ├── package-lock.json\n│   │   └── package.json\n│   │   ├── public/\n│   │   │   ├── favicon.ico\n│   │   │   ├── index.html\n│   │   │   ├── logo512.png\n│   │   │   ├── manifest.json\n│   │   │   ├── robots.txt\n│   │   │   └── logo192.png\n│   │   ├── src/\n│   │   │   ├── reportWebVitals.js\n│   │   │   ├── App.css\n│   │   │   ├── index.js\n│   │   │   ├── index.css\n│   │   │   ├── ListBookComponent.js\n│   │   │   ├── App.test.js\n│   │   │   ├── setupTests.js\n│   │   │   ├── logo.svg\n│   │   │   └── App.js\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsachnaror%2Fcombined_django_react_root","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsachnaror%2Fcombined_django_react_root","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsachnaror%2Fcombined_django_react_root/lists"}