Skip to content

Commit 65e1811

Browse files
committed
2nd update
1 parent 00de1fa commit 65e1811

File tree

2 files changed

+121
-1
lines changed

2 files changed

+121
-1
lines changed

README.md

Lines changed: 112 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,112 @@
1-
This is a Python playground project for Daniel personal use
1+
# Sorting Algorithm Visualizer
2+
3+
A web application that visualizes various sorting algorithms using Vue.js frontend and Flask backend.
4+
5+
## Features
6+
7+
- Multiple sorting algorithms supported:
8+
- Bubble Sort
9+
- Selection Sort
10+
- Insertion Sort
11+
- Merge Sort
12+
- Quick Sort
13+
- Shell Sort
14+
- Heap Sort
15+
- Step-by-step visualization of sorting process
16+
- Interactive user interface
17+
- Real-time sorting progress display
18+
19+
## Project Structure
20+
21+
```plaintext
22+
sorting-visualizer/
23+
├── frontend/ # Vue.js frontend
24+
│ ├── src/
25+
│ │ ├── main.js # Vue application entry
26+
│ │ ├── App.vue # Root component
27+
│ │ └── assets/ # Static assets
28+
│ ├── vite.config.js
29+
│ └── package.json
30+
└── backend/ # Flask backend
31+
├── app.py # Flask application
32+
├── services/
33+
│ └── playground.py # Sorting algorithms
34+
└── requirements.txt
35+
```
36+
37+
## Technology Stack
38+
39+
- Frontend:
40+
- Vue.js 3
41+
- Vite
42+
- Modern CSS
43+
- Backend:
44+
- Python 3
45+
- Flask
46+
- Flask-CORS
47+
48+
## Getting Started
49+
50+
### Prerequisites
51+
52+
- Node.js (v14+)
53+
- Python (v3.8+)
54+
- pip
55+
56+
### Installation
57+
58+
1. Clone the repository:
59+
```bash
60+
git clone <repository-url>
61+
cd sorting-visualizer
62+
```
63+
64+
2. Set up the backend:
65+
```bash
66+
cd backend
67+
python -m venv venv
68+
source venv/bin/activate # On macOS
69+
pip install -r requirements.txt
70+
```
71+
72+
3. Set up the frontend:
73+
```bash
74+
cd frontend
75+
npm install
76+
```
77+
78+
### Running the Application
79+
80+
1. Start the Flask backend:
81+
```bash
82+
cd backend
83+
source venv/bin/activate # On macOS
84+
python app.py
85+
```
86+
87+
2. Start the Vue.js frontend (in a new terminal):
88+
```bash
89+
cd frontend
90+
npm run dev
91+
```
92+
93+
3. Open your browser and visit:
94+
```
95+
http://localhost:5173
96+
```
97+
98+
## Usage
99+
100+
1. Select a sorting algorithm from the dropdown menu
101+
2. Enter 5 numbers in the input fields
102+
3. Click "Sort Numbers" to start the visualization
103+
4. Watch the step-by-step sorting process
104+
5. View the final sorted result
105+
106+
## Contributing
107+
108+
Feel free to submit issues and enhancement requests.
109+
110+
## License
111+
112+
This project is licensed under the MIT License - see the LICENSE file for details.

backend/requirements.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
flask==3.0.0
2+
flask-cors==4.0.0
3+
python-dotenv==1.0.0
4+
werkzeug==3.0.1
5+
click==8.1.7
6+
blinker==1.7.0
7+
itsdangerous==2.1.2
8+
Jinja2==3.1.2
9+
MarkupSafe==2.1.3

0 commit comments

Comments
 (0)