https://github.com/itsyst/django-bookstore
Book store management system using python django.
https://github.com/itsyst/django-bookstore
bootstrap django python
Last synced: about 2 months ago
JSON representation
Book store management system using python django.
- Host: GitHub
- URL: https://github.com/itsyst/django-bookstore
- Owner: itsyst
- Created: 2021-07-09T23:55:31.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-12-11T13:10:44.000Z (over 1 year ago)
- Last Synced: 2025-10-15T15:10:59.477Z (8 months ago)
- Topics: bootstrap, django, python
- Language: Python
- Homepage: https://backend-y7w4.onrender.com
- Size: 1.09 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Django Bookstore Application
This project consists of a **Django backend** for managing the bookstore API and a **React frontend** for interacting with the API. Follow these steps to set up and run both parts of the application.
## Requirements
Before you begin, make sure you have the following installed:
- [Python 3.8+](https://www.python.org/downloads/)
- [Node.js & npm](https://nodejs.org/) (Node.js version 12+ recommended)
## Getting Started
### 1. Clone the Repository
Clone this repository to your local machine:
```bash
git clone https://github.com/itsyt/django-bookstore.git
cd django-bookstore
```
## Backend Setup (Django)
### 2. Create a Virtual Environment
Inside the project directory, create and activate a virtual environment:
```bash
# Create a virtual environment
python -m venv venv
# Activate the virtual environment
# For Windows
venv\Scripts\activate
# For macOS/Linux
source venv/bin/activate
```
### 3. Install Backend Dependencies
With the virtual environment activated, install the backend dependencies listed in `requirements.txt`:
```bash
pip install -r requirements.txt
```
### 4. Run Database Migrations
Navigate to the Django project directory and apply migrations:
```bash
python manage.py migrate
```
### 5. Start the Django Development Server
Run the following command to start the Django backend server on `http://127.0.0.1:8000/`:
```bash
python manage.py runserver
```
Your Django backend should now be running and ready to handle API requests.
## Frontend Setup (React)
### 6. Install Frontend Dependencies
Navigate to the `frontend` directory and install the React app dependencies using `npm`:
```bash
cd frontend
npm install
```
### 7. Start the React Development Server
After installing the dependencies, you can start the React development server:
```bash
npm start
```
This will run the frontend on `http://127.0.0.1:3000/`, and it should connect to the Django backend API running on `http://127.0.0.1:8000/`.
## Configuration
### API URL
If the API URL or port changes, update it in the `apiConfig.js` file in the `frontend/src` directory.
## Additional Notes
- **Django Admin Panel**: You can access the Django admin panel at `http://127.0.0.1:8000/admin`.
- **Frontend Development**: The React app has hot-reloading enabled, so any saved changes will automatically update in the browser.
## Troubleshooting
- If you encounter issues with package installations or missing dependencies, try deleting the `node_modules` folder in the `frontend` directory and running `npm install` again.
- Ensure your virtual environment is activated when running backend commands.
## License
This project is open-source and available under the [MIT License](LICENSE).