This is a full-stack web application built with React.js and Django. The application allows users to view, add, and manage quotes.
- View a list of quotes
- Add new quotes
- Edit existing quotes.
- Delete quotes
- Responsive design
- Frontend: React.js, Tailwind css
- Backend: Django, Django REST Framework, CORS
- Database: SQLite (default, can be changed)
- Other: Docker (optional for containerization)
- Python (3.8 or above)
- Node.js (14.x or above) and npm (6.x or above)
- Git
- (Optional) Docker and Docker Compose
-
Clone the repository:
git clone https://github.com/CodeQuillCrafts/Quotes-Application/tree/main cd Quotes-Application
-
Create a virtual environment and activate it:
python -m venv ./env cd env/scripts activate
-
Install the required Python packages:
cd server pip install -r requirements.txt
-
Set up environment variables:
Create a
.env
file in the server folder of your project and add the following variables:SECRET_KEY=SECRET_KEY DEBUG=True ALLOWED_HOSTS=localhost,127.0.0.1 CORS_ALLOWED_ORIGINS=http://localhost:5173
-
Run migrations and create the database:
python manage.py makemigrations python manage.py migrate
-
Create a superuser (optional but recommended for accessing the Django admin interface):
python manage.py createsuperuser
-
Run the Django development server:
python manage.py runserver
-
Navigate to the
client
directory:cd.. cd client
-
Install the required npm packages:
npm install
-
Start the React development server:
npm run dev
With both servers running, you can access the application in your web browser:
- Django backend API:
http://localhost:5173/
- React frontend:
http://localhost:3000/
- View Quotes: Navigate to the main page to see a list of quotes.
- Add Quotes: Use the form provided on the main page to add a new quote.
- Delete Quotes: Each quote has a delete button that allows you to remove it from the list.
- Fork the repository.
- Create a new branch (
git checkout -b feature/your-feature-name
). - Commit your changes (
git commit -m 'Add some feature'
). - Push to the branch (
git push origin feature/your-feature-name
). - Open a Pull Request.
This project is licensed under the MIT License. See the LICENSE file for more information.
This README provides a comprehensive guide to setting up and running the Quotes Application locally. If you encounter any issues or have questions, please feel free to open an issue on the repository.